0% found this document useful (0 votes)
38 views

Panimalar Engineering College Department of Cse E-Ticketing System Date

The document describes an e-ticketing system project that was implemented to overcome the tedious manual process of ticket maintenance in organizations. The main objectives of the project were to design, implement and test an e-ticketing system using various UML diagrams. Key modules created include ticket availability checking, online booking, and cancellation functionality. The project aims to provide customers complete ticket details and identify available tickets through separate modules for these functions.

Uploaded by

harini t
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Panimalar Engineering College Department of Cse E-Ticketing System Date

The document describes an e-ticketing system project that was implemented to overcome the tedious manual process of ticket maintenance in organizations. The main objectives of the project were to design, implement and test an e-ticketing system using various UML diagrams. Key modules created include ticket availability checking, online booking, and cancellation functionality. The project aims to provide customers complete ticket details and identify available tickets through separate modules for these functions.

Uploaded by

harini t
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 16

Reg. No.

211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

Ex: No: E-TICKETING SYSTEM

Date:

AIM:
To Design ,Implement and Test the E-ticketing system described in the given
problem statement .

PROBLEM STATEMENT
E-ticketing system gives an idea about how tickets are maintained in the particular websites.
The tickets that are to be booked, the tickets that are to be sold are maintained here. Further some
additional details of the current journey details that is available in the website are also given. E-
ticketing system in this project is done in an authorized way. The website has to be maintained
properly since the whole e-ticketing process can be improved. E-ticketing system in this project
gives the idea about how tickets are maintained in a particular concern. The ticket details which
includes the number of seats available and price.E-ticketing system in this project is understood
by going through the modules that is being involved
The main objective of this project is to overcome the work load and time consumption
which makes the maintenance of the tickets in an organization as a tedious process. This project
provides complete information about the details of the tickets to the customers. This project
identifies the amount of tickets available. Separate modules have been created for purchasing,
viewing ticket details, and payment details.
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

USECASE DIAGRAM:
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

CLASS DIAGRAM:
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

SEQUENCE DIAGRAM:
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

ACTIVITY DIAGRAM:
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

STATE CHART DIAGRAM:


Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

COMPONENT DIAGRAM:
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

DEPLOYMENT DIAGRAM:
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

IMPLEMENTATION & TESTING


