Question: Write a class that will compute the date of Easter Sunday. Easter Sunday is the first Su after the first full moon of spring. To

 Write a class that will compute the date of Easter Sunday.

Write a class that will compute the date of Easter Sunday. Easter Sunday is the first Su after the first full moon of spring. To find Easter's date, use an algorithm developed by mathematician Carl Friedrich Gauss in 1800. 1. Let y be the year; e.g. 1800, 1975 or 2014. 2. Divide y by 19 and call the remainder a. Ignore the quotient. 3. Divide y by 100 to get a quotient b and remainder c. 4. Divide b by 4 to get a quotient d and remainder e 5. Divide (8 * b + 13) by 25 to get quotient g. Ignore the remainder. 6. Divide (19 * a + b - d - g + 15) by 30 to get remainder h. Ignore quotient. 7. Divide c by 4 to get the quotient j and remainder k. 8. Divide (a + 11 * h) by 319 to get quotient m. Ignore the remainder. 9. Divide (2 * e + 2 * j - k - h + m + 32) by 7 to get remainder the quotient. 10. Divide (h - m + r + 90) by 25 to get quotient n. Ignore the remainder. 11. Divide (h - m + r + n + 19) by 32 to get remainder p. Ignore the qu The result is that Easter falls on day p of month n in the given year. For example, ify a = 6 g = 6 m = 0 b = 20 h = 18 r 6 C 1 = 0, n 4 d = 5 , = 0 K = 1 p = 15 Therefore, in 2001, Easter Sunday falls on April 15 (n = 4 and p = 15). If you get the wrong answer, put a breakpoint on the last statement of your algorithm check out the values of all the variables (a .. p) and see where they go wrong. Then fix code and try again. Write a class Easter with methods getEasterSundayMonth ( ) and getEasterSundayDay () . Write a class EasterTester that tests the Easter uses the Scanner to get the year and produces the following output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!