Question: Java We want to create a class that represents a date. A date has a day, month, ond year. For example, the date March 16,
We want to create a class that represents a date. A date has a day, month, ond year. For example, the date March 16, 2014 has the day 16, month 3, and year 2014. The basic framework of a date class is below: public class Date private int day; private int month; private int year; public void Date (int d, int m, int y) { // What should the body of the constructor be? 1 } a) day-d; month = m; year = y; b) dday m = month; y year: c) int day = d; int month - m; int yeary: d) day - 1; month = 1: year 1990
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