Flight.java
import java.util.*;
public class Flight {
static Scanner s=new Scanner(System.in);
public static Availability a=new Availability();
public static int choice;
public static Booking b=new Booking();
public static Cancellation c=new Cancellation();
public static void main(String[] args)
{
while(choice!=4)
{
System.out.println("****************Welcome to Airline E-Ticket Booking
System*************");
System.out.println("Select your service");
System.out.println("1.Check Availability");
System.out.println("2.Book Ticket");
System.out.println("3.Cancel Ticket");
System.out.println("4.Exit");
choice=s.nextInt();
if(choice==1)
{
a.check_availability();
}
else if(choice==2)
{
b.start_booking(a);
}
else if(choice==3)
{
c.cancel(a,b);
}

}
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

Availability.java
import java.util.*;
public class Availability {
public int flight_no[]={2102,1521,4531,4654,8465};
public String flight_name[]={"SpiceJet","IndiGo ","KingFisher","Air Asia","Jet
Airways"};
public int avail[]={50,100,45,88,55};

public void check_availability()


{
System.out.println("The list of available Flights");
System.out.println("Flight No\tFlight Name\tAvailable");
for(int i=0;i<5;i++)
{
System.out.println(flight_no[i]+"\t\t"+flight_name[i]+"\t"+avail[i]);
}

Booking.java
import java.util.*;
public class Booking {
public static Scanner s=new Scanner(System.in);
public int f_no;
public String f_name;
public String p_name;
public String destination;
public int seats;
public Random r=new Random();
public int ticket_no;
public boolean found;
public int flight_index;
public void start_booking(Availability a)
{
int i;
found=false;
System.out.println("*************Welcome To Booking Wizard*************");
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

System.out.println("Enter the Flight No");


f_no=s.nextInt();
System.out.println("Enter the passenger name");
p_name=s.next();
System.out.println("Enter the Destination");
destination=s.next();
System.out.println("Enter the No.of seats required");
seats=s.nextInt();
System.out.println("We are processing your request....");
System.out.println("Please wait a while....");
for(i=0;i<5;i++)
{
if(a.flight_no[i]==f_no)
{
a.avail[i]=a.avail[i]-seats;
flight_index=i;
f_name=a.flight_name[i];
found=true;
}
}
if(found)
{
ticket_no=r.nextInt(5000)+1234;
System.out.println("***************DETAILS**************");
System.out.println("Passenger Name: "+p_name);
System.out.println("Flight Name: "+f_name);
System.out.println("Flight No: "+f_no);
System.out.println("Destination: "+destination);
System.out.println("No.of Seats booked: "+seats);
System.out.println("Your Ticket No:"+ticket_no);
}
else
System.out.println("You have entered WRONG Flight No.");

}
}

Cancellation.java
import java.util.*;
public class Cancellation{
public static Scanner s=new Scanner(System.in);
public int t_no;
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

public void cancel(Availability a,Booking b)


{
System.out.println("**********Welcome to Cancellation
Wizard*************");
System.out.println("Please enter your ticket no");
t_no=s.nextInt();
if(t_no==b.ticket_no)
{
System.out.println("Processing Your request.....");
System.out.println("Initiating Cancellation.....");
a.avail[b.flight_index]+=b.seats;
b.ticket_no=0;
System.out.println("Successfully processed your request");
}
else
System.out.println("OOPS!!! Seems like you have entered wrong ticket
number...");
}

OUTPUT:

****************Welcome to Airline E-Ticket Booking System*************


Select your service
1.Check Availability
2.Book Ticket
3.Cancel Ticket
4.Exit
1
The list of available Flights
Flight No Flight NameAvailable
2102 SpiceJet 50
1521 IndiGo 100
4531 KingFisher 45
4654 Air Asia 88
8465 Jet Airways 55
****************Welcome to Airline E-Ticket Booking System*************
Select your service
1.Check Availability
2.Book Ticket
3.Cancel Ticket
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

4.Exit
2
*************Welcome To Booking Wizard*************
Enter the Flight No
1521
Enter the passenger name
Rakesh
Enter the Destination
Chennai
Enter the No.of seats required
7
We are processing your request....
Please wait a while....
***************DETAILS**************
Passenger Name: Rakesh
Flight Name: IndiGo
Flight No: 1521
Destination: Chennai
No.of Seats booked: 7
Your Ticket No:1964
****************Welcome to Airline E-Ticket Booking System*************
Select your service
1.Check Availability
2.Book Ticket
3.Cancel Ticket
4.Exit
1
The list of available Flights
Flight No Flight NameAvailable
2102 SpiceJet 50
1521 IndiGo 93
4531 KingFisher 45
4654 Air Asia 88
8465 Jet Airways 55
****************Welcome to Airline E-Ticket Booking System*************
Select your service
1.Check Availability
2.Book Ticket
3.Cancel Ticket
4.Exit
3
**********Welcome to Cancellation Wizard*************
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

Please enter your ticket no


1964
Processing Your request.....
Initiating Cancellation.....
Successfully processed your request
****************Welcome to Airline E-Ticket Booking System*************
Select your service
1.Check Availability
2.Book Ticket
3.Cancel Ticket
4.Exit
1
The list of available Flights
Flight No Flight NameAvailable
2102 SpiceJet 50
1521 IndiGo 100
4531 KingFisher 45
4654 Air Asia 88
8465 Jet Airways 55
****************Welcome to Airline E-Ticket Booking System*************
Select your service
1.Check Availability
2.Book Ticket
3.Cancel Ticket
4.Exit
4
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

TEST REPORT 1

Product : E-TICKET BOOKING SYSTEM


Use Case : Check Availability

Test Test Case / Expected Actual Result Pass


Case Action To Result /Fail
ID Perform
1. cEnter into Display the list Displays Pass
“check of flights with
availability” it’s availability The list of available Flights
Flight No FlightName Available
2102 SpiceJet 50
1521 IndiGo 100
4531 KingFisher 45
4654 Air Asia 88
8465 Jet Airways 55

2 Pressed 4 Exits from the Exit Pass


system

TEST REPORT 2

Product : E-Ticket Booking System


Use Case : Book ticket

Test Test Case / Expected Result Actual Result Pass


Case Action To /Fail
ID Perform
Reg. No. 211417104

PANIMALAR ENGINEERING COLLEGE


DEPARTMENT OF CSE

1 Enter into Gets the details Enter the Flight No Pass


“Booking from the 1521
wizard” passenger Enter the passenger name
Piyush
Enter the Destination
Chennai
Enter the No.of seats required
7
Enters wrong Displays the error You have entered WRONG Pass
flight number message Flight No.
2 Providing all the Displays the ticket Passenger Name: Piyush Pass
correct details for the journey Flight Name: IndiGo
Flight No: 1521
Destination: Chennai
No.of Seats booked: 7
Your Ticket No:1964

TEST REPORT 3

Product : E-Ticket Booking System


Use Case : Cancel Ticket

Test Test Case / Expected Actual Result Pass/Fail


Case Action To Result
ID Perform
1 Enter into Displays Please enter your ticket Pass
“Cancellation cancellation no
wizard” Screen
2 Enter the Displays the Processing Your request... Pass
correct ticket confirmation Initiating Cancellation.....
no. message Successfully processed
your request

3 Enter the Displays the OOPS!!! Seems like you Pass


wrong ticket error message have entered wrong ticket
number number...

You might also like