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;


c. cout << bottle.getAge() << bottle.getCost();

Computer Science & Information Technology

You might also like to view...

The ________ option will stretch a title to span across the top of a page

A) Expanded B) Positioning C) Kerning D) Condensed

Computer Science & Information Technology

In a line chart, the category labels are displayed along the left side of the chart

Indicate whether the statement is true or false

Computer Science & Information Technology

Text can be keyed in shapes that are drawn.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The OS maintains a list of files called a page file for each storage device on your computer. 

Answer the following statement true (T) or false (F)

Computer Science & Information Technology