Imagine a ticket selling booth at a fair.People by are requested to
Purchase a ticket. A ticket is priced as Rs.2.50/the booth keeps track
The number of people that have visited the booth and, of the total
Amount of money collected. Model this ticket selling booth with a
Class called tic booth including following members.
Data members
Numbers of people visited
Total amount of money collecteMember function:
To assign initial values (assign 0 to both data members)
To increment people total as well as amount if a ticket is sold out.
To display the two totals
To display the numbers of ticket sold out ( a ticket one)
Include the program to test this class.
|