Given the following class definition, how would you declare an object of the class, so that the object automatically called the default constructor?

class ItemClass
{
public:
ItemClass();
ItemClass(int newSize, float newCost);
int getSize();
float getCost();
void setSize(int newSize);
void setCost(float newCost);
private:
int size;
float cost;
};
a. ItemClass() myItem;
b. ItemClass myItem(1, 0.0);
c. ItemClass myItem;
d. ItemClass myItem();
e. You can not do this


c. ItemClass myItem;

Computer Science & Information Technology

You might also like to view...

The ____ attribute determines what text appears on the button in the browser.

A. name B. label C. text D. value

Computer Science & Information Technology

Which of the following refers to the deliberate manipulation of an existing program to redirect or reroute data representing monies or economic exchanges?

a. ISP jacking b. web cramming c. data diddling d. IP spoofing

Computer Science & Information Technology

Which of the following is included in the output from the arping command?

A. "bytes=" B. "time<" C. "Unicast reply from …" D. "global options:"

Computer Science & Information Technology

Spencer would like to purchase a wearable device that allows him to make phone calls and send text messages.   Which type of wearable device should Spencer purchase?

A. Smart watch B. Fitness monitor C. E-reader D. AR headset

Computer Science & Information Technology