SlideShare a Scribd company logo
Visual C++ Program for the
Implementation of Bus Reservation
System | IT1253 - Software
Engineering Laboratory
[1:55 AM | 0 comments ]
Tweet
ABSTRACT:
The aim of our project is to develop a software for implementing “Bus Reservation System” using
VISUAL C++. The development of this particular project is to perform the formalities / operation in
Bus Reservation System. This project deals with the customer details in its process.
The customers are instructed in an easy way to feel comfortable with the processing.
REQUIREMENT ANALYSIS:
SOFTWARE REQUIREMENTS:
Front End : „C++‟ language.
Back End : File Management System (using Dat files)
Operating system: Any Operating System (Window or Linux)
HARDWARE REQUIREMENTS:
Processor : 3.06 GHZ operating speed.
Hard Disk : 80GB Capacity.
RAM : 256MB
Monitor : CRT 17‟
Mouse : OPTICAL
Keyboard : Alphanumeric keys.
The specified hardware requirements are the minimum requirements that are needed
to implement in the project.
FUNCTIONAL REQUIREMENTS:
As mentioned in the requirements, the Hospital Management system involves the following
function or process
Bus Reservation System consists of four modules. They are
Module 1: Insertion Module
Module 2: Deletion Module
Module 3: Display Module
Module 4: Exit
Insert Module:
In this module the user enters the detail of the patient.
Delete Module:
In this module the user deletes the detail of the patient.
Display Module:
This module display the detail of the patient.
Exit:
In this module the user can quit from the project.
SOURCE CODE:
#include<windows.h>
#include<sql.h>
#include<sqlext.h>
#include<stdio.h>
#define TEST_LEN 50
int main()
{
int c;
char ch='y';
SQLINTEGER totalseats,seatsrequired,passengerage;
SQLCHAR busname[TEST_LEN+1], passengername[TEST_LEN+1],
destination[TEST_LEN+1];
HENV hEnv=NULL;
HDBC hDBC=NULL;
HSTMT hStmt=NULL;
UCHAR szSqlStr[]="insert into
ninerow(busname,passengername,passengerage,destination,totalseats,seatsrequired)
values(?,?,?,?,?,?)";
UCHAR szSqlStr1[]="delete*from ninerow where passengername = ?";
UCHAR szSqlStr2[]="select*from ninerow";
UCHAR szDSN[SQL_MAX_DSN_LENGTH]="ninerow ";
UCHAR *szUID=NULL;
UCHAR *szPasswd=NULL;
UCHAR szModel1[128], szModel2[128], szModel3[128], szModel4[128], szModel5[128],
szModel6[128];
SDWORD cbModel1,cbModel2,cbModel3,cbModel4,cbModel5,cbModel6;
SDWORD cbtest=SQL_NTS;
RETCODE retcode;
do
{
printf("t BUS RESERVATION SYSTEMn");
printf("t 1.entry modulet2.cancellation modulet 3.display modulen");
printf("entr ur optionn");
scanf("%d",&c);
switch(c)
{
case 1:
printf("tEntry modulen");
printf("Enter the bus namen");
scanf("%s",&busname);
printf("entr te passenger namen");
scanf("%s",&passengername);
printf("Enter the passenger agen");
scanf("%d",&passengerage);
printf("destinationn");
scanf("%s",&destination);
printf("total seatsn");
scanf("%d",&totalseats);
printf("seats reqdn");
scanf("%d",&seatsrequired);
SQLAllocEnv(&hEnv);
SQLAllocConnect(hEnv,&hDBC);
retcode=SQLConnect(hDBC,szDSN,SQL_NTS,szUID,SQL_NTS,szPasswd,SQL_NTS);
if(retcode==SQL_SUCCESS||retcode==SQL_SUCCESS_WITH_INFO)
{
retcode=SQLAllocStmt(hDBC,&hStmt);
retcode=SQLPrepare(hStmt,szSqlStr,sizeof(szSqlStr));
SQLBindParameter(hStmt,1,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR,TEST_LEN,0,busna
me,0,&cbtest);
SQLBindParameter(hStmt,2,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR,TEST_LEN,0,passe
ngername,0,&cbtest);
SQLBindParameter(hStmt,3,SQL_PARAM_INPUT,SQL_C_LONG,SQL_INTEGER,1,0,&passengera
ge,0,&passengerage);
SQLBindParameter(hStmt,4,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR,TEST_LEN,0,destin
ation,0,&cbtest);
SQLBindParameter(hStmt,5,SQL_PARAM_INPUT,SQL_C_LONG,SQL_INTEGER,1,0,&totalseats,0
,&totalseats);
SQLBindParameter(hStmt,6,SQL_PARAM_INPUT,SQL_C_LONG,SQL_INTEGER,1,0,&seatsrequir
ed,0,&seatsrequired);
retcode=SQLExecute(hStmt);
printf("record is insertedn");
}
break;
case 2:
printf("t cancellation modulen");
SQLAllocEnv(&hEnv);
SQLAllocConnect(hEnv,&hDBC);
retcode=SQLConnect(hDBC,szDSN,SQL_NTS,szUID,SQL_NTS,szPasswd,SQL_NTS);
if(retcode==SQL_SUCCESS||retcode==SQL_SUCCESS_WITH_INFO)
{
retcode=SQLAllocStmt(hDBC,&hStmt);
retcode=SQLPrepare(hStmt,szSqlStr1,sizeof(szSqlStr1));
SQLBindParameter(hStmt,1,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR,TEST_LEN,0,passe
ngername,0,&cbtest);
printf("entr the passenger namen");
scanf("%s",&passengername);
retcode=SQLExecute(hStmt);
printf("record is deln");
}
break;
case 3:
printf("tdisplay modulen");
SQLAllocEnv(&hEnv);
SQLAllocConnect(hEnv,&hDBC);
retcode=SQLConnect(hDBC,szDSN,SQL_NTS,szUID,SQL_NTS,szPasswd,SQL_NTS);
if(retcode==SQL_SUCCESS||retcode==SQL_SUCCESS_WITH_INFO)
{
retcode=SQLAllocStmt(hDBC,&hStmt);
retcode=SQLPrepare(hStmt,szSqlStr2,sizeof(szSqlStr2));
retcode=SQLExecute(hStmt);
SQLBindCol(hStmt,1,SQL_C_CHAR,szModel1,sizeof(szModel1),&cbModel1);
SQLBindCol(hStmt,2,SQL_C_CHAR,szModel2,sizeof(szModel2),&cbModel2);
SQLBindCol(hStmt,3,SQL_C_CHAR,szModel3,sizeof(szModel3),&cbModel3);
SQLBindCol(hStmt,4,SQL_C_CHAR,szModel4,sizeof(szModel4),&cbModel4);
SQLBindCol(hStmt,5,SQL_C_CHAR,szModel5,sizeof(szModel5),&cbModel5);
SQLBindCol(hStmt,6,SQL_C_CHAR,szModel6,sizeof(szModel6),&cbModel6);
retcode=SQLFetch(hStmt);
printf("tbnametpnametpagetdestttotaltseatsnn");
while(retcode==SQL_SUCCESS||retcode==SQL_SUCCESS_WITH_INFO)
{
printf("t%st%st%st%st%st%sn",szModel1,szModel2,szModel3,szModel4,szModel5,szModel6);
retcode=SQLFetch(hStmt);
}
}
break;
}
flushall();
printf("Do u wan to continue: ");
scanf("%s",&ch);
}while(ch=='y');
return 0;
}
CONCLUSION:
The project we have done here is “BUS RESERVATION SYSTEM” using C language.
In this project we have designed a software to implement the customer details that any user can
perform
it in a simple and a better way. This way of format helps us to have clear database.
NLINE BUS RESERVATION SYSTEM
ONLINE BUS RESERVATION SYSTEM
DATA STRUCTURES PROJECT.pptx (Size: 2.05 MB / Downloads: 16)
PROJECT PLAN:
1)Gathering the required information.
2) considering the rules which had given by faculty
3)Source – Net : Red bus.in/APS-RTC
4)Review-1
5)Project Submission
REVIEW 1:
INTRODUCTION
Our project and implimentation is to computerize traveling company to manage
data, so that all the transactions become fast and there should not be any error
in transaction like calculation mistake, bill generation and other things. It
replaces all the paper work. It keeps records of all bills also, giving to ensure
100% successful implementation of the computerized Bus reservation system.
Abstract:
The objective was two-fold - to ensure that the Customers don’t have to leave
the confines of their comfort to book a ticket, and to help them get a ticket
when they need it the most.
The internet was being voted as a medium people couldn’t do without. PC and
net penetration was increasing not only in urban areas, but also in rural India.
Also, people were getting used to booking tickets for travel using IRCTC and
private airline websites. So, why not buses?
Online system provides real time quotations, real time bus booking services for
round trips, multiple payment channels, cost comparison,last minute booking,
an in-house call center and even home delivery of tickets.
Online system provides real time quotations, real time bus booking services for
round trips, multiple payment channels, cost comparison,last minute booking,
an in-house call center and even home delivery of tickets.
Back-end database:
A back-end database is a database that is accessed by users indirectly through
an external application .
This is rather than by application programming stored within the database itself
or by low level manipulation of the data
A back-end database stores data but does not include end-user application
elements such as stored queries, forms, macros or reports.
Front end database:
1) Booking
2) Cancelling
3) From: To:
Date of journey:
Mode of payments
Hardware Requirements:
PC with core 2 duo or more proccessor
512 MB RAM or above.
180 GB Hard Disk or above.
Software Requirements:
Operating system : Windows XP (or) 7.
Dev c++ & Code blocks compilers.
Microsoft word and powerpoint
ALGORITHM:
1) Taking a class named as a.
2) Declaring the variables and arrays as busn[5], driver[10], arrival[5],
depart[5], from[10], to[10], seat[8][4][10].
3) And in public of the class we are giving member functions as
void install();
void allotment();
void empty();
void show();
void avail();
void position(int i);
4) And giving that maximum buses available are 10.
5) And now with respect to installing function we gave few options to enter in
the run time which will gives to enter the bus details from back end of the
system like bus no, Driver's name, Arrival time, Departure time, from and to .
6) And now with respect to allotment function we can allot seats for customer
according to their preferable seat numbers.
7)And the empty function shows that the seats are empty in the bus.
8) And the show function shows that the how many seats available in the given
bus.And which seats are all ready reserved in the bus.
Step 2:
Second step is that we have to install the number of busses that we have to
provide for customers and this is done by the back end system and in this
function we have to give details of the bus like bus num,Drivers name,Arrival
time ,departure time,From and To.

