Question: Q. No.1: [Total Marks 5 X 3 = 15) Consider the following class definition:. public class date private int day; // from 1 to 31

Q. No.1: [Total Marks 5 X 3 = 15) Consider the following class definition:. public class date private int day; // from 1 to 31 private int month; // from 1 to 12 private int year; // from 2000 upwards public void advance; // move to next day a) Implement a constructor that initialises new objects of date class to be set to the 1st of January 2000. b) Implement setters for day, month and year. Implement the advance method, which moves to the next day, ensuring that all data members are updated appropriately
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
