Railway Booking System
Problem Statement:
You are tasked with designing a Railway Seat Booking System that allows passengers to book train seats based on availability and adjusting pricing. The system must accommodate the following requirements:
Task 1: The user should be able to book a seat by selecting the coach type (e.g., AC, Sleeper, General) and specifying their Start station and End station. The system should check seat availability for the selected route segment.
Task 2: Seats should be bookable between any two intermediate stations. For example, if a train travels from Station A to Station F, a passenger should be able to book a seat from Station C to Station E, provided that seat is available for that portion of the journey.
Task 3: In the AC coach, the pricing for seats increases incrementally by +5 INR for each subsequent seat. For example, if the first seat costs 10 INR, the second will cost 15 INR, the third will cost 20 INR, and so on. If a seat is skipped (i.e., not booked), the next available seat will continue with this incremental pricing pattern.
Task 4: Passengers should be able to view all available seats based on their selected source and destination stations. The pricing for each available seat should also be displayed based on the coach type.
Task 5: Book an available seat for a passenger traveling from Station C to Station E, ensuring the seat is marked unavailable for that portion of the journey and the next seat price is updated if necessary.
Task 6: Search the available seats, train, station based on other parameter.
Task 7: Retrieve a list of all available seats in the AC coach for a particular train from Station A to Station D, along with their current pricing.
The number of seats, coach, want to be scale.
Note: This is not the exact question paper content, but this similar question is asked for me.
Thank you


