The National Zoo Malaysia operates since 1963. The visitors are required to buy tickets to enter the zoo. The Zoo management team keep tracks of the ticket sales for data analysis purposes. Therefore, a ticket selling system is developed to assist the zoo’s operation such as recording the ticket sales and transactions. The system also generates sales reports.
The ticket can be divided into two categories, Yearly Admission Ticket and Day Admission Ticket. One sales transaction supports only one ticket type. A visitor can buy several tickets in one sales transaction. But per transaction allows purchasing of maximum 3 Yearly Admission Ticket only. The ticket owner’s personal information such as identity number, name, address and etc must be recorded for each ticket. A visitor can buy unlimited amount of daily ticket. The buyer’s information is not required for the purchase of the daily tickets.
The following table shows the ticket pricing details: -
| Ticket Type | Category | Price |
|---|---|---|
| Yearly | Senior Adult Kid/Student |
100 120 80 |
| Daily | Senior Adult Kid/Student |
30 50 20 |
You are required to form a group of 3-4 members to create the class diagram for the above scenario. You must include justification for the attributes and methods in each class. Besides, discuss the object-oriented concept that you used in your design.
Based on the class diagram created, write a program using any object-oriented programming language (Java, C#, VB.net).