Question: I need help with this programming project, it is NOT the project about dates/first day of classes. This is program is supposed to calculate the

Create a project named EasterDate. NetBeans will create a class with the same name, EastarData. The EasterDate class that NetBeans creates will have a main method in it but will not be the main class. Delete the main method that NetBeans puts in the EasterDate class and implement the EasterDate class as described below. Then create another class named EasterDateDemo which will be the main class. It will contain the main method. Implement the EasterDateDemo class as described below. You will need to call the getMonth method and the getWeekDay method from the main method in order to gat the month and the day of the week for the printouts. The EasterDate Class The EasterDate class should have month, day and year, all integers, as inslance variables. The EasterDate class should have the following methods: public String getMonth() //returns the name of the month as a string (does not return the instance variable month) public int getDay() II returns the instance variable day public int getYear() I/ returns the instance variable year public void setYear(int y) I/ sets the instance variable year to the input parameter y public void setMonthAndDay(int m, int d ) I/ sets the instance variables month and day to the input parameters m and d public String getWeekDay() II Calculates the day of the week and returns it as a string public int] getEasterMonthAndDay() I/ Calculates the month and day of Easter as integers and returns these two integers in an int array The EasterDateDemo Class The EasterDateDemo class should do the following: 1) Prompt the user for a year. 2) Read the year. 3) Construct an object of the EasterDate class. 4) Call the setYear nethod to set the instance variable year to the input year. 5) Call the getEasterMonthAndDay method to get the month and day of Easter in an int array. 6) Call the setMonthAndDay method to set the instance variables month and day to the values that were retumed by the getEasterMonthAndDay method. 7) Call the getWeekday method to get the day of the week of Easter as a string. 8) Call the getMonth method to get the month of Easter as a string. 9) Print the date of Easter as shown in the output. In order to determine the month and day of Easter as integers, use the following algorithm: In 1800 Carl Friedrick Gauss developed an algorithm to calculate the day that Easter falls on, for any glven year: 1. Let y be the year (such as 1800 or 2001) 2. Get the remainder of y divided by 19 and call it a. 3. Get the integer part of y divided by 100 and call it b. 4. Get the remainder of y divided by 100 and call itc c. 5. Get the integer part of b divided by 4 and call it d. 6. Get the remainder of b divided by 4 and call it e. 7. Get the integer part of (8b+13) divided by 25 and call it g. 8. Get the remainder of (19a+bdg+15) divided by 30 and call it h. 9. Get the integer part of c dlvided by 4 and call it j. 10. Get the remainder of c divided by 4 and call it k. 11. Get the integer part of (a+11h) divided by 319 and call it m. 12. Get the remainder of (2e+2Jkh+m+32) divided by 7 and call it r. 13. Get the integer part of (hm+r+90) divided by 25 and call it n. 14. Get the remainder of (hm+r+n+19) divided by 32 and call it p. Then Easter falls on day p of month n. Additional Requirements All methods must be public and all instance variables private, Do not use ti-staternents to determine the name of the weekday or month: declare two arrays of strings, one with the names of the months and the other with the days of the week, and use the appropriate indexes to obtain them Here are five sample program runs: Sample Run 1 Enter a year: 1956 In 1956, Easter falls on Sunday. Apni 1 Sample Run 2 Enter a year 1970 In 1970. Easter falts on Sunday, March 29 Sample Run 3 Enter a year: 2000 In 2000, Easter falls on Sunday, April 23 Sample fun 4 Enter a year. 2008 In 2008, Easter falts on Sunday, March 23 Sample Run 5 Enter a year. 2023 In 2023, Easter falls on Sunday. Apr 9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
