Create aclass named Calendar using the following as instancevariables: year: oft
ID: 3609516 • Letter: C
Question
Create aclass named Calendar using the following as instancevariables:
year: oftype int in the range 1900-3000
month: in therange 1 to 12 (January is 1)
day: in therange 1 to 31 AND appropriate to the month.
*assume themonth of February has 28 days.
The classesshould have:
1) a default constructor, which sets theinstance variables to reasonable values but do not read input fromthe user.
2) accessor methods (set/get foreach instance variable)
3) a method named readInput for which asksthe user for the appropriate information, and uses the accessormethods to place the information in the variables.
Explanation / Answer
x.p
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.