Question: Q1 Write an application that print Citizen's information by implementing the following two classes: Class Date which has three instance variables: date, month, and year.

Q1 Write an application that print Citizen's information by implementing the following two classes: Class Date which has three instance variables: date, month, and year. The class lave a constructor that initializes the instance variables according to the passed argumt . vrite method toString that returns the date in the following format: day/month/year. The constructor should validate the arguments day, month, and year before assigning their values to the corresponding class instance variables (e.g., month cannot be >12 and
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
