Solved

Given the Following Class and Object Declaration, How Would You

Question 34

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