Solved

Given the Following Class and Object Declaration, How Would You

Question 49

Multiple Choice

Given the following class and object declaration, how would you print out the age and cost of a bottle of wine?
Class Wine
{
Public:
Wine) ;
Int getAge) ;
Float getCost) ;
Private:
Int age;
Float cost;
}
Wine bottle;


A) cout << bottle;
B) cout << Wine.age, Wine.cost;
C) cout << bottle.getAge) << bottle.getCost) ;
D) cout << bottle.getAge << bottle.getCost;
E) cout << bottle.age << bottle.cost;

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