User-Defined Classes: In Java, Design and implement the class Day thst implrmntd the dsy of the week in a program. The class Day should store the day of the week, such as, Sun for Sunday. The program should be able to perform the following operations on an object of type Day: 1. Set the day 2. Print the day 3. Return the next day 5. Return the previous day 6. Calculate and return the day by adding certian days to the current day. For examole, if the current day is Monday and we add four days, the day to be returned is Friday. Similarly, if today is Tuesday and we add 13 days , the day to be returned is Monday 7. Add appropriate constructors. 8. Write the definitons of the methods to implement the operations for the class Day, as defined in a through g. 9. Write a program to test various operaions on the class Day.
User-Defined Classes: In Java, Design and implement the class Day thst implrmntd the dsy of the week in a
1. Set the day
2. Print the day
3. Return the next day
5. Return the previous day
6. Calculate and return the day by adding certian days to the current day. For examole, if the current day is Monday and we add four days, the day to be returned is Friday. Similarly, if today is Tuesday and we add 13 days , the day to be returned is Monday
7. Add appropriate constructors.
8. Write the definitons of the methods to implement the operations for the class Day, as defined in a through g.
9. Write a program to test various operaions on the class Day.

Trending now
This is a popular solution!
Step by step
Solved in 2 steps









