Question: in java for PC please Day Of Week Write Dayofweek.java, a program to compute the day of the week (number) on which a specific date
Day Of Week Write Dayofweek.java, a program to compute the day of the week (number) on which a specific date falls. Your program should take three command-line arguments: month, day, and year. The number of the month will be given, for example, 1 for January. Use the following formulas, for the Gregorian calendar: yo = y - (14 - m) / 12 x = yo + Lyo/4 - Lyo/100) + L/400 NO = m + 12 (14 - m) / 12 - 2 do = 1d + x + 31 mo/12 mod 7 For example, on what day of the week was August 2, 1953? y = 1953 -0 =1953 X = 1953 + 1953/4 - 1953/100 + 1953/400 - 2426 m = 8 + 12x - 2 = 6 d = (2+2426+ (31x6)/12) mod 7-2443 mod 7 - 0 (Sunday) Example command-line of use: Java DayOfheek 8 2 1953 The example above should produce the following output: 8/2/1953 falls on . Remember that [x/y] means to perform integer division, just like Java normally does. You will need to learn about Integer.parseInt() to convert strings to integers. Problem taken from "Introduction to Programming in Java" by Robert Sedgwick and Kevin Wayne be
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
