I am developing Bus Reservation System but i am stack on how to implement this situation.
I will use this funny example of countries so you can get an idea.
A Bus main Route is from USA To China but it have some stop points like England, India and Russia.
Main Route USA To CHINA
Sub-Route USA To ENGLAND ENGLAND To INDIA INDIA To RUSSIA RUSSIA To CHINA
The logic i need a help to implement is
- if a Passenger board from USA and off board in England sat on A1 seat what logic should i use when another passenger want to book the same seat A1 from England to India or Russia???
- I need advice which logic should i use when a seat B1 lets say was booked from England to China what logic should i use when passengers from India & Russia to China to show them that seat B1 is booked.
I tried to brainstorm this situation whole day without any success. Need help guys.