More Related Content

Similar to Visual c

Bus transportation query report
Bus transportation query reportBus transportation query report
Bus transportation query report
Sudhanshu Moolya
 
Online Bus Reservation System
Online Bus Reservation SystemOnline Bus Reservation System
Online Bus Reservation System
Siva Rushi
 
Online Bus Reservatiom System
Online Bus Reservatiom SystemOnline Bus Reservatiom System
Online Bus Reservatiom System
Nikhil Vyas
 
Final year project working documentation 2020
Final year project working documentation 2020Final year project working documentation 2020
Final year project working documentation 2020
Vikram Singh
 
Kairos aarohan
Kairos  aarohanKairos  aarohan
Kairos aarohan
berasrujana
 
A miało być tak... bez wycieków
A miało być tak... bez wyciekówA miało być tak... bez wycieków
A miało być tak... bez wycieków
Konrad Kokosa
 
Online Bus Reservation System
Online Bus Reservation SystemOnline Bus Reservation System
Online Bus Reservation System
A-Tech and Software Development
 
Introduction to WSO2 Data Analytics Platform
Introduction to  WSO2 Data Analytics PlatformIntroduction to  WSO2 Data Analytics Platform
Introduction to WSO2 Data Analytics Platform
Srinath Perera
 
Airline Reservation System
Airline Reservation SystemAirline Reservation System
Airline Reservation System
Sahil Talwar
 
