Traveler's - Bus Ticket Booking System Using C Programming Language


Traveler’s” is a project made for bus ticket booking system which can be used in small ticket counters. For this project, 40 seater bus has been taken as reference. The passenger’s details along with staff details are saved in a file for securing the file for future use. For security purpose, this project has been made password protected, due to which only authorized person can have access to the program. To make ticket booking process faster and easier, graphical representation for availability of seat has been added to this project. The main motto of this project is to make digitalize the ticket booking process reducing the use of paper.


Project Features

The features of this project are as given below:

  • New records can be added easily. 
  • Employees details can be saved and modified at any time.
  • It saves the passenger’s information like named, destination and seat number and side.
  • It shows graphical representation for availability of seat i.e. green and red colors indicates that the seat is not booked and booked respectively.
  • Since it is password protected, no person other than admin can use this program, So, it is secure.
  • It produces beep sound in case of unauthorized person tries to unlock the program.
  • The files that stores the data provided to the program are separately saved in a specific directory. So there is no chance that the file will get lost.


How to download code?

  • Click here for source code.
  • New window will open where there is a source code of this project. You need to download all the files and place all of them in same folder.
  • Remember that this project runs in Turbo C++.


Demo of this game :

Check out the following video related to this project.


  

For more source code and tutorial, SUBSCRBE to my YouTube channel. 


Development platform

Computer programming language has been used to develop this project.

 

Compiler

Turbo C++ has been used as compiler in this project. The version of the the compiler used is 3.7.8.9.


Header files used

The header files used in this project are as follows :

  1. Conic
  2. Ctype
  3. Dos
  4. Graphics
  5. Stdio
  6. Stdlib
  7. String

Library functions

The following library functions has been used :

  1. Under conio header file
    1. Clrscr
    2. Getch
  2. Under ctype header file
    1. Isalpha
    2. Isdigit
  3. Under dos header file
    1. Gotoxy
  4. Under graphics header file
    1. Arc
    2. Circle
    3. Closegraph
    4. Exit
    5. Floodfill
    6. Initgraph
    7. Line
    8. Outtextxy
    9. Rectangle
    10. Setcolor
    11. Setfillstyle
    12. Settextstyle
    13. System
  5. Under stdio header file
    1. Fclose
    2. Fopen
    3. Fread
    4. Fwrite
    5. Fflush
    6. Printf
    7. Remove
    8. Rename
    9. Rewind
    10. Scanf
  6. Under stdlib header file
    1. Delay
  7. Under string header file
    1. Atoi
    2. Strcat
    3. Strcmp
    4. Stcpy
    5. Strlen
    6. Strupr
  8. sound
  9. nosound


Concepts used

Topics/ concepts of this language that you need to know for making this type of game :

  1. Array
  2. Function
  3. File handling
  4. For looping statement
  5. Graphics
  6. If else conditional statement
  7. Preprocessor
  8. Structure
  9. Switch case
  10. While looping statement

Code Description

Dos command has been included in this project for the creation of files and folder in a specific location. This is done in order to reduce the file redundancy. For adding dos command, library function called system can be used.

For the representation of whether a seat has been booked, graphics has been included for interactive user interface. When representing in graphical mode, first of all, file is opened and specific points are flood-filled with red color based on the fact that the seat number is already present in a file. 

Here, I have placed total of five destination in a code, which is the bad part, and to change the destinations, code must be manipulated. Those destination includes Haibung, Melamchi, Damak, Tibeni and Itahari. Since, this was my project of first semester, so I did not realize at that time. 
  
Booking of past date and reserved seats is blocked which is simple done by checking the current date and the content of data stored in a file respectively.
 
Password need to be entered before using this program. In case a password is entered for three times incorrectly in a row produces a sound (like siren) to alert admin. 

Tips :  when storing string data in a file, store it only after changing them either in upper case or lower case. Because this makes ease in string comparison and reduction of data redundancy. 

No comments:

Post a Comment

Article Ad1