Solved

Given the Following Class, What Would Be the Best Declaration

Question 54

Multiple Choice

Given the following class, what would be the best declaration for a mutator function that allows the user of the class to change the age?
Class Wine
{
Public:
Wine) ;
Int getAge) ;
Float getCost) ;
Private:
Int age;
Float cost;
}


A) int getAgeint newAge) ;
B) Wine) ;
C) void setAge) ;
D) void setAgeint newAge) ;

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