A ticket selling booth in a cricket stadium, people have to buy the ticket from this booth to enter into the stadium. Price of the each ticket is Rs. 500. The booth keeps track of the number of people visited the stadium. Model this ticketing booth with a class called Counter A including following members Data members (i) Number of people visited (ii) Total amount money collected Member functions (i) To assign initial value (ii) To increment people total as well as amount total if a ticket is sold out. (iii) To display two totals Write a program to test this class.
Comments
Leave a comment