A set of classes is used to handle the different ticket types for a theater. All tickets have a unique serial number that is assigned when the ticket is constructed and a price. There are three basic types of tickets:
Ticket type | Description | Sample toString Output |
WalkupTicket | These tickets are purchased on the day of the event for $50 | SN: 314, $50 |
AdvanceTicket | Tickets purchased ten or more days in advance cost $30. Tickets purchased fewer than ten days in advance cost $40. | SN: 612, $40 |
StudentAdvanceTicket | These are AdvanceTickets that cost half of what an AdvanceTicket would normally cost. | SN: 59, $15 (student) |