Imagine we create a Date class with the following single constructor:
Date( int theMonth, int theDay, int theYear) {
month = theMonth; day = theDay; year = theYear;
}
The driver code then has the following, which generates an error:
Date d1;
What is the likely reason for this error?
A) There is no default constructor for the Date class
B) The Date class is declared after the declaration of d1
C) There is already a declared Date object with the name d1
D) This is a declaration and is not calling the Date class constructor

Q&A Platform for Education
Platform Explore for Education