.net programming using asp.net to make web project
 .net programming using asp.net to make web project .net programming using asp.net to make web project
.net programming using asp.net to make web project
Kedar Kumar
 
Movie Ticket Booking Website Project Presentation
Movie Ticket Booking Website Project PresentationMovie Ticket Booking Website Project Presentation
Movie Ticket Booking Website Project Presentation
Avinandan Ganguly
 
Report on online bus management
Report on online bus managementReport on online bus management
Report on online bus management
Naeem Ahmad
 
ideas.doc
ideas.docideas.doc
ideas.docbutest
 
Being HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on PurposeBeing HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on Purpose
Aman Kohli
 
Online Bus Reservation
Online Bus ReservationOnline Bus Reservation
Online Bus Reservation
Astha Patel
 
21091F003.ppt1.pptx
21091F003.ppt1.pptx21091F003.ppt1.pptx
21091F003.ppt1.pptx
Arif566836
 
AIRSIDE project PPT
AIRSIDE project PPTAIRSIDE project PPT
AIRSIDE project PPT
Arif566836
 
Indian railway prs system
Indian railway   prs systemIndian railway   prs system
Indian railway prs system
Atindya K Ghosh
 
Software Engineering ppt
Software Engineering pptSoftware Engineering ppt
Software Engineering pptshruths2890
 
