Skip to content

Got17/Train-Ticket-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Train Ticket System by C#

AppImage

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.

Features

  • 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.

How to Use

  1. Clone the repository:
git clone https://github.com/Got17/Train-Ticket-System-by-CSharp.git
  1. Open the project in your preferred C# IDE.

  2. Run the application.

  3. Input the distance you want to travel in the provided textbox.

  4. Choose the class from the combobox.

  5. Select the appropriate surcharge option from the radio button list.

  6. The calculated ticket price will be displayed in the output textbox.

  7. View the detailed breakdown of the ticket in the list box.

Examples

  • Distance: 50 km
  • Class: First Class
  • Surcharge: Kid Ticket
  • Output: Total Price: 10 € (First Class 20% surcharge: 12 €, Kid Ticket 20% discount: 9.6 €)

Contribution

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or create a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages