Skip to content

Railway booking application on qt platform

License

MIT, GPL-3.0 licenses found

Licenses found

MIT
LICENSE
GPL-3.0
QT_LICENSE
Notifications You must be signed in to change notification settings

sensai99/RAILWAY-BOOKING-APPL

Repository files navigation

RAILWAY-BOOKING-APPL

CircleCI

BOOK MY JOURNEY

This projects creates an application which helps the user to
book a ticket for the journey.The main part of the project is to
maintain concurrency when multiple users request for booking the
same seat.

Getting started:

Prerequisites

You need to have a git environment in your local machine.
Enter these commands

sudo apt install git

You need to have QT work frame to run the project.Download it
from this link:

https://www.qt.io

After install run these commands:

sudo apt-get install libqt4-dev

Make sure you have proper version of it

Cloning and Developing

A quick introduction of the minimal setup you need to get a
copy of the project and running.Run the

Run BookMyJourney.pro using qt.

Build

Go to the directory where the project is extreacter and run this
command to build the project.

qmake -project && qmake && make

We can run it in qt also after opening the BookMyJourney.pro
A run buttun is present in the left bottom of the window or else
CTRL+R will also run the project

To run the project we should first establish a connection to server,for that make sure that the server is running.To run the server in your machine run server.cpp Run these commands :

g++ server.cpp -pthread -o output
./output

screenshot from 2019-02-28 21-29-30__01

Testing and Features:

This application is a sample of ticket booking system with core
concept of concurrency when multiple users try to book same ticket
at the same time.When we run the project first dialog requires us toi
enter the account details to Log into the app.If the user doesn’t
have an account he can create it also.

screenshot from 2019-02-28 21-33-50__01

After log in ,user needs to select the origin and destination of

his/her journey and the date of the journey.Booking is allowed only
upto same date of next month.

screenshot from 2019-02-28 21-34-07__01

After that he/she needs to select the seats he/she like.A disabled
seats means that it already booked and seats selected will be
displayed in red color.

screenshot from 2019-02-28 21-34-42__01

After that user needs to confirm the terms and conditions and make
payment.A timer will be started and he/she should should make
payment before the timer ends or else the tickets will be lost.After
selecting the confirm booking that seats will be locked and before
the timer ends these seats cannot be booked by anyone.

screenshot from 2019-02-28 21-34-53__01

When the server goes off accidentally the data is in the server backed up to into two files
named 1.details.txt -> which stores the details of user and his journey 2.seats.txt -> which stores the seatmatrices.

Testing

File test.cpp runs the test and makes sure that concurrency in the server is working fine.
It creates multiple users who try to book same ticket and ensures that only one user books it.
g++ test.cpp -pthread -o output
./output

Coding style tests:

These tests test where there are mistakes in
coding style in our project.Coding style used in this project is Google coding style.
To run the following test run this command
python cpplint.py <c++filename>

About

Railway booking application on qt platform

Resources

License

MIT, GPL-3.0 licenses found

Licenses found

MIT
LICENSE
GPL-3.0
QT_LICENSE

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published