Design a class Date which can create Date type objects. Instance Variables: int dd : to store the day int mm : to store the month int yy : to store the year Member Methods: i. Date ( ) – default constructor to initialize the instance variables to default values. ii. Date (int d, int m, int y) : parameterized constructor to initialize as d =dd, m =mm, y =yy. iii. boolean isLeap ( ) : to check whether the year is a leap year or not. If leap year returns true otherwise returns false. iv. void print_date ( ) : to display the date as “dd/mm/yyyy” format and also given year is “Leap year” or “Not a Leap year”. Write a main method to create an object and invoke the above methods.
Attachments:
Answers
Answered by
0
Answer:
okokkkkkokokkkokok
Explanation:
Similar questions