diff --git a/.idea/misc.xml b/.idea/misc.xml index 639900d..6e86672 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Java-Assignment-004.zip b/Java-Assignment-004.zip new file mode 100644 index 0000000..af9f9af Binary files /dev/null and b/Java-Assignment-004.zip differ diff --git a/src/.gitkeep b/src/.gitkeep index 8b13789..2f1f8ad 100644 --- a/src/.gitkeep +++ b/src/.gitkeep @@ -1 +1,32 @@ +public class RedesignDate { + // Part 1 + + public static String printAmerican(String day, int date, String month, int year) { + String aTemplate = "%s, %s %dth, %d"; + System.out.printf(aTemplate, day, month, date, year); + return ""; + + } + + public static String printEuropean(String day, int date, int month, int year) { + String bTemplate = "%s, %02d.%02d.%d"; + System.out.printf(bTemplate, day, date, month, year); + return ""; + + } + + public static void twoLine() { + System.out.println("\n"); + + } + + public static void main(String[] args) { + printAmerican("Wednesday", 7, "February", 2024); + twoLine(); + printEuropean("Wednesday", 07, 02, 2024); + + + } + +} \ No newline at end of file