Solved

We Want to Create a Class That Represents a Date

Question 80

Multiple Choice

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 basic framework of a date class is below: public class Date
{
Private int day;
Private int month;
Private int year;
}
The default date will be set to January 1, 1990. What should the body of the constructor with zero parameters be?


A) day = 1; month = 1;
Year = 1990;
B) int day = 1; int month = 1;
Int year = 1990;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions