You are on page 1of 13

Micro-Project

Report

Title:-Airline Reservation System

 BRIEF DESCRIPTION

Object-Oriented Programming (OOP) is a fundamental computer science paradigm that


revolves around organizing and modeling software systems based on objects, which are
instances of classes. In OOP, data and behavior are encapsulated within these objects,
promoting concepts like inheritance, polymorphism, and encapsulation. OOP promotes code
reusability, modularity, and a more intuitive representation of real-world entities in software
development, making it a powerful and widely used approach in creating robust,
maintainable, and scalable applications.

 INTRODUCTION

Object-Oriented Programming (OOP) is a foundational paradigm in the world of computer


science and software development. It provides a structured approach to designing, organizing,
and building software systems, emphasizing the use of objects, classes, and encapsulation to
model and solve real-world problems. OOP promotes modularity, reusability, and a clear
separation of concerns, making it a vital concept for anyone looking to understand the art of
crafting robust, efficient, and maintainable software. In this subject, we will delve into the
core principles and techniques of OOP, exploring how it shapes the modern software
landscape and equipping you with the skills to harness its power in your programming
journey.

 AIM OF PROJECT

The aim of the airline reservation system program is to provide a user-friendly, efficient, and
secure platform for travelers to easily book and manage their flight reservations. This system

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


should offer real-time access to flight information, seat availability, and pricing, while also
facilitating the payment process. Additionally, it should help airline staff and administrators
manage flight schedules, seat assignments, and passenger data effectively. Overall, the
program aims to streamline the airline reservation process, enhancing the customer
experience and operational efficiency.

 COURCE OUTCOME ACHIEVED:-

Course Outcome: Upon completing the Object-Oriented Programming (OOP) course,


students will be able to design and implement an Airline Reservation System that
demonstrates the following skills and knowledge:

Object-Oriented Analysis and Design: Students will be able to analyze real-world problems
and design a system using object-oriented principles, including the identification of classes,
objects, attributes, and methods.

Class and Object Creation: Students will have the ability to create and instantiate classes
and objects in a manner that models the entities and behaviors

Inheritance and Polymorphism: Students will understand the concept of inheritance and
polymorphism and apply them in the system to achieve code reusability and flexibility.

Encapsulation and Data Hiding: Students will employ encapsulation and data hiding
techniques to protect the integrity of data and create well-structured classes.

Abstraction and Interface Implementation: Students will use abstract classes and
interfaces to define common behaviors and ensure consistent implementation across different
components of the system.

Exception Handling: Students will be capable of implementing exception handling to


manage errors and unexpected situations in the airline reservation system.

File Handling: Students will demonstrate proficiency in reading and writing data to files,
which is crucial for storing and retrieving reservation information.

User Interface Development: Students will create a user-friendly interface for the airline
reservation system, allowing users to interact with the system efficiently.

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


System Testing and Debugging: Students will conduct testing and debugging procedures to
identify and rectify issues in the system, ensuring its reliability.

Documentation: Students will be able to document their code and system design effectively,
making it understandable to other developers and maintainable for future enhancements.

System Integration: Students will integrate various components of the airline reservation
system, such as flight scheduling, seat availability, and passenger information, into a cohesive
and functional whole.

Code Efficiency and Optimization: Students will optimize their code for performance,
considering factors like memory usage and execution speed.

Team Collaboration: Students will have experience working collaboratively in a team to


develop a complex software system, reflecting real-world software development scenarios.

By achieving these outcomes, students will be well-prepared to apply object-oriented


programming principles to real-world projects and create efficient, maintainable, and user-
friendly software for airline reservation systems.

 LITERATURE REVIEW:-

A literature review on the topic of airline reservation systems implemented using Object-
Oriented Programming (OOP) reveals several key trends, concepts, and best practices in the
field. The review encompasses both academic research and industry perspectives,
highlighting the evolution and significance of OOP in airline reservation systems.

 ACTUAL METHODOLOGY FOLLOWED

Creating an airline reservation system program in Object:- Oriented Programming (OOP)


involves several steps. Here's a simplified methodology:

Requirements Analysis:- Understand the requirements of the airline reservation system,


including user needs, features, and constraints.

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


Object-Oriented Analysis:- Identify the main entities and objects in the system, like
Passengers, Flights, Reservations, and Airlines. Define the relationships between these
objects.

Class Design:- Create classes for each identified object, such as Passenger, Flight, and
Reservation. Define attributes (data members) and methods (functions) for each class.

