Solved

Given the Following Class, What Would Be the Best Declaration

Question 48

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:

verifed

Verified

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

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents