63.3k views
0 votes
How many constructors are there in the following class declaration?class CashRegister { public: CashRegister(); CashRegister(int count); void set_item_count(int count); void view() const; private: int item_count; }; CashRegister::CashRegister() { set_item_count(0); } CashRegister::CashRegister(int count) { set_item_count(count); }a. 0b. 1c. 2d. 3

User Tersrth
by
3.8k points

1 Answer

5 votes

Answer:

a. 0

Step-by-step explanation:

There are zero constructors in the given class declaration. There is a cash register which is in count for public. There is a private cash register which shows the item count as zero.

User Fredrick Gauss
by
4.2k points