Participants
1>
2>
3>
4>
Table of Contents
1. Introduction
5. Software Specifications
5.1 Requirements
5.2 Java
5.3 Servlets Overview
5.4 HTML
5.5 My SQL
1.1Primary Goals
Build a Java environment for an online Booking System that supports clientserver Applications. The system is trained to reserve tickets for a movie.
1.2Limitations or Restrictions
The main limitation is the 4-week timeframe to develop this system. During this
time we have to find the tools that could be applied in order to find appropriate
solutions and make the system work.
SYSTEM REQUIREMENTS
The sytem should consist of client-server application. Both the client and
server part of the applicatiopn should be written in java.
The system has to provide a user to search movies that are running in the city and
allow him to serve tickets for a movie, eg. A user sends his request to book a ticket for a
movie to the server, and the server checks the availability of the tickets for the requested
movie and allots him a Reservation ID as a response from the server.
The Client side might be included in respect to capturing the requests from the
user and transmitting them over the network. The client side should include a simple
graphical user interface, which provides capabilities of capturing and transmitting
requests over the network.
The server side should receive the requests, carry out task of booking a ticket for
the requested movie and send back to the client the result .
Problem Analysis
Overview of the System
The system was built based on the Java code that was provided and
tested during the Client-Server course exercises.
The system has a Client side and Server Side. The Client side is
used to capture the requests(booking a ticket for a movie) from the user,
and transmit the data over the network. The Server Side is used to receive
the data from the client and carry out the reservation task.
Client-Server Connection
A network connection between users and a server is made through
sockets. Normally the server runs on a specific computer and has a socket
for communication and listens on a specific port. It basically waits and
listens until a client requests a connection(see Figure 0-1 Client-Server
Connection A).
The client should know the hostname of the computer on which the
server is running and also the port number to which the server is
connected.
If the server accepts the connection request from the client, the
server makes a new socket with a different port and communicates with
the client from there. Then the port on the server that waits and listens is
available again and ready to receive new connection requests from other
client(s) an at the same time attending the needs of the connected client.
MANAGEMENT MODULE
This module is meant for management. In this module
management people can create new agents, update movie information,
insert movies into the database and can updates the databse. Using the
management interfaces that are developed can do this whole process .
Management people dont interact directly with the database, but using the
interfaces they can modify, insert, update and delete the information from
the database.
This module is restricted for only one user for security reasons.
Only the authorized person can access this module. He can only login into
this module by providing valid username and password. As soon as he
login to this module, he has options like insert, update,delete, and create.
Using these forms he makes changes into the database. The forms
developed are most user-friendly.
Database Design:
We have used MySQL database to design our tables. In our project we
have used four tables for our need. (Refer Database Tables in Appendix)
Tables:
Agent_Info
Th_Info
Mov_Info
Res_Info
Free_seats
Agent_Info
agent_id
agent_name
Username
Password
Address
Phoneno
This table maintains the details of the sales agents. Here every
agent is given an ID, which is unique .
Mov__Info
MOV_ID
MOVNAME
THNAME
DATE
This table maintains the complete info about the movies. Every movie has
a unique and Id, which is a primary key.
Res_Info
RES_ID
THNAME
MOVNAME
MDATE
NO_TICKETS
PRICE
This table maintains the details of the reserved tickets.
Reservation Ids will generates randomly and stores into the database. Here
RES_ID is unique. This Id is used as a reference.
Free_ Seats
THNAME
MOVNAME
C1_SIZE
C2_SIZE
MDATE
This table maintains the complete details of the available seats for
each movie. C1_SIZE and C2_SIZE are the number of seats of both
class1and class2 respectively.
Software Specifications
Requirements:
. Java Servlets
. My SQL Database
. HTML
Java
Java is an object oriented programming language. It is simple to
understand as it is make possible to model real life objects in digital
environment by using java classes, give the description to eht objects by
using variables and give functionality to the objects by methods.
Java was designed as an Internet-application language and allows
writing programs as Java applications or Java applets. For this project we
used J2SE that supports server side programming to cary out the task of
reserving tickets for a movie.
Servlets Overview
. Servlets are Java technologys answer to CGI programming. They
are programs that run on a Web server and build Web pages.The necessity
of creating the webpages dynamically leads to invent the servlet
technology.Java servlets are more efficient, easier to use, more powerful,
more portable, and cheaper than traditional CGI and than many alternative
CGI-like technologies.
send a number of headers, all of which are optional except for ContentLength, which is required only for POST requests.
HTTP Response Headers:
A response from a Web server normally consists of a status line,
one or more response headers, a blank line, and the document. Setting the
HTTP response headers often goes hand in hand with setting the status
codes in the status line.
HTML
HyperText Markup Language(HTML), the publishing language of
the World Wide Web. In addition to the text, multimedia, and hyperlink
features it also supports more multimedia options, scripting languages,
style sheets, better printing facilities, and documents that are more
accessible to users with disabilities. HTML takes great strides towards the
internationalization of documents, with the goal of making the Web truly
World Wide.
MySQL
The MySQL database is a high-performance relational database
management system for Web site and business application development
and deployment. With a streamlined but functionally-rich feature set, the
MySQL database maximizes speed, stability and ease of deployment.
MySQL is available on all major Linux distributions, as well as Unix, Mac
OS and Windows operating systems. The optimization of MySQL for the
Search by Movie:
If the user wants to search for a particular movie , he has to submit
the moviename, and clicks on the GO button he gets the information of the
requested movie or theatre.
Sign In:
If the user clicks on this link he is redirected to login page.
Login Page
This page used to login into the system for both the Sales Agents
And Management. A registered user can sign into the system by providing
valid username and password. If the user enters incorrect username or
password he is requested to provide a valid username and password.
If the agent is successfully logged in, he is redirected to Reservation form.
Reservation Form
This page contains the staus of reservations of each movie. Here
the agent can see the status of each movie and reserve the ticket for the
requested movie by submitting theatrename, moviename, date, no.of
tickets and price. As soon as he submits the above values the user gets a
Res_Id, which is randomly generated by the system.
Cancelation Page
This page is meant for canceling the reservations. Here the sales
agent has to submit the reservation id and the number of tickets he wants
to cancel.
If(funame.equalsIgnoreCase(uname)&&fpwd.equalsIgnore
Case(pwd))
{
response.sendRedirect(http://loclhost:8080/user/venae03/servlet/M
oviesInfoServlet)
I++
}
elseif(funame.equalsIgnoreCase(username1)&&fpwd.equal
sIgnoreCase(passwprd1)){
response.sendRedirect(http://ip59:8080/upendegila/servlet
/ManagementInsert);
I++
}
Booking Servlet:
This servlet gives the information about the
reservation status of all the movies. This information is retrieved
from the Free_seats table. If the customer wants to book a seat for
a particular movie, the sales agent enters the Movie name, Date
Number Of Tickets, and Price Category.
ReservationInfoServlet
When the sales agent press the button Submit in the
Booking Servlet this Servlet will be invoked and takes the values
from the User and Inserts into the reservationinfo table and updates
the free_seats table, and gives the reservation id to the customer
and how much price the customer has to pay.
MovieSearchServlet:
This Servlet is used to search movies . It accepts movie
name from the user and searches the Free_seats table and displays
the results.
ManagementInsert
This Servlet is called when the management want to insert
a movie into the database. It accepts the movie name, date and
theatrename. These values are inserted into Mov_Info table and
updates the Free_seats table. (source code in Appendix).
Delete Servlet:
This Servlet is invoked when the management people
selects a movie and press the delete button. This action performs
deleting the selected movie information from the Mov_info and
Free_seats tables(source code in Appendix).
Test
Test results
We tested our system on specific scenarios and found that it
handles standard situation. we should be also mention that the
system is not capable to handle unexpected use.
Based on the testing results, we found that changes and
improvements can be made to provide more stability to the system.
. Handling exceptions and creating a specific exceptions
. Use conditions to handle unexpected use of the program
Conclusion
Achievements
Scope:
This project covers all the agents.
This system can extended to any number of agents and
maintenance center
This is very useful for easy maintenance.
Refrences
Websites Referred:
www.sun.java.com
http://www.htmlhelp.com/reference/html40/olist.html