Multiple Choice
Given the following class, what would be the best declaration for a constructor that would allow the user to initialize the object with an initial age and cost?
Class Wine
{
Public:
Wine) ;
Int getAge) ;
Float getCost) ;
Private:
Int age;
Float cost;
}
A) int getAgeint newAge) ;
B) Wine) ;
C) Wineint age) ;
D) Wineint newAge, float newCost) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q9: You specify an individual member of a
Q10: given the following class definition, how could
Q11: Which part of the ADT tells the
Q12: Given the following strucure definition, what is
Q13: What can a constructor return? _
Q15: Member functions of a class<br>A) may not
Q16: The name of a constructor is _
Q17: A member function that gets called automatically
Q18: Class data members are almost always public.
Q19: To assign values to a structure variable,