Inheritance and Polymorphism:- Utilize inheritance to model relationships between


classes, e.g., a specific type of flight can inherit from a general Flight class.Implement
polymorphism, enabling objects of different classes to be treated uniformly.

Encapsulation:- Ensure data hiding and access control by using access specifiers (public,
private, protected) to protect the integrity of class data.

 CODE

#include<iostream.h>
#include<conio.h>
class registration;
class details
{
public:
char fname[20],lname[20],gender[20],address[50];
int phone_no,age,c_id;
void information()
{
clrscr();
cout<<"--------------------Your Information--------------------"<<endl;
cout<<"Enter the Costomer ID=";
cin>>c_id;
cout<<"Enter your first name=";
cin>>fname;

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


cout<<"Enter your last name=";
cin>>lname;
cout<<"Enter the age=";
cin>>age;
cout<<"Enter the address=";
cin>>address;
cout<<"Gender=";
cin>>gender;
cout<<"Your details are saved with us"<<endl;
}
friend void bill(registration r,details d);
};
class registration
{
public:
int ch,choice1;
long total;
static long charges;
void flights(int no)
{
cout<<"\t\t----Welcome to airlines----"<<endl;
cout<<"1.mumbai\n2.kolkata\n3.pune"<<endl;
cout<<"Enter the number of city do you want to book the flight=";
cin>>ch;
switch(ch)
{
case 1:
cout<<"\t\t----Welcome to air india----"<<endl;
cout<<"Following are the flights:-"<<endl;
cout<<"\n1.aid - 412"<<endl;
cout<<"\t\t09 - 10 - 2023 9:00 AM 7hrs Rs.14000"<<endl;
cout<<"\n2.aid - 413"<<endl;
cout<<"\t\t10 - 10 - 2023 4:00 AM 8hrs Rs.10000"<<endl;
cout<<"\n3.aid - 414"<<endl;

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


cout<<"\t\t12 - 2 - 2023 11:00 AM 9hrs Rs.9000"<<endl;
cout<<"Select the flight you want to book=";
cin>>choice1;
if(choice1==1)
{
total=14000;
charges=no*14000;
cout<<"You have successfully booked the flight aid - 412"<<endl;
cout<<"You can go back to menu and take the ticket"<<endl;
}
else if(choice1==2)
{
total=10000;
charges=no*10000;
cout<<"You have successfully booked the flight aid - 413"<<endl;
cout<<"You can go back to menu and take the ticket"<<endl;
}
else if(choice1==3)
{
total=9000;
charges=no*9000;
cout<<"You have successfully booked the flight aid - 414"<<endl;
cout<<"You can go back to menu and take the ticket"<<endl;
}
else
{
cout<<"Invalid input , shifting to the prevous menu="<<endl;
flights(no);
}
break;
case 2:
cout<<"\t\t----Welcome to air india----"<<endl;
cout<<"your comfort is our priority. Enjoy the journey!"<<endl;
cout<<"Following are the flights"<<endl;

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


cout<<"\n1.AA - 198"<<endl;
cout<<"\t\t10 - 10 - 2023 2:00 PM 12hrs Rs.34000"<<endl;
cout<<"\n2.AA - 158"<<endl;
cout<<"\t\t11 - 10 - 2023 6:00 AM 20hrs Rs.29000"<<endl;
cout<<"\n3.CA - 208"<<endl;
cout<<"\t\t14 - 01 - 2022 12:00 AM 21hrs Rs.40000"<<endl;
cout<<"Select the flight you want to book=";
cin>>choice1;
if(choice1==1)
{
total=34000;
charges=no*34000;
cout<<"You have successfully booked the flight AA - 198"<<endl;
cout<<"You can go back to menu and take the ticket"<<endl;
}
else if(choice1==2)
{
total=29000;
charges=no*29000;
cout<<"You have successfully booked the flight AA - 158"<<endl;
cout<<"You can go back to menu and take the ticket"<<endl;
}
else if(choice1==3)
{
total=40000;
charges=no*40000;
cout<<"You have successfully booked the flight AA - 208"<<endl;
cout<<"You can go back to menu and take the ticket"<<endl;
}
else
{
cout<<"Invalid input , shifting to the prevous menu="<<endl;
flights(no);
}

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


break;
case 3:
cout<<"\t\t----Welcome to air india----"<<endl;
cout<<"your comfort is our priority. Enjoy the journey!"<<endl;
cout<<"Following are the flights"<<endl;
cout<<"\n1.Indigo - 789"<<endl;
cout<<"\t\t12 - 01 - 2022 10:00 AM 14hrs Rs.44000"<<endl;
cout<<"Select the flight you want to book=";
cin>>choice1;
if(choice1==1)
{
total=44000;
charges=no*44000;
cout<<"You have successfully booked the flight Indigo - 789"<<endl;
cout<<"You can go back to menu and take the ticket"<<endl;
}
else
{
cout<<"Invalid input , shifting to the prevous menu="<<endl;
flights(no);
}
break;
default:
cout<<"invalid input"<<endl;
}
}
friend void bill(registration r,details d);
};
long registration::charges=0;
void bill(registration r,details d)
{
clrscr();
cout<<endl;
cout<<"\t\t----Welcome to air india----"<<endl;

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


cout<<"customer id:"<<d.c_id<<endl;
cout<<"Passenger name:"<<d.fname<<" "<<d.lname<<endl;
cout<<"Passengre age:"<<d.age<<endl;
cout<<"Passengre address:"<<d.address<<endl;
cout<<"Passengre Gender:"<<d.gender<<endl;
cout<<"ticket price:"<<r.total<<endl;
cout<<"\nTotal amount:"<<r.charges<<endl;
cout<<"\n\4\4 Your comfort is our priority.\4\4\n\4\4 Enjoy the journey! \4\4"<<endl;
}
void main()
{
int no,i;
clrscr();
details d;
registration r;
cout<<"How many members to book flight=";
cin>>no;
clrscr();
r.flights(no);
for(i=1;i<=no;i++)
{
d.information();
bill(r,d);

}
getch();
}

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


 OUTPUT:-

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


 DEVELOPED/LEARNING OUT OF THIS PROJECT:-

