The application contains the User class that represents users. Stores each user, name, age and discount type. Users have different discounts depending on their age and discount type.
Student and retiree contain their own discount calculation logic.
The app offers three different ticket options: short distance, normal distance and long distance. Each ticket option has different prices.
Users receive unique discounts based on the ticket type they choose. For example, 20% discount on short distance tickets for students and 10% discount on normal distance tickets for retirees.
When users purchase tickets, discounts are applied based on the ticket type they choose and final ticket prices are calculated.
The results are printed on the screen, along with ticket prices calculated based on usernames and ticket types.
- @turkmuhendisi for joning the events.
- Open-Closed Principles (provided by Generics and Polymorphism)
- Single Resposibility
- Liskov Substitution Principle