Computer Science, asked by rudrakshadutta75, 9 months ago

+5 pts Answered Design a class in java 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.

Answers

Answered by ashmitanand67
0

Answer:

nice question it is I am happy

Similar questions