Railways reservation system using socket programming
Railways reservation system using socket programmingRailways reservation system using socket programming
Railways reservation system using socket programming
Utkarsh Sharma
 

Similar to Visual c (20)

Bus transportation query report
Bus transportation query reportBus transportation query report
Bus transportation query report
 
Online Bus Reservation System
Online Bus Reservation SystemOnline Bus Reservation System
Online Bus Reservation System
 
Online Bus Reservatiom System
Online Bus Reservatiom SystemOnline Bus Reservatiom System
Online Bus Reservatiom System
 
Final year project working documentation 2020
Final year project working documentation 2020Final year project working documentation 2020
Final year project working documentation 2020
 
Kairos aarohan
Kairos  aarohanKairos  aarohan
Kairos aarohan
 
A miało być tak... bez wycieków
A miało być tak... bez wyciekówA miało być tak... bez wycieków
A miało być tak... bez wycieków
 
Online Bus Reservation System
Online Bus Reservation SystemOnline Bus Reservation System
Online Bus Reservation System
 
Introduction to WSO2 Data Analytics Platform
Introduction to  WSO2 Data Analytics PlatformIntroduction to  WSO2 Data Analytics Platform
Introduction to WSO2 Data Analytics Platform
 
Airline Reservation System
Airline Reservation SystemAirline Reservation System
Airline Reservation System
 
.net programming using asp.net to make web project
 .net programming using asp.net to make web project .net programming using asp.net to make web project
.net programming using asp.net to make web project
 
Movie Ticket Booking Website Project Presentation
Movie Ticket Booking Website Project PresentationMovie Ticket Booking Website Project Presentation
Movie Ticket Booking Website Project Presentation
 
Report on online bus management
Report on online bus managementReport on online bus management
Report on online bus management
 
ideas.doc
ideas.docideas.doc
ideas.doc
 
Being HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on PurposeBeing HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on Purpose
 
Online Bus Reservation
Online Bus ReservationOnline Bus Reservation
Online Bus Reservation
 
21091F003.ppt1.pptx
21091F003.ppt1.pptx21091F003.ppt1.pptx
21091F003.ppt1.pptx
 
AIRSIDE project PPT
AIRSIDE project PPTAIRSIDE project PPT
AIRSIDE project PPT
 
Indian railway prs system
Indian railway   prs systemIndian railway   prs system
Indian railway prs system
 
Software Engineering ppt
Software Engineering pptSoftware Engineering ppt
Software Engineering ppt
 
Railways reservation system using socket programming
Railways reservation system using socket programmingRailways reservation system using socket programming
Railways reservation system using socket programming
 

Recently uploaded

678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 

Recently uploaded (20)

678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 

Visual c

  • 1. Visual C++ Program for the Implementation of Bus Reservation System | IT1253 - Software Engineering Laboratory [1:55 AM | 0 comments ] Tweet ABSTRACT: The aim of our project is to develop a software for implementing “Bus Reservation System” using VISUAL C++. The development of this particular project is to perform the formalities / operation in Bus Reservation System. This project deals with the customer details in its process. The customers are instructed in an easy way to feel comfortable with the processing. REQUIREMENT ANALYSIS: SOFTWARE REQUIREMENTS: Front End : „C++‟ language. Back End : File Management System (using Dat files) Operating system: Any Operating System (Window or Linux) HARDWARE REQUIREMENTS: Processor : 3.06 GHZ operating speed. Hard Disk : 80GB Capacity. RAM : 256MB Monitor : CRT 17‟ Mouse : OPTICAL Keyboard : Alphanumeric keys. The specified hardware requirements are the minimum requirements that are needed to implement in the project. FUNCTIONAL REQUIREMENTS:
  • 2. As mentioned in the requirements, the Hospital Management system involves the following function or process Bus Reservation System consists of four modules. They are Module 1: Insertion Module Module 2: Deletion Module Module 3: Display Module Module 4: Exit Insert Module: In this module the user enters the detail of the patient. Delete Module: In this module the user deletes the detail of the patient. Display Module: This module display the detail of the patient. Exit: In this module the user can quit from the project. SOURCE CODE: #include<windows.h> #include<sql.h> #include<sqlext.h> #include<stdio.h> #define TEST_LEN 50 int main() { int c; char ch='y'; SQLINTEGER totalseats,seatsrequired,passengerage; SQLCHAR busname[TEST_LEN+1], passengername[TEST_LEN+1], destination[TEST_LEN+1]; HENV hEnv=NULL; HDBC hDBC=NULL; HSTMT hStmt=NULL; UCHAR szSqlStr[]="insert into
  • 3. ninerow(busname,passengername,passengerage,destination,totalseats,seatsrequired) values(?,?,?,?,?,?)"; UCHAR szSqlStr1[]="delete*from ninerow where passengername = ?"; UCHAR szSqlStr2[]="select*from ninerow"; UCHAR szDSN[SQL_MAX_DSN_LENGTH]="ninerow "; UCHAR *szUID=NULL; UCHAR *szPasswd=NULL; UCHAR szModel1[128], szModel2[128], szModel3[128], szModel4[128], szModel5[128], szModel6[128]; SDWORD cbModel1,cbModel2,cbModel3,cbModel4,cbModel5,cbModel6; SDWORD cbtest=SQL_NTS; RETCODE retcode; do { printf("t BUS RESERVATION SYSTEMn"); printf("t 1.entry modulet2.cancellation modulet 3.display modulen"); printf("entr ur optionn"); scanf("%d",&c); switch(c) { case 1: printf("tEntry modulen"); printf("Enter the bus namen"); scanf("%s",&busname); printf("entr te passenger namen"); scanf("%s",&passengername); printf("Enter the passenger agen"); scanf("%d",&passengerage); printf("destinationn"); scanf("%s",&destination); printf("total seatsn"); scanf("%d",&totalseats); printf("seats reqdn"); scanf("%d",&seatsrequired);
  • 4. SQLAllocEnv(&hEnv); SQLAllocConnect(hEnv,&hDBC); retcode=SQLConnect(hDBC,szDSN,SQL_NTS,szUID,SQL_NTS,szPasswd,SQL_NTS); if(retcode==SQL_SUCCESS||retcode==SQL_SUCCESS_WITH_INFO) { retcode=SQLAllocStmt(hDBC,&hStmt); retcode=SQLPrepare(hStmt,szSqlStr,sizeof(szSqlStr)); SQLBindParameter(hStmt,1,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR,TEST_LEN,0,busna me,0,&cbtest); SQLBindParameter(hStmt,2,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR,TEST_LEN,0,passe ngername,0,&cbtest); SQLBindParameter(hStmt,3,SQL_PARAM_INPUT,SQL_C_LONG,SQL_INTEGER,1,0,&passengera ge,0,&passengerage); SQLBindParameter(hStmt,4,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR,TEST_LEN,0,destin ation,0,&cbtest); SQLBindParameter(hStmt,5,SQL_PARAM_INPUT,SQL_C_LONG,SQL_INTEGER,1,0,&totalseats,0 ,&totalseats); SQLBindParameter(hStmt,6,SQL_PARAM_INPUT,SQL_C_LONG,SQL_INTEGER,1,0,&seatsrequir ed,0,&seatsrequired); retcode=SQLExecute(hStmt); printf("record is insertedn"); } break; case 2: printf("t cancellation modulen"); SQLAllocEnv(&hEnv); SQLAllocConnect(hEnv,&hDBC); retcode=SQLConnect(hDBC,szDSN,SQL_NTS,szUID,SQL_NTS,szPasswd,SQL_NTS); if(retcode==SQL_SUCCESS||retcode==SQL_SUCCESS_WITH_INFO) { retcode=SQLAllocStmt(hDBC,&hStmt); retcode=SQLPrepare(hStmt,szSqlStr1,sizeof(szSqlStr1));
  • 5. SQLBindParameter(hStmt,1,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR,TEST_LEN,0,passe ngername,0,&cbtest); printf("entr the passenger namen"); scanf("%s",&passengername); retcode=SQLExecute(hStmt); printf("record is deln"); } break; case 3: printf("tdisplay modulen"); SQLAllocEnv(&hEnv); SQLAllocConnect(hEnv,&hDBC); retcode=SQLConnect(hDBC,szDSN,SQL_NTS,szUID,SQL_NTS,szPasswd,SQL_NTS); if(retcode==SQL_SUCCESS||retcode==SQL_SUCCESS_WITH_INFO) { retcode=SQLAllocStmt(hDBC,&hStmt); retcode=SQLPrepare(hStmt,szSqlStr2,sizeof(szSqlStr2)); retcode=SQLExecute(hStmt); SQLBindCol(hStmt,1,SQL_C_CHAR,szModel1,sizeof(szModel1),&cbModel1); SQLBindCol(hStmt,2,SQL_C_CHAR,szModel2,sizeof(szModel2),&cbModel2); SQLBindCol(hStmt,3,SQL_C_CHAR,szModel3,sizeof(szModel3),&cbModel3); SQLBindCol(hStmt,4,SQL_C_CHAR,szModel4,sizeof(szModel4),&cbModel4); SQLBindCol(hStmt,5,SQL_C_CHAR,szModel5,sizeof(szModel5),&cbModel5); SQLBindCol(hStmt,6,SQL_C_CHAR,szModel6,sizeof(szModel6),&cbModel6); retcode=SQLFetch(hStmt); printf("tbnametpnametpagetdestttotaltseatsnn"); while(retcode==SQL_SUCCESS||retcode==SQL_SUCCESS_WITH_INFO) { printf("t%st%st%st%st%st%sn",szModel1,szModel2,szModel3,szModel4,szModel5,szModel6); retcode=SQLFetch(hStmt); } } break;
  • 6. } flushall(); printf("Do u wan to continue: "); scanf("%s",&ch); }while(ch=='y'); return 0; } CONCLUSION: The project we have done here is “BUS RESERVATION SYSTEM” using C language. In this project we have designed a software to implement the customer details that any user can perform it in a simple and a better way. This way of format helps us to have clear database.
  • 7. NLINE BUS RESERVATION SYSTEM ONLINE BUS RESERVATION SYSTEM DATA STRUCTURES PROJECT.pptx (Size: 2.05 MB / Downloads: 16) PROJECT PLAN: 1)Gathering the required information. 2) considering the rules which had given by faculty 3)Source – Net : Red bus.in/APS-RTC 4)Review-1 5)Project Submission REVIEW 1: INTRODUCTION Our project and implimentation is to computerize traveling company to manage data, so that all the transactions become fast and there should not be any error in transaction like calculation mistake, bill generation and other things. It replaces all the paper work. It keeps records of all bills also, giving to ensure 100% successful implementation of the computerized Bus reservation system. Abstract: The objective was two-fold - to ensure that the Customers don’t have to leave the confines of their comfort to book a ticket, and to help them get a ticket when they need it the most. The internet was being voted as a medium people couldn’t do without. PC and net penetration was increasing not only in urban areas, but also in rural India. Also, people were getting used to booking tickets for travel using IRCTC and private airline websites. So, why not buses? Online system provides real time quotations, real time bus booking services for round trips, multiple payment channels, cost comparison,last minute booking, an in-house call center and even home delivery of tickets. Online system provides real time quotations, real time bus booking services for round trips, multiple payment channels, cost comparison,last minute booking, an in-house call center and even home delivery of tickets. Back-end database: A back-end database is a database that is accessed by users indirectly through an external application . This is rather than by application programming stored within the database itself or by low level manipulation of the data A back-end database stores data but does not include end-user application elements such as stored queries, forms, macros or reports. Front end database: 1) Booking
  • 8. 2) Cancelling 3) From: To: Date of journey: Mode of payments Hardware Requirements: PC with core 2 duo or more proccessor 512 MB RAM or above. 180 GB Hard Disk or above. Software Requirements: Operating system : Windows XP (or) 7. Dev c++ & Code blocks compilers. Microsoft word and powerpoint ALGORITHM: 1) Taking a class named as a. 2) Declaring the variables and arrays as busn[5], driver[10], arrival[5], depart[5], from[10], to[10], seat[8][4][10]. 3) And in public of the class we are giving member functions as void install(); void allotment(); void empty(); void show(); void avail(); void position(int i); 4) And giving that maximum buses available are 10. 5) And now with respect to installing function we gave few options to enter in the run time which will gives to enter the bus details from back end of the system like bus no, Driver's name, Arrival time, Departure time, from and to . 6) And now with respect to allotment function we can allot seats for customer according to their preferable seat numbers. 7)And the empty function shows that the seats are empty in the bus. 8) And the show function shows that the how many seats available in the given bus.And which seats are all ready reserved in the bus. Step 2: Second step is that we have to install the number of busses that we have to provide for customers and this is done by the back end system and in this function we have to give details of the bus like bus num,Drivers name,Arrival time ,departure time,From and To.