Pps Project

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

HOSPITAL MANAGEMENT SYSTEM A

CS107ES-PROGRAMMING FOR PROBLEM SOLVING PROJECT

Submitted in partial fulfilment of the requirements for The

Award of the degree of

BACHELOR OF TECHNOLOGY

In

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

By

A.PAVANI SIRI -22K81A0568

Under the esteemed guidance of

Mr.Avinash.S Asst.professor

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

St. MARTIN’S ENGINEERING COLLEGE


UGC AUTONOMOUS

NBA & NAAC A+ Accredited Dhulapally, Secunderabad – 500100


1.ABSTRACT

Railway ticket booking system is implemented by c programming. It is as


same as one can see while we are going for online ticket booking. The
following series of steps are being followed while booking a railway ticket
in this software-
1. The first step is to provide the total number of passengers and submit
all the necessary details of the passengers.
2. The next step is to enter the source and destination.
3. A list of available trains will appear. Among them, the user has to
choose one.
4. The ticket value will be evaluated. The system will ask to enter the
seat choice by showing the seat matrix. At last, a receipt will be
generated on the screen.
2. INTRODUCTION
1. If a passenger wants to reserve ticket(s), firstly, he/she has to log in to
the railway system with valid credentials. Then, the passenger has to
provide his/her details with the date of the journey, names of the passengers
and their details, origin station details, destination station details, and the
class type of the required ticket(s).
2. The railway reservation system will provide the available train-list,
and seat-availability, via-details.
3. To book a ticket passengers can pay through online/offline mode.
After successful payment of the ticket fare the system will generate the
ticket and pnr no. Will be given to the passenger. The system also keeps the
payment details and sends them to the system admin.
4. The passenger can check pnr status (confirmed, rac, waiting list) by
entering the pnr no. Into the reservation system.
5. The reservation system should store all train details, fare details (by
zone, class, and date wise), pnr no, date of trains, etc. This maintenance
should be controlled by the admin.
6. The system also has refund rules which have a date of reservation,
ticket fare, and refundable percentage. The passenger can simply cancel the
ticket(s) by entering the pnr no and a cancel ticket request. After
cancelation, the admin will pass the refundable amount to the system and
the system will give the refundable amount to the passenger.
System analysis
3. SYSTEM ANALYSIS

3.1 EXISTING
for an alternative other than Before this program was created, people
used to consult railway station for booking of their tickets they also used
to search going to railway station but could not find any solution.

3.2 PROPOSED
The user is prompted to select their source and destination to book their
tickets. This project has provided valuable insights into the variations of
ticket prices and number of trains available .By using structures and
functions we can book our tickets.
4. ALGORITHM
The algorithm for booking a ticket from Railway Reservation website is as follows:

Step 1 : Open the website for booking online ticket

Step 2 : Login to your account with your username and password. if you don't have an
account then you need to create it using your phone number or email id.

Step 3 : Enter your source and destination and date of journey and then check for
train's availability by selecting a suitable train.

Step 4 : If ticket are available then move forward by confirming your ticket by
entering your details and complete your payment.

Step 5 : Else if ticket is not available look for another suitable train and repeat step 4

Step 6: download your ticket for further use from your account menu.

Step 7 : Stop
5. SYSTEM REQUIREMENTS
Some of the requirements for this project are listed
below:

 Required arrival and departure places


 Number of seats
 Gender
 Age of the passenger
6. flowchart
#include <stdio.h>
#include <stdbool.h>

#define MAX_SEATS 100 // maximum number of seats on the train


#define TICKET_PRICE 100 // price of a regular ticket
#define DISCOUNT 0.5 // 50% discount for senior citizens
#define MAX_SENIOR_AGE 60 // age at which senior discount applies
#define THATKAL_SURCHARGE 10 // surcharge for Thatkal booking

int main() {
char name[50];
int age, numTickets;
double totalPrice;
char destination[50], arrival[50], departure[50];
bool isSenior = false, isThatkal = false;
int numSeats = MAX_SEATS;

// get user input


printf("Enter your name: ");
scanf("%s", name);

printf("Enter your age: ");


scanf("%d", &age);

printf("Enter your destination: ");


scanf("%s", destination);
printf("Enter your arrival: ");
scanf("%s", arrival);

printf("Enter your departure: ");


scanf("%s", departure);

printf("Enter the number of tickets: ");


scanf("%d", &numTickets);

printf("Do you want to book Thatkal? (y/n): ");


char c;
scanf(" %c", &c);
isThatkal = (c == 'y');
// check for senior discount
if (age >= MAX_SENIOR_AGE) {
isSenior = true;
}

// calculate total price


totalPrice = TICKET_PRICE * numTickets;
if (isSenior) {
totalPrice *= (1 - DISCOUNT);
}
if (isThatkal) {
totalPrice += THATKAL_SURCHARGE;
}
// check for available seats
if (numSeats < numTickets) {
printf("Sorry, only %d seats are available.\n", numSeats);
return 0;
}
else {
numSeats -= numTickets;
}

// display ticket details


printf("\nTicket details:\n");
printf("Passenger Name: %s\n", name);
printf("Passenger Age: %d\n", age);
printf("Destination: %s\n", destination);
printf("Arrival: %s\n", arrival);
printf("Departure: %s\n", departure);
printf("Number of tickets: %d\n", numTickets);
printf("Total price: %.2f\n", totalPrice);

return 0;
Output screens
Conclusions
In conclusion the train tickets booking system has provided valuable
insights to the customers . customer can book tickets online 24*7.The
project has emphasized the importance of using tickets booking system.

You might also like