We want to create a class that represents a date.A date has a day, month, and year.For example, the date March 16, 2014 has the day 16, month 3, and year 2014.The parameter variables in the constructor for month, day, and year should be m, d and y.The basic framework of a date class is below: public class Date
{
private int day;
private int month;
private int year;
}
What should the body of the constructor be?
A) day =d;
month =m;
year = y;
B) d= day;
m= month;
y= year;
C) Int day =d;
int month =m;
int year =y;
D) day =1;
month =1;
year = 1990 ;
Correct Answer:
Verified
Q98: Assuming the following code is the body
Q99: Consider the following invocation of the deposit
Q100: If the CarComponent class had the call
Q101: Assume the method below has been added
Q102: What will be output from the following
Q103: We want to create a class that
Q104: What will be output from the following
Q105: Assume the method below has been added
Q106: We want the toString method to return
Q108: We want to create a class that
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents