MULTIPLEX DATABASE SYSTEM Submitted in partial fulfillment of the requirements For the award of the degree of
Bachelor of Computer Applications
To Guru Gobind Singh Indraprastha University, Delhi
Guide:
Submitted By:
Ms. Shilpa Taneja
Rahul Khanna (0556032008) (05560320 08) Mayank Jaiswal (0566032008)
II T T M Nurturing Excellence
Institute of Information Technology & Management New Delhi-110058 Batch (2008-2011)
Page | 1
Certificate We,
1.( Rahul Khanna- 0556032008) & 2. (Mayank Jaiswal- 0566032008) certify that the
Summer Training Project Report (BCA-355) entitle ³MULTIPLEX DATABASE SYSTEM´ is done by us and it is an authentic work carried out by us at Institute of Information Technology & Management. The matter embodied in this project work has not been submitted earlier for the award of any degree o r diploma to the best of my knowledge and belief.
1. Signature of the Student
2. Signature of the Student
Date:
Certified that the Project Report (BCA-355) entitled ³MULTIPLEX DATABASE SYSTEM´ done by the above students is completed under my guidance. Signature of the Guide Date: Name of the Guide: Designation:
Countersigned Director
Page | 2
Certificate We,
1.( Rahul Khanna- 0556032008) & 2. (Mayank Jaiswal- 0566032008) certify that the
Summer Training Project Report (BCA-355) entitle ³MULTIPLEX DATABASE SYSTEM´ is done by us and it is an authentic work carried out by us at Institute of Information Technology & Management. The matter embodied in this project work has not been submitted earlier for the award of any degree o r diploma to the best of my knowledge and belief.
1. Signature of the Student
2. Signature of the Student
Date:
Certified that the Project Report (BCA-355) entitled ³MULTIPLEX DATABASE SYSTEM´ done by the above students is completed under my guidance. Signature of the Guide Date: Name of the Guide: Designation:
Countersigned Director
Page | 2
ACKNOWLEDGEMENT
The making of the project µMULTIPLEX DATABASE SYSTEM¶ involves contribution of many people, whose invisible imprint can be felt on each and every page of this project. We
owe a great many thanks to a great many people who helped and supported us during the writing of this summer training project. We express our gratitude to Prof S. Chaturvedi , Director of Institute of Information Technology and Management , D-Block, Janak Puri, New Delhi, for extending his inevitable and valuable support to us. We
humbly express a deep thank you to Ms. Shilpa Taneja, our Guide for the project. We would take this opportunity to thank ma¶am for guiding and correcting various documents of ours with attention and care. She has taken immense effort and pain to go through the project and make necessary corrections as and when needed.
We
would also thank our Institution and our faculty members without whom this project would have been a distant d istant reality. reality. We also extend our o ur heartfelt thanks to our families and well wishers. Working
under their guidance has indeed been a very fruitful experience for us.
1. Rahul Khanna (0556032008)
2. Mayank Jaiswal (0566032008)
Page | 3
TABLE OF CONTENTS
S. No.
Topic
Page No
1.
Certificate
2
2.
Acknowledgements
3
3.
List of Tables
5
4.
List of Figures
6
5.
Chapter-1: System Introduction
7
6.
Chapter-2: Systems Design
21
7.
Chapter-3: System Development and Implementation
42
8.
Chapter-4: Scope of Improvement, Summary and Conclusion
90
Page | 4
LIST OF TABLES
Table
Title
Page No.
2.1
Input / Output Data Description
26
2.2
Booking Table
31
2.3
Class Table
32
2.4
Collection Table
32
2.5
Movie Table
33
2.6
Ticket Table
33
2.7
Security Table
34
2.8
Theater Table
34
Page | 5
LIST OF FIGURES
S. No.
Topic
Page No
1.1
Product Perspective
12
2.1
Block Diagram
23
2.2
Use Case Diagram
27
2.3
Zero Level DFD
28
2.4
One Level DFD
28
2.5
Level Two DFD
29
2.6
ER Diagram
35
Page | 6
Chapter 1 (System Introduction)
Page | 7
1.1 Description Of the organization:
A multiplex is a movie theatre complex with three screens. The largest of these complexes are sometimes referred to as a megaplex.
The system is being designed to facilitate the members engaged in the booking tickets at multiplexes. The system has a wide application in the sector of multiplexes as it can provide help in various activities. Some of the merits of this system are:
y
The system manages the whole database of the operators.
y
The system helps in reducing work load & pressure upon the employees.
y
The system is highly accurate and less error prone as compared to manual system.
y
The system helps in a better way of management of multiplex ticket booking systems.
y
The system saves lots of time and effort as compared to manual system.
y
The system also helps in better storage and preservation of data and information.
y
The system also helps in speedy retr ieval and seeking of data with the help of queries.
y
The system can develop and publish various data reports which can be used to carefully study the whole picture.
y
Overcome all the demerits of old manual system.
Page | 8
1.1.1 Organizational Objectives: y
To allow managers to reduce the work load of ticketing.
y
Handling
y
To manage the data of different movies.
y
To control the ticket payment structure.
the ticket booking process.
1.1.2 Functions Provided:
This multiplex ticket booking system software provides various services to the operator, mentioned below: y
A operator account.
y
It updates the new released movies and removes the current movies.
y
This software is also used for current ticket booking, advance booking and generating the total collection amount.
y
It also maintains the whole database of tickets.
1.1.3Functions/Activities with respect to the proposed system:
Multiplex Ticket Booking System:Level 1 Processes y
Login:- The login process enters the operator information such as operator name and password. If the operator is not registered, then the operator is not allowed to move to Next Form. If he tries to do so an error message is displayed which says ³Wrong Operator´.
Page | 9
y
Movie Updation:- The operator updates the new re leased movies and removes the old ones.
y
Ticketing:- The operator books the current available tickets for the customers, and books advance tickets.
Level 2 Processes y
Login
y
Movie Addition
y
Movie Removal
y
Book Ticket
y
Advance Booking
y
Generate Total Collection Amount Report.
1.2 SRS Documentation: 1.2.1 Introduction
A software requirements specification (SRS) is a complete description of the behavior of the system to be developed. This Software Requirement Specification is written accordance with the IEEE STD 830-1998 model.
1.2.2 Purpose
This SRS Document contains the complete software requirements for a Multiplex Database System and describes the design decisions, architectural design and the detailed design needed to implement the system. It provides the visibility in the design and provides information needed for software support. The intended audiences for this document are the development team, testing team and the end operators of the product. Page | 10
1.2.3 Scope
The software product ³Multiplex Database System´ (MDS) will be an application that will be used for maintain the records in an organized manner and to replace old paper work system. The application will manage the information about various movies and tickets. It is also designed to calculate the Collection Amount of the tickets sold. Specific reports will also be generated regarding the movies and tickets.
1.2.4 Definitions, Acronyms and Abbreviations
Following abbreviations have been used throughout this document: IEEE : The Institute of Electrical and Electronics Engineers, Inc. SRS
: Software Requirements Specification
MDS : Multiplex Database System
1.2.5 References y
http://eljabiri1.tripod.com/sitebuildercontent/sitebuilderfiles/Req-Gathering-1-.pdf
y
http://www.westfallteam.com/Papers/The_ Why_ What_ Who_ When_and_ How_Of_Software _Requirements.pdf
y
http://en.wikipedia.org/wiki/Requirements_analysis
y
http://portal.acm.org/citation.cfm?id=1010800.1010802
y
http://en.wikipedia.org/wiki/Secondary_data
y
http://brent.tvu.ac.uk/dissguide/hm1u3/hm1u3text3.htm
Page | 11
1.2.6 Overviews
This document has been prepared in accordance with the IEEE STD 830-1998, IEEE Recommended Practice for Software Requirements Specification. [IEEE 830-1998 (1998)]. It provides the information of Product perspective, Product functions, Operator characteristics, Constraints, Assumptions and dependencies and specific requirement.
1.2.7 The Overall Description
This section of the SRS describes all general factors of the product and its requirements.
1.2.8 Product Perspective
The application will be a window-based, self contained and independent software product.
Front end client application (with data entry/update/delete/ view and reporting facility)
Backend Database
Fig 1.1 Product Perspectives
1.2.9 System Interfaces
None
Page | 12
1.2.10 Operator Interfaces
The application that will be developed will have an operator friendly and menu based interface. Following screens will be provided: y
A login screen for entering the operator name and password, so that the authorized operator can have an access without any problems.
y
There will be a screen which will be displaying the major tasks that the system will be performing i.e. Add new movie, book ticket, and total collection amount.
y
All the major tasks mentioned above will have their separate forms and will perform the desired actions.
Following reports will also be generated: y
Ticket
y
Collection Report (i) Movie wise (ii) Theater wise
1.2.11 Hardware Interfaces y
Screen resolution of at least 800 X 600required for proper and complete viewing of screens. Higher
y
resolution would not be a problem
Support for printer (dot-matrix/desk-jet/inkjet, etc. ± any will do) ± that is, appropriate drivers are installed and connected printer will be required for printing of the reports.
y
Standalone system or network based ± not a concern, as it will be possible to run the application on any of these.
Page | 13
1.2.12 Software Interfaces y
Any window based operating system can be used (windows 95/98/2000/XP/NT/window7)
y
Oracle as DBMS for database. Future release of the application will aim at upgrading oracle 10g as the DBMS.
y
Visual
basic 6 for coding, developing the software.
1.2.13 Communications Interfaces
None
1.2.14 Memory Constraints
At least 64MB RAM and 2GB space on hard disk will be required for running the application.
1.2.15 Operations
The product release will not cover any automated housekeeping aspects of the database. The DBA at the client site (i.e. the Operator) will be responsible for manually deleting old/non required data. Database backup and recovery will also have to be handled by the DBA. However, the system will provide a ³RESET SYSTEM´ function that will delete (upon confirmation from the administrator) all the existing information from the database.
1.2.16 Site Adaptation Requirements
The terminals at the client site will have to support the hardware and software interfaces specified in the above sections.
Page | 14
1.2.17 Product Functions
The system will allow access only to authorized operators entering the appropriate password. A summary of the major function that the software will perform are as follows: y
A login facility to allow only the authorized operators to have an access to the software system. This prevents the unauthorized operators to misuse the software.
y
Operator (as Data Entry Operator) will be able to add/delete/modify information about different movies in the Multiplex.
y
The reports can also be generated in case an operator wants them.
1.2.18 Operator Characteristics y
Educational level: At least graduate should be comfortable with English language.
y
Experience: The operator should be well versed about the nature and the processes of the Multiplex.
y
Technical expertise: should be comfortable using general purpose applications on a computer.
1.2.19 Constraints y
GUI is only in English.
y
Login and password is used for identification of operator and there is no facility for Guest.
1.2.20 Apportioning of Requirements
Not required.
Page | 15
1.2.21Specific Requirements
This section contains the software requirements to a level of detail sufficient to enable designers to design the system and the tester to test that system.
1.2.22 External interfaces
This interface will be the actual interface through which the operator will communicate with the application and perform the desired tasks. The following screens will be provided:
Login Screen:
The login screen will be the first screen that an operator will face. This screen is responsible to allow the authorized operators to access the application. It will accept the operator name and password from the operator and verify it. If the operator name and password match, then the operator will be allowed an access to the application else and error will be raised i.e. ACCESS DENIED. The fields available on this screen will be: y
Operator name
: Varchar2 of length up to 10 characters.
y
Password
: Varchar2 of length up to 15 characters.
Menu Screen:
This screen will display a dedicated Menu bar at the top of screen. In the menu bar we can select any of these five buttons and perform the desired actions. The five buttons will be Add New Movie, Current Booking, Advance Booking, Collection, and Exit.
Page | 16
Add New Movie Screen:
The operator can add movie in the multiplex. With the help of this screen the operator can Add New Movie in the database. The fields available on this screen will be: y
y
y
y
Name of the Movie
:Varchar2 of length up to 30 digits
Theater Number
: Number of length up to 10 digits
Number of Shows
: Number of length up to 10 digits
Show Time
: Date
Current Booking Screen:
The operator can book Tickets for the customers as per his needs. The fields available on this screen will be: y
Theater Number
: Number of length up to 10 digits
y
Select Class
: Varchar2 of length up to 10 digits
y
Show Time
: Date
y
Seat Number
: Varchar2 of length up to 30 digits
Advance Booking Form:
This form will allow the operator to book Advance Tickets for the Customers. The fields available on this screen will be: y
Booking Date
: Date
y
Theater Number
: Number of length up to 10 digits
y
Select Class
: Varchar2 of length up to 10 digits
y
Show Time
: Date
Page | 17
y
Seat Number
: Varchar2 of length up to 30 digits
Collection Form:
The operator can generate the Total Collection Amount with the help o f this form. 1. Movie Wise Collection 2. Theater Wise Collection.
1.2.23 System features Movie Detail Management Description
The system will maintain all the information regarding the movie such as Movie name, Type, Show Timings, Date of Release, etc. This system will also allow the operator to add/delete/update the information as per his requirements. Validity checks: y
y
The Movie Name cannot be left blank. Number of Shows cannot exceed 5.
Sequencing information
After a successful login the operator will be allow to choose from the options such as Add New Movie, Current Booking, Advance Booking, and Check Total Collection Amount. He can choose any one of these.
Page | 18
Report generation: y
Booking confirmation letter report:
A report will be generated containing the information of all the details of the booking. This report will be given to the customer as he confirms the booking. y
Collection Report:
A report will be generated containing the total Collection Amount.
1.2.24 Performance Requirements
None
1.2.25 Design Constraints
None
1.2.26 Software System Attribute Security
The application will be password protected. The operators will have to enter the correct operator name and password in order to access the software.
Maintainability
The system will be designed in a maintainable order. The system can be easily modified and renewed according to the need of the operator.
Page | 19
Portability
The system will be easily portable on any windows based application that has oracle installed.
1.2.27 Logical Database Requirements
The following information will be stored in the database: y
Movie Info: Movie Name, In date, Out date, Theater No., Collection.
y
Booking Info: Seat No., Theater No., Show date, Show Time, Booking Type, Amount,
Entertainment Tax, Service Tax, Total Amount. y
Ticket Info: Seat No., Movie Name, Show date, Show Time.
1.2.28 Other Requirements
None
Page | 20
Chapter 2 (System Design)
Page | 21
2.1 Physical Design 2.1.1 System Analysis
It is the study of systems ² sets of interacting entities, including computer systems. This field is closely related to operations research. It is also "an explicit formal inquiry carried out to help someone, referred to as the decision maker, identify a better course of action and make a better decision than he might have otherwise made. The development of a computer-based information system often comprises the use of a systems analyst.
When
a computer-based information system is developed, systems analysis (according
to the Waterfall model) would constitute the following steps:
y
The development of a feasibility study, involving determining whether a project is economically, socially, technologically and organizationally feasible.
y
Conducting fact-finding measures, designed to ascertain the requirements of the system's end-users. These typically span interviews, questionnaires, or visual observations of work on the existing system.
y
Gauging how the end-users would operate the system (in terms of general experience in using computer hardware or software), what the system would be used for etc.
Page | 22
2.1.2 Block Diagram
Id & password
Operator
Ticketing
Movie Detail Management
Customer Details
Advance Booking
Booking
Collection Report
Add New Movies
Delete Previous Movies
Receipt
Fig.2.1 Block Diagram of the proposed system
Page | 23
2.1.3 Description of the System
1. Login process
In this process, operator can access the software by putting id and password. If id and password is correct he/she can access the software. 2. Ticketing
In this process, the operator books the tickets for customers according to their preference. This process also includes advance booking. 3. Collection
In this process, the operator can check the Total Collection Amount.
2.2.4 Processes and input output identification
This section contains the details about all the processes that are performed in the software system and also tells us about the input and output identification i.e. what is the input being given and what is the desired output. 1. Login process Input: id, password. Process: Operator will enter his/her ID and password, if valid user then he¶ll/she¶ll be logged in
and can now book tickets, update the movies, and check total collection amount. Output: The operator now can perform the various operations i.e. booking, cancelation, deletion
of movies.
Page | 24
2. Ticketing Input: Selecting the movie, date, show timings. Process: Operator will select the movie, date, and its timings as per customer¶s preferences. The
operator will also select the location of the seat. Output: This process results into generation of a movie ticket.
3. Movie Updation Input: The operator updates the new released movies. Process: The operator enters the new released movies and removes the old ones. Output: The new movie added is now available along with its date and show t imings.
Page | 25
2.1.5 Input Output data description
INPUT/OUTPUT NAME
DATA ELEMENTS
Operator Details
operator_id , Password.
Customer Details
Customer name, address, contact no, e-mail id.
Movie Details
Movie name, date, show timings.
Ticketing Details
Ticket id, Ticket number. Table 2.2 Input / Output Data Description
Page | 26
2.3 Use Case Diagrams
A use case diagram is defined by and created from a Use-case analysis. Its purpose is to present a graphical overview of the functionality provided by a system in terms of actors, their goals (represented as use cases), and any dependencies between those use cases. The main purpose of a use case diagram is to show what system functions are performed for which actor. Roles of the actors in the system can be depicted.
Login
Add Movie
Operator
Book Ticket
Customer
Book Advance Ticket
Check the Total Collection Amount
Fig 3.1 Use Case Diagram Page | 27
2.1.7 System DFD Up To Two Levels
A data-flow diagram (DFD) is a graphical representation of the "flow" of data through an information system. DFDs can also be used for the visualization of data processing (structured design). Following are the DFD¶s up to 2 levels for this software system.
Level Zero DFD
Multiplex
Operator
Database Enter Opt_ID & Password
Ticket
Generates
System
Fig 2.3 Level - 0 DFD
Level 1 DFD 1.1 Operator
Enter Opt_ID & Password
Operator Details
Login
Movie Details
Ticket Details
1.2
1.3
Movie Updation
Ticketing Movie Updation Info used for Ticketing
Fig 2.4 Level ± 1 DFD Movie
Ticket
Page | 28
Level 2 DFD
1.1 Login Process
1.1 Movie Updation Process
Movie Details
1.2.1
Movie Details
Add Movie Movie
Operator
1.2.2
Movie Details
Remove Movie
Movie Details
Operators can add/remove a movie and the changes will be made in the movie table.
Page | 29
1.2 Ticketing
Movie Details
Movie Details
1.3.1 Book Ticket Receipt
Operator
1.3.2 Ticket
Movie Details
Cancel Ticket
Movie Details
Operators can Book/Cancel a seat and the changes will be made in the ticket table along with a receipt generated
Page | 30
2.2 Database Design 2.2.1 Database table structure
The database table structure gives a brief detail about the system that what is the actual structure of this software system. Following are the four table structures:
Booking Table
Page | 31
Class Table
Collection Table
Page | 32
Movie Table
Ticket Table
Page | 33
Security Table
Theater Table
Page | 34
2.2.2 ER Diagram
SeatNo
Mname Operator Id
h wdate
Password
M
Book
ShowTime
Ticket
1 M
Amount
1 M
Operator
Etax
Advance Booking 1
Reserved
Total
For 1
Add
M
M
InDate Outdate
M
Movie
Remove
Mname Theater llecti n
Fig 2.4 ER Diagram for the Proposed System
Page | 35
2.3 Interface Design
Login Form
Validation Checks: y
Password provided by the operator must be correct.
y
Password field cannot be left blank.
Page | 36
Menu Form
Page | 37
Add New Movie Form
Validation Checks: y
Only one movie can be added at one time.
y
The multiplex can contain a maximum of three movies. Therefore to add a movie after 3 movies the operator may have to remove a movie first.
y
y
One Theater can contain only one movie. No field can be left blank.
Page | 38
Current Booking Form
Validation Checks: y
No booking can be made for previous dates and time.
y
Operator can select movies only between the movies listed in the list box.
y
Seats booked earlier cannot be booked again. Check boxes are disabled.
Page | 39
Advance Booking Form
Page | 40
Validation Checks: y
An operator can book tickets for one week in advance.
y
Operator can select movies only between the movies listed in the list box.
y
Seats booked earlier cannot be booked again. Check boxes are disabled.
Page | 41
Chapter 3 System Development and Implementation
Page | 42
3.1 Program Development
Login Form
Coding:
Private Sub cmdCancel_Click() Unload Me End Sub
Private Sub cmdOK_Click() With
Adodc1.Recordset
.MoveFirst If .Fields(0) <> txtPassword.Text Then MsgBox "Please enter your correct password.", vbCritical + vbOKOnly, "Log in Denied" txtPassword.SetFocus txtPassword.Text = ""
Page | 43
Else Unload Me Load MDIForm1 MDIForm1.Show End If End With End Sub
Private Sub Form_Load() Adodc1.ConnectionString = gOracleProvider Adodc1.RecordSource = "Select * from Security" Set lblBind.DataSource = Adodc1 End Sub
Page | 44
Add New Movie Form
Coding:
Private Sub cmbShows_Click() Dim i As Integer Dim j As Integer
For i = 1 To cmbShows.Text - 1 lblShow(i).Visible = True MaskEdBox1(i).Visible = True cmbAMPM(i). Visible = True Next Page | 45
For j = i To 4 lblShow(j).Visible = False MaskEdBox1(j).Visible = False cmbAMPM(j). Visible = False Next End Sub
Private Sub cmdCancel_Click() Unload Me End Sub
Private Sub cmdSave_Click() Dim showTime As String Dim i As Integer Dim j As Integer
On Error Resume Next
If (Adodc1.Recordset.RecordCount > 0) Then With
Adodc1.Recordset
.MoveLast While
.BOF <> True
If .Fields(3) = cmbTheater.ListIndex + 1 Then .Fields(1) = Format(Date, "DD/MM/YYYY") "DD/MM/YYYY") Page | 46
.Update GoTo a: Else .MovePrevious End If Wend
End With End If a: With
Adodc1.Recordset
.AddNew .Fields(0) = Format(Date, "DD/MM/YYYY") "DD/MM/YYYY") .Fields(1) = Format(Date, "DD/MM/YYYY") "DD/MM/YYYY") .Fields(2) = txtMovieName.Text .Fields(3) = cmbTheater.ListIndex + 1 .Fields(4) = Val("0") .Save End With
Adodc1.Recordset.Close Adodc1.Recordset.Open "Select * from Theater56", gOracleProvider 'Set lblBind.DataSource = Adodc1
With
Adodc1.Recordset
.MoveFirst Page | 47
While
.EOF <> True
If .Fields(0) = cmbTheater.ListIndex + 1 Then For i = 0 To cmbShows.ListIndex cmbShows.ListIndex If cmbAMPM(i).ListIndex cmbAMPM(i).ListIndex = 1 Then If Mid(MaskEdBox1(i).ClipText, Mid(MaskEdBox1(i).ClipText, 1, 2) <> 12 Then T hen showTime = (12 + Mid(MaskEdBox1(i).ClipText, 1, 2)) Else showTime = "12" End If showTime = showTime & ":" & Mid(MaskEdBox1(i).ClipText, 3, 2) Else showTime = MaskEdBox1(i).Text End If
.Fields(i + 2) = FormatDateTime(showTime, vbLongTime) showTime = "" Next i For j = i To 4 .Fields(j + 2) = FormatDateTime("00:00:00", vbLongTime) Next .Update Unload Me Exit Sub Else .MoveNext Page | 48
End If Wend
End With Unload Me
End Sub
Private Sub Form_Load() lblToday.Caption = Format$(Date, "dddd, dd-MMMM-yyyy") Adodc1.ConnectionString = gOracleProvider Adodc1.RecordSource = "Select * from MOVIE56" 'Set lblBind.DataSource = Adodc1 End Sub
Private Sub txtMovieName_KeyPress(KeyAscii As Integer) If KeyAscii >= 97 And KeyAscii <= 122 Then KeyAscii = KeyAscii - 32 End Sub
Page | 49
Current Booking Form
Coding:
Option Explicit Dim X As Integer Dim SQL As String Dim Srch As String Dim Booking As Integer
Private Sub chkA_Click(Index As Integer) Srch = Combine("A", Index)
Page | 50
If chkA(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt
End Sub
Private Sub chkB_Click(Index As Integer) Srch = Combine("B", Index) If chkB(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt End Sub
Page | 51
Private Sub chkC_Click(Index As Integer) Srch = Combine("C", Index) If chkC(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt End Sub
Private Sub chkD_Click(Index As Integer) Srch = Combine("D", Index) If chkD(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt End Sub Page | 52
Private Sub chkE_Click(Index As Integer) Srch = Combine("E", Index) If chkE(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt End Sub
Private Sub chkF_Click(Index As Integer) Srch = Combine("F", Index) If chkF(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt Page | 53
End Sub
Private Sub chkG_Click(Index As Integer) Srch = Combine("G", Index) If chkG(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt End Sub
Private Sub chk H _Click(Index As Integer) Srch = Combine("H", Index) If chk H(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Page | 54
Call CalAmt End Sub
Private Sub chkI_Click(Index As Integer) Srch = Combine("I", Index) If chkI(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt End Sub
Private Sub chkJ_Click(Index As Integer) Srch = Combine("J", Index) If chkJ(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) Page | 55
End If Call CalAmt End Sub
Private Sub chkK_Click(Index As Integer) Srch = Combine("K", Index) If chkK(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt End Sub
Private Sub chkL_Click(Index As Integer) Srch = Combine("L", Index) If chkL(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Page | 56
Call removeItem(Srch) End If Call CalAmt End Sub
Private Sub chkM_Click(Index As Integer) Srch = Combine("M", Index) If chkM(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt End Sub
Private Sub chkN_Click(Index As Integer) Srch = Combine("N", Index) If chkN(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Page | 57
Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt End Sub
Private Sub chkO_Click(Index As Integer) Srch = Combine("O", Index) If chkO(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt End Sub
Private Sub chkP_Click(Index As Integer) Srch = Combine("P", Index) If chkP(Index).Value = 1 Then Seats = Seats - 1 SeatNos(X) = Srch X=X+1 Page | 58
Else Seats = Seats + 1 Call removeItem(Srch) End If Call CalAmt End Sub
Private Sub cmbClass_Click()
Select Case cmbClass.ListIndex Case 0: frmClass(0).Enabled = True frmClass(1).Enabled = False frmClass(2).Enabled = False Call ClearExecutive Call ClearRoyal Case 1: frmClass(1).Enabled = True frmClass(0).Enabled = False frmClass(2).Enabled = False Call ClearPremium Call ClearRoyal Case 2: frmClass(2).Enabled = True frmClass(1).Enabled = False Page | 59
frmClass(0).Enabled = False Call ClearExecutive Call ClearPremium End Select
SQL = "Select * from Class56" Adodc1.Recordset.Close Adodc1.Recordset.Open SQL, gOracleProvider Set lblBind.DataSource = Adodc1
Seats = 672 lblSeatsAvail.Caption = 672 lblAmount.Caption = "" lblServiceTax.Caption = "" lblETax.Caption = "" lblTotal.Caption = "" If (Adodc1.Recordset.RecordCount > 0) Then With
Adodc1.Recordset
.MoveFirst While
.EOF <> True
If .Fields(0) = cmbClass.Text Then lblRate.Caption = Adodc1.Recordset.Fields(1) Exit Sub Else .MoveNext Page | 60
End If Wend
End With End If End Sub
Private Sub cmbShowTime_Click() On Error Resume Next Call ClearAllSeats SQL = "Select * from Booking56" Adodc1.Recordset.Close Adodc1.Recordset.Open SQL, gOracleProvider Set lblBind.DataSource = Adodc1 If (Adodc1.Recordset.RecordCount > 0) Then With
Adodc1.Recordset
.MoveFirst While
.EOF <> True
If .Fields(1) = cmbTheaterNo.ListIndex + 1 Then If Format(.Fields(2), "DD/MM/YYYY") = Format(Date, "DD/MM/YYYY") Then If .Fields(3) = cmbShowTime.Text Then Call MarkReserved(.Fields(0)) End If End If .MoveNext Page | 61
Else .MoveNext End If Wend
End With End If Booking = 0 X=0 End Sub
Private Sub cmbTheaterNo_Click()
Dim i As Integer
SQL = "Select * from Movie56 where TheaterNo=" & cmbTheaterNo.ListIndex + 1 & " o rder by inDate Asc" Adodc1.Recordset.Close Adodc1.Recordset.Open SQL, gOracleProvider Set lblBind.DataSource = Adodc1 Adodc1.Recordset.MoveLast lblMovieName.Caption = Adodc1.Recordset.Fields(2)
cmbShowTime.Clear SQL = "Select * from Theater56 where TheaterNo=" & cmbTheaterNo.ListIndex + 1 Adodc1.Recordset.Close
Page | 62
Adodc1.Recordset.Open SQL, gOracleProvider Set lblBind.DataSource = Adodc1
For i = 2 To 6 If Adodc1.Recordset.Fields(i) <> "12:00:00 AM" Then cmbShowTime.AddItem Adodc1.Recordset.Fields(i) Next i End Sub
Private Sub cmdClose_Click() Unload Me End Sub
Private Sub cmdSave_Click()
On Error Resume Next Dim i As Integer Dim s As String
SQL = "Select * from Booking56" Adodc1.Recordset.Close Adodc1.Recordset.Open SQL, gOracleProvider Set lblBind.DataSource = Adodc1
For i = 0 To X - 1
Page | 63
s = s & SeatNos(i) Next 'If (Adodc1.Recordset.RecordCount > 0) Then With
Adodc1.Recordset
.AddNew .Fields(0) = (.Fields(0) & "") & s .Fields(1) = cmbTheaterNo.ListIndex + 1 .Fields(2) = Format(Date, "DD/MM/YYYY") .Fields(3) = Format(cmbShowTime.Text, "HH:MM AM/PM") .Fields(4) = "C" 'Current Booking .Fields(5) = lblAmount.Caption .Fields(6) = lblETax.Caption .Fields(7) = lblServiceTax.Caption .Fields(8) = lblTotal.Caption .Save End With 'End If
SQL = "Select * from Movie56" Adodc1.Recordset.Close Adodc1.Recordset.Open SQL, gOracleProvider Set lblBind.DataSource = Adodc1 If (Adodc1.Recordset.RecordCount > 0) Then With
Adodc1.Recordset
.MoveFirst Page | 64
While
.EOF <> True
If .Fields(2) = lblMovieName.Caption Then .Fields(4) = .Fields(4) + Val(lblTotal.Caption) .Update .MoveNext Else .MoveNext End If Wend
End With End If SQL = "Select * from Tickets56" Adodc1.Recordset.Close Adodc1.Recordset.Open SQL, gOracleProvider Set lblBind.DataSource = Adodc1
'For i = X - Booking To X For i = 1 To X With
Adodc1.Recordset
.AddNew .Fields(0) = SeatNos(i) .Fields(1) = lblMovieName.Caption .Fields(2) = Format(Date, "DD/MM/YYYY") .Fields(3) = cmbShowTime.Text .Fields(4) = lblRate.Caption Page | 65
.Fields(5) = Val(lblRate.Caption) * 10 / 100 .Fields(6) = Val(lblRate.Caption) * 4 / 100 .Fields(7) = Val(lblRate.Caption) + Val(lblRate.Caption) * 4 / 100 + Val(lblRate.Caption) * 10 / 100 .Save End With Next i
'Call Datareport4 to print tickets If isLoad = True Then Unload DataReport4 Unload DataEnvironment1 Else isLoad = True End If
DataEnvironment1.Connection1.ConnectionString = gOracleProvider DataEnvironment1.cmdTicket Load DataReport4 DataReport4.Show
SQL = "Select * from Tickets56" Adodc1.Recordset.Close Adodc1.Recordset.Open SQL, gOracleProvider Set lblBind.DataSource = Adodc1
Page | 66
'Delete all records from the table If (Adodc1.Recordset.RecordCount > 0) Then Adodc1.Recordset.MoveFirst While
Adodc1.Recordset.EOF <> True
Adodc1.Recordset.Delete Adodc1.Recordset.MoveNext Wend
End If
SQL = "Select * from Collection56 Where Mov_Date ='" & Format(Date, "DD/MMM/YYYY") & "'" Adodc1.Recordset.Close Adodc1.Recordset.Open SQL, gOracleProvider Set lblBind.DataSource = Adodc1 If (Adodc1.Recordset.RecordCount > 0) Then With
Adodc1.Recordset
.MoveFirst .Fields(cmbTheaterNo.ListIndex + 1) = Val(.Fields(cmbTheaterNo.ListIndex + 1) & "") + Val(lblTotal.Caption) .Fields(4) = Val(.Fields(1) & "") + Val(.Fields(2) & "") + Val(.Fields(3) & "") .Update .MoveNext Unload Me Exit Sub End With Page | 67
Else With
Adodc1.Recordset
'If not found then add new record .AddNew .Fields(0) = Format(Date, "DD/MMM/YYYY") .Fields(cmbTheaterNo.ListIndex + 1) = Val(.Fields(cmbTheaterNo.ListIndex + 1) & "") + Val(lblTotal.Caption) .Fields(4) = Val(.Fields(1) & "") + Val(.Fields(2) & "") + Val(.Fields(3) & "") .Save End With
End If
Unload Me
End Sub
Private Sub Form_Load() lblToday.Caption = Format(Date, "dddd, dd-MMMM-YYYY") Call DispSeats Adodc1.ConnectionString = gOracleProvider Adodc1.RecordSource = "Select * from Movie56" Set lblBind.DataSource = Adodc1 Seats = 672 End Sub
Page | 68
Public Sub DispSeats() Dim i As Integer For i = 1 To 41 Load chkA(i) chkA(i).Left = chkA(i - 1).Left + chkA(i - 1).Width chkA(i).Visible = True
Load chkB(i) chkB(i).Left = chkB(i - 1).Left + chkB(i - 1).Width chkB(i). Visible = True
Load chkC(i) chkC(i).Left = chkC(i - 1).Left + chkC(i - 1).Width chkC(i). Visible = True
Load chkD(i) chkD(i).Left = chkD(i - 1).Left + chkD(i - 1).Width chkD(i). Visible = True
Load chkE(i) chkE(i).Left = chkE(i - 1).Left + chkE(i - 1).Width chkE(i). Visible = True
Load chkF(i) Page | 69
chkF(i).Left = chkF(i - 1).Left + chkF(i - 1).Width chkF(i).Visible = True
Load chkG(i) chkG(i).Left = chkG(i - 1).Left + chkG(i - 1).Width chkG(i). Visible = True
Load chk H(i) chk H(i).Left = chk H(i - 1).Left + chk H(i - 1).Width chk H(i). Visible = True
Load chkI(i) chkI(i).Left = chkI(i - 1).Left + chkI(i - 1). Width chkI(i). Visible = True
Load chkJ(i) chkJ(i).Left = chkJ(i - 1).Left + chkJ(i - 1).Width chkJ(i). Visible = True
Load chkK(i) chkK(i).Left = chkK(i - 1).Left + chkK(i - 1).Width chkK(i).Visible = True
Load chkL(i) chkL(i).Left = chkL(i - 1).Left + chkL(i - 1).Width Page | 70
chkL(i). Visible = True
Load chkM(i) chkM(i).Left chkM(i).Left = chkM(i - 1).Left 1).Le ft + chkM(i - 1).Width chkM(i). Visible = True
Load chkN(i) chkN(i).Left chkN(i).Left = chkN(i chkN( i - 1).Left + chkN(i - 1).Width chkN(i). Visible isible = True
Load chkO(i) chkO(i).Left chkO(i).Left = chkO(i chkO( i - 1).Left + chkO(i - 1).Width chkO(i). Visible isible = True
Load chkP(i) chkP(i).Left = chkP(i - 1).Left + chkP(i - 1).Width chkP(i).Visible = True Next i End Sub
Public Sub CalAmt() Booking = Booking + 1 lblSeatsAvail.Caption = Seats lblAmount.Capt lblAmount.Caption ion = X * Val(lblRate.Caption) al(lblRate.Caption) '(672 - Seats) * Val(lblRate.Caption) lblETax.Caption = Val(lblAmount.Caption) * 10 / 100 Page | 71
lblServiceTax.Caption = Val(lblAmount.Caption) * 4 / 100 lblTotal.Caption = Val(lblAmount.Caption) + Val(lblETax.Caption) + Val(lblServiceTax.Caption) End Sub
Public Sub ClearPremium() Dim i As Integer For i = 0 To 41 chkA(i).Value = 0 chkB(i). Value = 0 chkC(i). Value = 0 chkD(i). Value = 0 chkE(i). Value = 0 Next i End Sub
Public Sub ClearExecutive() Dim i As Integer For i = 0 To 41 chkF(i). Value = 0 chkG(i). Value = 0 chk H(i). Value = 0 chkI(i). Value = 0 chkJ(i). Value = 0 chkK(i).Value = 0
Page | 72
Next i End Sub
Public Sub ClearRoyal() Dim i As Integer For i = 0 To 41 chkL(i). Value = 0 chkM(i). Value = 0 chkN(i). Value = 0 chkO(i). Value = 0 chkP(i).Value = 0 Next i End Sub
Public Sub removeItem(src As String) Dim i As Integer Dim j As Integer For i = 0 To X - 1 If SeatNos(i) = src Then For j = i + 1 To X - 1 SeatNos(j - 1) = SeatNos(j) Seat Nos(j) Next j SeatNos(j) = "" X=X-1 End If Page | 73
Next i End Sub
Public Function Combine(s As String, Index As Integer) As String Dim comb As String Dim ind As String If Index < 10 Then ind = "00" & Index ElseIf Index < 100 Then ind = "0" & Index Else ind = Index End If comb = s & ind Combine = comb End Function
Public Sub MarkReserved(SNo As String) Dim L As Integer Dim Series As String Dim Index As Integer Dim i As Integer i=1 L = Len(SNo) While
i <= L Page | 74
Series = Mid(SNo, i, 4) i=i+4 lblSeatsAvail.Caption = Seats Index = Val(Mid(Series, 2, 3)) Series = Mid(Series, 1, 1) Select Case Series Case "A": chkA(Index).Enabled = False chkA(Index).Value = 1 Case "B": chkB(Index).Enabled = False chkB(Index).Value = 1 Case "C": chkC(Index).Enabled = False chkC(Index).Value = 1 Case "D": chkD(Index).Enabled = False chkD(Index).Value = 1 Case "E": chkE(Index).Enabled = False chkE(Index).Value = 1 Case "F": chkF(Index).Enabled = False chkF(Index).Value = 1 Case "G": Page | 75
chkG(Index).Enabled = False chkG(Index).Value = 1 Case "H": chk H(Index).Enabled = False chk H(Index).Value = 1 Case "I": chkI(Index).Enabled = False chkI(Index).Value = 1 Case "J": chkJ(Index).Enabled = False chkJ(Index).Value = 1 Case "K": chkK(Index).Enabled = False chkK(Index).Value = 1 Case "L": chkL(Index).Enabled = False chkL(Index).Value = 1 Case "M": chkM(Index).Enabled = False chkM(Index).Value = 1 Case "N": chkN(Index).Enabled = False chkN(Index).Value = 1 Case "O": chkO(Index).Enabled = False Page | 76
chkO(Index).Value = 1 Case "P": chkP(Index).Enabled = False chkP(Index).Value = 1 End Select Booking = Booking + 1 Wend
lblAmount.Caption = "" lblTotal.Caption = "" lblServiceTax.Caption = "" lblETax.Caption = "" End Sub
Public Sub ClearAllSeats() Dim i As Integer For i = 0 To 41 chkA(i).Value = 0 chkB(i). Value = 0 chkC(i). Value = 0 chkD(i). Value = 0 chkE(i). Value = 0 chkF(i).Value = 0 chkG(i). Value = 0 chk H(i). Value = 0 Page | 77
chkI(i). Value = 0 chkJ(i). Value = 0 chkK(i).Value = 0 chkL(i). Value = 0 chkM(i). Value = 0 chkN(i). Value = 0 chkO(i). Value = 0 chkP(i).Value = 0 chkA(i).Enabled = True chkB(i).Enabled = True chkC(i).Enabled = True chkD(i).Enabled = True chkE(i).Enabled = True chkF(i).Enabled = True chkG(i).Enabled = True chk H(i).Enabled = True chkI(i).Enabled = True chkJ(i).Enabled = True chkK(i).Enabled = True chkL(i).Enabled = True chkM(i).Enabled = True chkN(i).Enabled = True chkO(i).Enabled = True chkP(i).Enabled = True Next i Page | 78
End Sub
Private Sub lblSeatsAvail_Change() If Val(lblSeatsAvail.Caption) = 0 Then Picture2.Visible = True Else Picture2.Visible = False End If End Sub
Private Sub Timer1_Timer() lblHouseFull.Visible = Not lblHouseFull.Visible End Sub
Page | 79
Advance Booking Form
Page | 80
Coding:
Option Explicit Dim DateError As Boolean
Private Sub cmdCancel_Click() Unload Me End Sub
Private Sub cmdContinue_Click() Dim Date1 As Date Dim Date2 As Date
Date1 = Format(Date, "DD/MM/YYYY")
If IsDate(MaskEdBox1.Text) = False Then MsgBox "Entered date is not a valid date", vbCritical + vbOKOnly, "Date Error" Exit Sub End If
Date2 = Format(MaskEdBox1.Text, "DD/MM/YYYY") If DateError = True Then MsgBox "Please enter valid date", vbCritical + vbOKOnly, "Invalid Date" MaskEdBox1.SetFocus DateError = False ElseIf (Date2 - Date1) < 1 Then Page | 81
MsgBox "Booking date must be greater than today's date" MaskEdBox1.SetFocus Else AdvBookDate = Format(MaskEdBox1.Text, "DD/MM/YYYY") Unload Me Load frmAdvBookiing frmAdvBookiing.Show End If
End Sub
Private Sub Form_Load() lblToday.Caption = Format(Date, "dddd, DD/MMM/YYYY") End Sub
Private Sub MaskEdBox1_ Validate(Cancel As Boolean) If IsDate(MaskEdBox1.Text) = False Then DateError = True MsgBox "Entered date in not a valid date", vbCritical + vbOKOnly, "Date Error" End If End Sub
Page | 82
Data Reports Current Booking Report
Advance Booking Report
Page | 83
Movie Wise Collection Report
Page | 84
Theater Wise Collection Report
Page | 85
3.2Testing and Debugging
Software Testing is an empirical investigation conducted to provide stakeholders with
information about the quality of the product or service under test, with respect to the context in which it is intended to operate. Software Testing also provides an objective, independent view of the software to allow the business to appreciate and understand the risks at implementation of the software. Test techniques include, but are not limited to, the process of executing a program or application with the intent of finding software bugs.
Software Testing can also be stated as the process of validating and verifying that a software program/application/product:
y
Meets the business and technical requirements that guided its design and development;
y
Works
y
Can be implemented with the same characteristics
as expected; and
Software Testing, depending on the testing method employed can be implemented at any time in the development process.
However,
most of the test effort occurs after the requirements have
been defined and the coding process has been completed. Different software development models will focus the test effort at different points in the development process. In a more traditional model, most of the test effort occurs after the requirements have been defined and the coding process has been completed. Newer development models, such as Agile or XP, often employ test driven development and place an increased portion of the testing up front in the development process, in the hands of the developer.
Page | 86
3.2.1 Login Form
The login database is currently having only one record: Password
mayank Thus, the software will allow a successful login only if we enter these values, otherwise we get this error ³Bad Password´
Page | 87
Booking Form
Disabled check boxes i.e earlier bookings
Page | 88
Advance Booking Form
Page | 89
Chapter 4 Scope of improvement and conclusion
Page | 90
4.1Objectives achieved In this software we are allowing the Operator to view required various reports. This software handles the Movie Ticketing Process. It is also maintaining the Movie, Tickets and Total Collection details.
4.2 Scopes and Improvements There can be various amendments that can be made to this system. y
We
can add a module for login purpose, which will allow the operator to add, delete, and
update another operator account. This could increase the security of the software by granting privileges to the operator according to his level of authenticity. y
We
can add some other modules to enhance the working of this system, like cancel booking,
update movie details.
4.3 Limitations
y
The database created in oracle 10g can run only in the system in which it has been created.
y
The higher versions of visual basics should not be used.
4.4 Conclusion A complete and sustainable application has been created. It is efficient and has the ability to deal with the users quickly.
Page | 91