Developing an airline reservation system as part of your Object:-Oriented Programming


(OOP) subject offers numerous learning opportunities and benefits:

Object-Oriented Concepts:- You'll gain a deep understanding of OOP principles such as


classes, objects, inheritance, and encapsulation. These concepts are essential in software
development.

Code Reusability:- Learning how to create reusable code components and designing classes
that can be used in various parts of your program.

Modularity:- Breaking down your system into manageable, modular components, each
responsible for a specific function, which makes your program more organized and
maintainable.

Polymorphism:- Implementing polymorphism through methods like overriding and


overloading, which is crucial in OOP.

Inheritance:- Using inheritance to model relationships between different entities in your


airline reservation system, like passengers and flights.

Encapsulation:- Applying the concept of encapsulation to protect the data and restrict access
to certain parts of your program.

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


 APPLICATION OF THIS PROJECTS

An airline reservation system program implemented using Object:- Oriented


Programming (OOP) has various advantages, including modularity, reusability, and
maintainability. Here are some key applications of OOP in an airline reservation system:

Modular Design:- OOP allows you to break down the system into manageable modules or
classes, such as Passenger, Flight, Reservation, and Payment. This makes it easier to develop
and maintain different components of the system.

Inheritance:- Inheritance can be used to model different types of flights (e.g., domestic,
international) or passengers (e.g., economy, business class) by creating subclasses that inherit
common properties and methods from a base class.

Polymorphism:- Polymorphism enables you to handle different types of flights or


reservations through a common interface. For example, you can have a common method like
"bookTicket()" that behaves differently for different flight types.

Encapsulation:- You can encapsulate the internal details of classes, making them more
secure and preventing unauthorized access. For instance, sensitive passenger information can
be encapsulated within a Passenger class.

Abstraction:- You can abstract away complex details and present a simplified interface to the
users or other parts of the system. This is useful for displaying flight details, availability, and
pricing to customers.

Data Validation:- OOP allows you to implement data validation rules within classes. For
instance, you can validate user inputs for reservation requests to ensure they meet specific
criteria, such as available seats, correct passenger details, and valid payment information.

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC


 CONCLUSION

In conclusion, Object-Oriented Programming (OOP) is a powerful and widely-used paradigm


in the world of software development. OOP promotes modularity, reusability, and
encapsulation, allowing developers to create more organized and efficient code. Through the
use of classes, objects, and the four fundamental OOP principles (encapsulation, inheritance,
polymorphism, and abstraction), programmers can design robust and maintainable systems.
By understanding and applying these principles effectively, developers can produce software
that is not only functional but also scalable and adaptable to changing requirements. OOP is a
cornerstone of modern software engineering, and mastering it is essential for any aspiring
programmer.

SHARAD INSTITUTE OF TECHNOLOGY POLYTECHNIC

You might also like