In this module let us create Ticket objects and allow the user to book his tickets
Users cannot book tickets for unscheduled trains. The user needs to check the schedule and the availability of tickets for a train and then only book tickets.
Steps to be followed to create Ticket objects:
Users cannot book tickets for unscheduled trains. The user needs to check the schedule and the availability of tickets for a train and then only book tickets.
Steps to be followed to create Ticket objects:
- Create a base class called Ticket, by identifying the common attributes of a Ticket
- Create 2 derived classes called, AC_Ticket and SC_Ticket, for the above given base class (AC_Ticket is for AC class and SC_Ticket is for sleeper class)
- Login as User
- Check Schedule of the trains available
- Check the availability of berths
- If available berths are there, allow the user to book tickets – AC or Sleeper
- A User can book maximum of 2 tickets at a time. There is a single pnr number given.
- Save the tickets in the folder that contains that particular train and the required day.
- Display the ticket to the user in a neat format
Comments
Post a Comment