Please solve this question A ticket at a ticket selling booth at a fair is priced at Rs.2.50/-. The booth keeps track of the total number of people who have visited the booth, the number of people who have actually purchased a ticket and the total amount of money collected. Design a class called Ticbooth which includes the following Members: Class name Ticbooth Data members no_people number of people who have visited the booth. amount total amount of money collected. Member functions void initial() To assign initial values to data members. void notsold() Increment total number of people only visiting the booth and not purchasing a ticket. void sold() Increment total number of people purchasing a ticket and the amount collected when a ticket is sold. void disp_totals() To display the total number of people visiting the booth (the total number of people purchasing the ticket as well as those not purchasing a ticket). void disp_ticket() To display the total number of tickets sold and the amount collected. Specify the class Ticbooth giving details of the functions void initial(), void sold(), void notsold(), void disp_totals() and void disp_ticket(). The main function is to be written. |
|
asked by Anugrahkapoor24 (anugrahkapoor24) 6 years ago | |
0 |
Other Questions on This Topic
Back after a long time to Respaper. What's up guys? 👊🏻 |
|
asked by Rishi dey chowdhury (rishidc) 1 year ago | |
0 | |