Question: Write a Java code to: 1- Represent a Date class. As date is composed of three attributes, namely month, year and day; so the class
Write a Java code to: 1- Represent a Date class. As date is composed of three attributes, namely month, year and day; so the class contains three Data Members. 2- Test the Date class. Exercise 2: 1. Write a declaration of a class Rectangle. It has two data members that represent the length and width of rectangle. The method calculateArea will return the area of rectangle. 2. The runner class will create an object of Rectangle class and area function will be called
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
