Welcome to the Train Ticket System project! This system is developed using C# and allows users to calculate train ticket prices based on various parameters such as distance, class, and discounts.
- Distance Input: Users can input the distance they want to travel in kilometers.
- Class Selection: Users can choose between different classes: First Class, Business Class, and Economy Class.
- Surcharge Options: Users can select surcharge options for their tickets:
- Senior Ticket for 50% discount
- Kid Ticket for 20% discount
- No travel discount
- Price Display: The system displays the calculated price for the train ticket based on the input.
- Detailed Information: The system provides a detailed breakdown of the ticket price including the input distance, the class, and any surcharges.
- Clone the repository:
git clone https://github.com/Got17/Train-Ticket-System-by-CSharp.git
-
Open the project in your preferred C# IDE.
-
Run the application.
-
Input the distance you want to travel in the provided textbox.
-
Choose the class from the combobox.
-
Select the appropriate surcharge option from the radio button list.
-
The calculated ticket price will be displayed in the output textbox.
-
View the detailed breakdown of the ticket in the list box.
- Distance: 50 km
- Class: First Class
- Surcharge: Kid Ticket
- Output: Total Price: 10 € (First Class 20% surcharge: 12 €, Kid Ticket 20% discount: 9.6 €)
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or create a pull request.