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