GithubHelp home page GithubHelp logo

sidhant-khamankar / railway-reservation-system Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.53 MB

OOP Subject Project Based Learning

C++ 100.00%
reservation-system admin password college project random-number-generators filehandling passenger ticket

railway-reservation-system's Introduction

College-OOP-PBL - Railway Reservation System

OOP Subject Project Based Learning Github: https://github.com/sidhant-khamankar/Railway-Reservation-System

Topic: Railway Reservation System

Description: This program will allow admin to generate user ids ,set Train info and see all Reservations, users and cancellations. User can Reserve, Enquire and Cancel Ticket. Ticket fare will be calculated based upon concession category. Every data will be written to files in binary form using file Handling. Updation of Seats after reservation and cancellation takes place as well. PNR is generated randomly using random function.

Flowchart Links

main database user

database  manage

User Reserve and Enquire: https://app.code2flow.com/RAF4yK3bkvCR

Reservation enquire

User cancel

Classes:

Train:

Contains Train Details like name, number, class type and their fares, date, boarding and destination stations. It has function for inputting these details and printing them.

Reserve:

Contains Passenger details like name, age and the corresponding booked train details along with PNR number, concession, reserved seats. It has function for inputting these details and printing them.

Cancel:

Similar to Reserve class.

User:

Contains id and password of user. It has function for inputting these details and printing them.

Functions

Admin:

It has subfunctions to Add Train, Display all trains and following functions

User Management:

It can be used to add new Users and display existing users with their ID and password.

Display Reservations:

It reads records from Reservation file and display them.

Display Cancellations:

It reads records from Cancelled file and display them.

User:

A particular user can login using his/her credentials. It has following subfunctions

Reserve:

It takes ticket details from user as input. Calculates concession and updates seats in Train file and then generates PNR Number using random number generator.

Cancel:

It takes PNR number as input and finds the reserved ticket and deletes it from Reservation file and Updates Cancellation file.

Enquiry:

Display all Trains Details from Train file.

Files

id.txt:

Binary file. Contains User Records.

t.txt:

Binary file. Contains Train Records.

p.txt:

Binary file. Contains Reservation Records.

cn.txt:

Binary file. Contains Cancellation Records.

temp.txt:

Binary file. Holds Reservation Records except Cancellation Records.

Output

Admin Adds Trains

admin add trains

Admin display trains

admin display trains

Admin adds and displays users

admin user add and display

User Reserves

user reserv_1 user reserv_2

User Enquires after Reservation

user enquiry after reservation

Admin displays all reservations

admin display reservations

User cancels reservation

user cancel

Admin displays all cancellations

admin display cancellations

Applications

We can use a similar system for bus, airline reservations, theatre ticket booking and Library Management i.e It will be used wherever there is need of booking or reserving.

Conclusion

We learnt to implement Object Oriented Programming Concepts like Encapsulation and Abstraction and File Handling Concept in this project.

railway-reservation-system's People

Contributors

sidhant-khamankar avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

railway-reservation-system's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.