Вы находитесь на странице: 1из 137

A

PROJECT REPORT

ON

“Hotel Managment”
Using Php for
Submitted in partial fulfillment of the requirement for the award of Degree of
Master Of Computer Application
Awarded By

Punjabi University, Patiala


Department of Computer Science

Under Supervision of Submitted By


Internal Supervisor Kavita (1174)
Name of prof. Narinder singh

Under The Guidance of


Miss.Preeti Arora

GURU NANK COLLEGE (BUDHLADA)

1
DECLARATION

Kavita (1174) the student of M.C.A in the department of Computer Applications, At Guru Nanak
College (Budhlada), Aflited to Punjabi University Patiala For the seesion 2018-19, Hereby,
declare that the live project entitled “Hotel Management” has been completed by us at ‘Solitaire
Infosys Techonolgy Pvt. Ltd.’ , Mohali, Under Guidance Preeti arora after the theory
examination of 5th smester .The work reported in this project is the result of our own efforts. All
the work is done by Kavita.
The contents of this report are solely for the purpose of presentation of the 6th semester M.C.A
project for the partial fulfillment of award of degree of MASTER OF COMUTER
APPLICATIONS at Guru Nanak College (Budhlada).

(Signature of the Inernal Supervisor) Signature of the Student)

(Signature of the External Supervisor)

2
To Whom It May Concern

It is certified that: Kavita D/0 Lal Chand student of class: M.C.A semester: 6th bearing
University Roll No. 1174 in session: 2019 is carried out his six month training at Solitaire
Infosys Technology Pvt. Ltd. on the project entitled: Computer Departments to fulfill the
requirements for the award of degree of “MCA (Master of Computer Applications)”.

Prof. Rekha Kalra


Head Of Department Of Computer Science
Guru Nanak College, Budhlada

3
Certificate of Originality

It is certified that the project report intitled Computer Department submitted to Guru Nanak
College Budhlada, affliated to Punjabi Unversity Patiala in Partial fulfillment of the requirement
for the award of degree MASTER OF COMPUTER APPLICATION (M.C.A) is original work carried
out by Kavita, Roll No. 1174 respectively under my guidance.

The matter embedded in this project genuin work done by the students and has not been
submitted to this university or to any university, institutes for the fulfillment of the requiement
of any course of study.

Signature of Students Signature of The Guide


(External Project Guide)
Date:______________ Date:_______________
Name & Address Name, Designation &
Of The Student address of The Guide
___________________ ____________________
___________________ ____________________
___________________ ____________________

4
ACKNOWLEDGEMENT

Perseverance, inspiration and motivation have always played a key role in success of any
venture. In the present world of competition there is a race of existing in which those who are
having willed to come forward succeed. Project is like a bridge between theoretical and practical
working. With willing We join this particular project.
To design and compare a project report is very laborious work, which no student complete
without taking any help from any professional.
First of all, We would like to thank the supreme power of almighty God who is obviously the
one who has always guided us to work on right path of our life.
We express our deep gratitude to Our guide for his invaluable guidance during the project. His
unlimited guidance, innovative ideas and tireless efforts helped along the way in completing the
project. We are also thankful to the staff members for their encouragement and cooperation in
this successful completion of Our project.

In the end We would like to thank Our parents whom greatly indebted for having us brought us
love and encouragement of this stage

Kavita (1174)

5
Table of Contents

Acknowledgements ................................................................................................................................5

Organizational profile.......................................................................................................8

Misson and vision............................................................................................................9

Technology services..........................................................................................................10

Software development methodlogy................................................................................13

Objective...............................................................................................................................17

System study and analysis................................................................................................18


Cardinality and modality................................................................................................20
ER –diagram..................................................................................................................24

Introduction...................................................................................................................26

Executive summary...........................................................................................................27

List of all record..................................................................................................................28

Scope..............................................................................................................................30

Specific requirements........................................................................................................31

Technology used..................................................................................................................36

Behavioral description ........................................................................................................49

System design ....................................................................................................................62

Testing and implementation...............................................................................................78

Customer and user.........................................................................................................99

Architecture design.......................................................................................................106

Test plain........................................................................................................................115

6
Assessment evaluation...............................................................................................120

Snapshots of the forms..............................................................................................124

Conclusion ................................................................................................................134

References ................................................................................................................135

Bibliography .............................................................................................................136

7
ORGANIZATIONAL PROFILE
Comspark Info India Pvt Ltd

Background:

Comspark combines business experience with technology expertise in order to assist clients with
the creation of IT strategy and with the implementation of IT solutions. Our consultants have the
backgrounds required to understand and anticipate business needs and translate them into
actionable IT strategies and initiatives Our consultants intimately understand the challenges and
opportunities associated with creating IT value. Our approach places strong emphasis on
collaboration. We work side by side with our clients throughout the process to ensure the
involvement of key business and IT leaders.

Comspark., offers its clients the intellectual property, the proprietary frameworks as part
of our goal of becoming your trusted partner and adviser. By focusing on an ongoing effort to
share information and shape IT strategy and IT implementations, Comspark has decided to invest
in its clients, thereby investing in the creation and commitment of long-term relationships. Our
Offshore Software Development model is a highly cost effective alternative to in-house
development. It offers fast, affordable solution in meeting the demand and supply needs,
maintaining existing systems and growing in-house team with top talent. We have taken offshore
outsourcing to a new level of reliability, scalability and professionalism in software
development.

8
Mission and Vision:

Our Mission is to measurably improve our client’s planning, operations, finances,


marketing and services outcomes by demonstrating outstanding performance standards while
providing cost effective consulting and professional services. To become IT partner to fortune
companies for providing information management services.
“In order to realize our Vision, our Mission must be to exceed the expectations of our
customers, whom we define as partners and fellow employees.”
We will accomplish this by committing to our shared values and by achieving the highest levels
of customer satisfaction, with extraordinary emphasis on the creation of value

9
The focus is mainly on Technology Services and GIS Services

Technology Services:

These include

Custom Application Development & Enterprise Application Integration using


• Linux, UNIX, and windows O/S
• C, C++, Java, J2EE, J2ME,PHP
• .NET and Microsoft technologies
• Web Portals and e-commerce applications
• Oracle, SqlServer, MySQL, Postgress SQL, Firebird Databases
• Web Services development & implementation.

Maintenance

• Application Maintenance and Enhancement on any platform

Business Intelligence

• Business Information Warehouse


• Data Warehousing
• Customized Reporting / Web Reporting
• SAPSCRIPT and Custom Smart Forms

Application & Product Development

• Comspark develops products that integrate business across various technologies like Window
Mobile, PHP, .Net, SAP and others.

Products & Services


• Technology Services
• GIS Services
• Infrastructure Services

10
• Data Management Services
• Customer Support Services
• Animation Services
• Staff Augmentation Services Consulting & Training Services
• QA & Testing Services

Web Solutions & CMS

• Comspark works on technologies like Mobile Solutions, Web Design, logo design, brand
management, switch engine optimization, email campining, Development and Management
Solutions.

Data Extraction and Conversion

• Data Conversion Tools


• Archiving

Practices:

Quality Assured Delivery:

• Application Testing (Manual or Auto)


• Product Testing Validation
• Data Testing & Validation
Cost Model

• Cost savings to our customers between 30 – 60%.


• Our services support 24 * 7 round the clock
• We support our customers from short term 10 man day’s project to long
Term 10 years project support.

• Setup to leverage the “Proven Offshore Advantage” in delivering low cost IT software services
with a guarantee of Quality with speed.
11
Opportunity Clustered Delivery Network (Value for Money & Quality with Speed). Delivery model:

• Seamless geographic integration


• Reliable, on time deliveries
• Time zone advantages
• Adherence to agreed service levels
• Security and confidentiality
• Continuous improvement of your "time to market"

Risk Management Philosophy

• Activities — Careful work breakdown


• Projects — Rigorous project planning and execution
• Operations — Planned redundancy
• Entire company — Disaster recovery plan

12
SOFTWARE DEVELOPMENT METHODOLOGY

The methodology used to develop this project is object-oriented methodology is based on


function and procedures. It can be said as the development of software by building self-contained
modules as objects that can be easily replaced, modified and reused. In this environment software is a
collection of discrete objects that encapsulate their data as well as the functionality to model real world
“objects”. Each object has attribute and methods. Objects are grouped into classes. Here each object is
responsible for itself.

This environment emphasizes its cooperative philosophy by allocating tasks among the objects
of the applications. Instead of writing a lot of code we can create a lot of code we can create a lot of
helps to take in an active role.

Object oriented methodology involves mainly

1. Analysis

2. Design

3. Prototyping and testing.

Analysis

There are 5 important steps in the analysis. They are

1. Identification of the users/actors.


2. Development a simple business process model.
3. Developing the use cases.
4. Developing the interaction diagrams.
5. Classifications.
Software Methodology

Jacobson Methodologies is used to develop the proposed system.

13
Introduction

In 1986 BOOCH developed the Object Oriented Design concept is called as BOOCH METHOD. It covers
both analysis and Design phases of the Object Oriented System, The BOOCH METHOD consists of
following diagrams:

• Class diagrams
• Object diagrams
• State transition diagram
• Module diagram
• Process diagram Interaction diagram
BOOCH used the large set of symbols. Even though BOOCH defines a lot of symbols to document almost
every design decision, if we work with his method, you will notice that you never use all these symbols
and diagrams; this is this main draw back of the BOOCH METHOD.

In 1991 Jim Raumbaugh develop the OMT (Object Modeling Technique) with the help of his
team It covers analysis, Design and implementation of the system.

OMT separates Modeling into three different parts:

• Object Model
Presented by the Object Model and the data dictionary.

• Dynamic model
Presented by the State diagrams and Event flow diagrams.

• Functional Model
Presented by Data flow and constraints.

There is no traceability in the different phases, both forward and back ward; this is the main
disadvantage of the OMT.

In order to avoid the problems faced in the above two models JACOBSON invented the one
model called as the JACOBSON METHDOLOGIES (Object Oriented Software Engineering). It will cover the
entire life cycle and stress tractability between different phases, 0both forward and back ward,
Additionally he invented the Use case diagrams, these diagrams are necessary to understanding system
requirement. It captures the goal of the system. It is used to identify the Use cases and External users
(external users are the users who interact with our system to complete the task)

14
The Jacobson ET Al. Methodologies

JACOBSON METHDOLOGIES (Object Oriented Software Engineering) OOSE cover the Entire life
cycle and stress trace ability between the different phases, both forward and backward. And Use case
diagrams, these diagrams are necessary to understanding system requirement. It captures the goal of
the system. It is used to identify the USE CASES and External users (external users are the users who
interact with our system to complete the task)

The Use case Description must contain

• HOW and WHEN the use case begins and ends.


• The interaction between the use case and its actors, including WHEN the interaction
occurs and WHAT is exchanged.
• HOW and WHEN the use case will need data stored in the system or will store data in
the system.
• EXCEPTION TO THE flow of events.
• HOW and WHEN concepts of the problem domain are handled.

By using the use case model we will find the External users, External users are the users who will
interact with our system to complete the task. Every single use case should describe one main flow of
events. An exceptional additional flow of events could be added.

OBJECT ORIENTED SOFTEWARE ENGINEERING

Object oriented software engineering also called, as the objectory. It is build around several models:

▪ USE CASE MODEL: The use-case model defines the outside (actor) and inside
(use case) of the systems behavior.
▪ DOMAIN OBJECT MODEL: The objects of the “real” world are mapped in to the
main object model.
▪ ANALYSS OBJECT MODEL: The analysis object model presents how the source
code (implementation) is carried out and written.
▪ IMPLIMENTATON MODEL: The implementation model represents the
implementation of the system.

15
TEST MODEL: The test model constitutes the test plan, specification and reports. JACOBSON
METHDOLOGY consists of following diagrams:

• Use case Diagrams


• UML activity diagram
• UML use Case Diagram
• Sequence diagrams
• Class diagrams
• Business class diagrams
USE CASE DIAGRAMS:

A use case describes a sequence of actions that provide something of measurable value to an
actor and is drawn as a horizontal ellipse an actor is a person, organization, or external system that plays
a role in one or more interactions with your system.

UML ACTIVITY DIAGRAM:

Activity diagrams are used to document workflows in a system, from the business level down to
the operational level. When looking at an Activity diagram, you'll notice elements from state diagram,
the Activity diagram is a variation of the state diagram where the "states" represent operations, and the
transitions represent the activities that happen when the operation is complete. The general purpose of
Activity diagrams is to focus on flows driven by internal processing vs. external events.

SEQUENCE DIAGRAMS:

UML sequence diagrams model the flow of logic within your system in a visual manner, enabling
you both to document and validate your logic, and are commonly used for both analysis and design
purposes. Sequence diagrams are the most popular UML artifacts for dynamic modeling, which focuses
on identifying the behavior within your system.

CLASS DIAGRAMS:
A class diagram describes the static structure of the symbols in your new system. It is a graphic
presentation of the static view that shows a collection of declarative (static) model elements, such as
classes, types, and their contents and relationships. Classes are arranged in hierarchies sharing common
structure and behavior, and are associated with other classes
16
OBJECTIVE
During the past several decades personnel function has been transformed from a relatively
obscure record keeping staff to central and top level management function. There are many
factors that have influenced this transformation like technological advances, professionalism,
and general recognition of human beings as most important resources.

➢ A computer based management system is designed to handle all the primary


information required to calculate monthly statements. Separate database is
➢ maintained to handle all the details required for the correct statement calculation and
generation.

➢ This project intends to introduce more user friendliness in the various activities such as
record updation, maintenance, and searching.

➢ The searching of record has been made quite simple as all the details of the customer
can be obtained by simply keying in the identification of that customer.

➢ Similarly, record maintenance and updation can also be accomplished by using the
identification of the customer with all the details being automatically generated. These
details are also being promptly automatically updated in the master file thus keeping
the record absolutely up-to-date.

➢ The entire information has maintained in the database or Files and whoever wants to
retrieve can’t retrieve, only authorization user can retrieve the necessary information
which can be easily be accessible from the file

17
System Study & Analysis
PRINCIPLES OF SYSTEM ANALYSIS
1. Understand the problem before you begin to create the analysis model.

2. Develop prototypes that enable a user to understand how human machine interaction will
occur.

3. Record the origin of and the reason for every requirement.

4. Use multiple views of requirements like building data, function and behavioral models.

5. Work to eliminate ambiguity.

ENTITY RELATIONSHIP DIAGRAM (ERD)

Entity – Relationship Diagram: This depicts relationship between data objects. The attribute of
each data objects noted in the entity- relationship diagram can be described using a data object
description. Data flow diagram serves two purposes:

1. To provide an indication of how data are transformed as they move through the system.

2. To depict the functions that transformation the data flow.

Data Objects: A data object is a representation of almost any composite information that must
be understood by the software. By composite information, we mean something that has a
number of different properties or attributes. A data object encapsulates data only there is no
reference within a data object to

operations that act on the data.

Attributes: Attributes define the properties of a data object and take on one of three different
characteristics.

They can be used to:

18
Name an instance of data object.

Describe the instance.

Make reference to another instance in other table.

Relationships: Data objects are connected to one another in a variety of different ways. We can
define a set of object relationship pairs that define the relevant relationships.

19
CARDINALITY AND MODALITY:
Cardinality:
The data model must be capable of representing the number of

occurrences of objects in a given relationship. The cardinality of an object relationship pair is

One-T0-One (1:1): An occurrence of object ‘A’ can relate to

one and only one occurrence of object ‘B’ and vice versa.

One-To-Many (1:N): One occurrence of object ‘A’ can relate

to one or may occurrences of object ‘B’ but an occurrence

of object ‘B’ can relate to only one occurrence of object ‘A’.

Many-To-Many (M: N): An occurrences of ‘B’ and an

occurrence of ‘B’ can relate to one or many occurrence of

‘A’.

Modality:

The modality of a relationship is zero if there is no explicit need for

the relationship to occur or the relationship is optional. The Modality

is one if the occurrence of the relationship is mandatory.

The object relationship pair can be represented graphically using the

Entity Relationship Diagrams.

A set of primary components are identified for the Entity Relationship Diagram,

1. Attributes,

2. Relationships and

20
3. Various Type Indicators.

The primary purpose of the Entity Relationship Diagram is to represent data objects and their
relationships

21
E-R DIAGRAM

22
23
LIST OF ALL RECORD

24
EXECUTIVE SUMMARY :-

My project title is Hotel Management System.I have tried my best to make the complicated
process of Hotel Management System as simple as possible using Structured & Modular
technique & Menu oriented interface. I have tried to design the Project in such a way that user
may not have any difficulty in using this package & further expansion is possible without much
effort. Even though I cannot claim that this work to be entirely exhaustive, the main purpose of
my exercise is perform each Employee’s activity in computerized way rather than manually
which is time consuming.

I am confident that this software package can be readily used by non-programming personal
avoiding human handled chance of error. This project is used by two types of users

i. Online Users.

ii. Administrator (management of the Hotel).

Online users can see the required articles or news

Administrator can maintain daily updates in the hotel records. Administrator is must be an
authorized user. He can further change the password. There is the facility for password
recovery, logout etc.The main aim of the entire activity is to automate the process of day to day
activities of Hotel like Room activities, Admission of a New Customer, Assign a room according
to customer’s demand, checkout of a computer and releasing the room and finally compute the
bill etc.The limited time and resources have restricted us to incorporate, in this project, only a
main activities that are performed in a HOTEL Management System, but utmost care has been
taken to make the system efficient and user friendly.

25
INTRODUCTION

My project title is Hotel Management System.I have tried my best to make the complicated
process of Hotel Management System as simple as possible using Structured & Modular
technique & Menu oriented interface. I have tried to design the Project in such a way that user
may not have any difficulty in using this package & further expansion is possible without much
effort. Even though I cannot claim that this work to be entirely exhaustive, the main purpose of
my exercise is perform each Employee’s activity in computerized way rather than manually
which is time consuming.

I am confident that this software package can be readily used by non-programming personal
avoiding human handled chance of error. This project is used by two types of users

i. Online Users.

ii. Administrator (management of the Hotel).

Online users can see the required articles or news

Administrator can maintain daily updates in the hotel records. Administrator is must be an
authorized user. He can further change the password. There is the facility for password
recovery, logout etc.

26
PURPOSE AND MOTIVATION

The main purpose of this vision document is to list the requirements of the Hotel
Management project. This document also helps us to collect and analyze the ideas
gathered for the project. This vision document will be subject to change, if more
requirements are added to the project. This document is mainly prepared to set stage
for the design phase of the project. The document being prepared is the first version of
vision document for the Hotel Management project.

C#.NET is a new technology which is being used a lot in the IT field. My interest to learn
this new technology has prompted me to take up this project, which would set the
stage for the applications I would be developing in the future.

PROJECT OVERVIEW

The Hotel Management project is an implementation of a general Hotel booking


application, which helps the administrator to search the availability of various hotel
rooms. This project also covers various features like registration of the users,
modifying the details of the application by the management staff or administrator , by
adding, deleting or modifying the customer details, flights information.

OVERALL PRODUCT DESCRIPTION

PRODUCT PERSPECTIVE

The Hotel Management project uses the .NET framework 4.0 and is completely
independent. The project itself is a bigger product and does not need to be introduced
into a larger system. The application would be running on a Windows Operating
system.

27
PRODUCT FEATURES

The Hotel Management has the following features:

This project is mainly intended for two types of audiences. One is the customer or the
end user and the other is the administrator of the application. Some of the major
functions of the product can be categorized under two different categories that are for
the administrator and the user.

Customer / End user activities

Customer use case diagram

The above use case diagram depicts all the functions or activities that a user or a
customer can perform on the application. They can be discussed in detail as follows:

Home Page: Like all the other hotel websites available online, the user can access the
user home page of the Hotel Reservation System , after he logs into the system. Here,
he can look up information regarding flights.

Login and Register: The Hotel Management also comes with the customer
registration details page, where the customer can enter his details and register.

Booking Rooms: The customer can also search for the rooms available and reserve his
place for the room by booking it.

28
Advantages:

• The advantages of booking a hotel online add up long before your arrival. Our legendary
customer service extends to the web
• One advantage of booking with the hotel directly is the use of the hotel's full cancellation
policy as well as not needing a deposit in most situations.
• Read reviews and compare prices for Online Hotel Booking.
• The most important advantage of online hotel booking is convenience, you can book your
room by simply sitting in home. Internet helps you to browse through the hotels around the
world and compare the facilities and rates easily.

29
Scope
Existing System with Limitations:

In this step, we provide a detailed description about the existing system and the problems faced in the
existing system. This stage there is no existing system previously; we are developing a new system. Till
now no system is available with this type of features and facilities. This system is developed for the all
types of users with highly flexible and configurable product is envisaged to ensure global marketing

1.2.2 Proposed System Features:

• Some of the service providers won't allow you to choose your hotel, they only allow you to
select location and quality of the hotel. Considerable discounts on hotels may be available in off-
seasons.
• Utilize the serve of online hotel booking service providers when you are planning for a trip.
• Each and every customer looks to book their hotel rooms early and conveniently.
• User can Post, update and delete the links in the all categories.
• Online hotel booking is the best ways to book rooms in your favourite hotels.
• Planning a vacation has never been easier and more reasonable than now. Easiness, affordable
pricing, and simple comparison shopping make online hotel bookings accepted to all.

30
SPECIFICATION REQUIREMENT

Requirement analysis for web applications encompasses three major tasks: formulation,
requirements gathering and analysis modeling. During formulation, the basic motivation and
goals for the web application are identified, and the categories of users are defined. In the
requirements gathering phase, the content and functional requirements are listed and interaction
scenarios written from end-user’s point-of-view are developed. This intent is to establish a basic
understanding of why the web application is built, who will use it, and what problems it will
solve for its users.

2.1 Software requirement Specification


A set of programs associated with the operation of a computer is called software. Software is the
part of the computer system, which enables the user to interact with several physical hardware devices.

The minimum software requirement specifications for developing this project are as follows:

Operating System : Windows XP/Vista/2000, Linux.

Presentation layer : PHP, CSS, HTML, JSP, FLASH

Database : My SQL

Presentation : Power Point 2003

Documentation Tool : Ms Office

For sending SMS, we need the SMS API and a gateway.

31
Hardware Requirement Specification:
The collection of internal electronic circuits and external physical devices used in building a computer is
called the Hardware.

The minimum hardware requirement specifications for developing this project are as follows:

Processor : Standard processor with a speed of 1.6 GHz


RAM : 256 MB RAM or more

Hard Disk : 20 GB or more

Monitor : Standard color monitor

Keyboard : Standard keyboard

Mouse : Standard mouse Functional Requirements


Module Description

The HOTEL MANAGEMENT SYSTEM consists of 2 modules and 5 categories.

The categories are as follows:

i. Advanced Search
ii. Car Hire
iii. Booking
iv. Payment
v. SMS Integration

The modules are

• Administrator
• User

32
Admin Module:

The Functionalities of the Administrator is:

1. The administrator should login into the system with unique his/her password and username.
2. If the username and password is validated then he can gain access to the system.
3. View the hotels can update and delete the hotels.
4. Post the special offers, add new hotel to the hotels list.
5. Insert /View the Availability and Price.
6. Post the links. Adding the links to the hotels and as well view the links.
7. Blocks the user view the status of the users.
8. Restrict the user to the see the more information with out login.

The Administrator can do the following actions:

1. Login
2. Change Password
3. Admin Functionalities
a. View Hotels
b. Add Hotels
c. Post Special Offers
d. Edit / Delete Hotels
e. Upload Hotel Images.
f Logout

33
User Module:

The Functionalities of the User is:

1. A new User can register with the application by entering his appropriate details.
2. The User should login into the system with unique his/her password and username.
3. If the username and password is validated then he can gain access to the system.
4. The User can change his password, To change the password, it should ask for the old password,
new password and confirm new password
5. View the Categories.

The User can do the following actions:

1. Register
2. Login
3. Change Password
4. User Functionalities
a. Advanced Search
b. Booking
c. Payment
5. Logout

34
User Analysis:

User analysis is the process of identifying the different categories of users to the application,
their hierarchies and their functionalities.

HOTEL MANAGEMENT SYSTEM

Administrator User

4.

35
TECHNOLOGIES USED

PHP: Hypertext Preprocessor

PHP is a widely used, general-purpose scripting language that was originally designed for web
development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML
source document and interpreted by a web server with a PHP processor module, which generates the
web page document.

PHP Advantages

PHP source code is compiled on-the-fly to an internal format that can be executed by the PHP engine. In
order to speed up execution time and not have to compile the PHP source code every time the webpage
is accessed, PHP scripts can also be deployed in executable format using a PHP compiler.

PHP is one of the most popular server side scripting languages running today. It is used for creating
dynamic webpages that interact with the user offering customized information. PHP offers many
advantages; it is fast, stable, secure, easy to use and open source (free).

PHP code is inserted directly into the HTML that makes up a website. When a visitor comes to the
website, the code is executed. Because PHP is a server side technology, the user does not need any
special browser or plug-ins to see the PHP in action.

The beauty of PHP lies in its simplicity. It is easy to understand and learn, especially for those with
backgrounds in programming such as C, javascript and HTML. The language is similar to C and Perl so
that anyone with a background in either C or Perl programming will feel comfortable using and
understanding PHP. PHP also runs on just about every platform including most UNIX, Macs and Windows
versions.

Another key advantage of PHP is its connective abilities. PHP uses a modular system of extensions to
interface with a variety of libraries such as graphics, XML, encryption, etc. In addition, programmers can
extend PHP by writing their own extensions and compiling them into the executable or they can create
their own executable and load it using PHP's dynamic loading mechanism.

36
A huge advantage that PHP offers is its community. Since PHP is an A huge advantage that PHP offers is
its community. Since PHP is an open source project, the PHP community is willing to share. If you're
looking for a particular script, chances are another user has already created something similar. Check
within the PHP community for availability. Likewise, if you have created a function that others might
enjoy, be sure to post the code for others.

A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed
anywhere in the document.

On servers with shorthand support enabled you can start a scripting block with <? and end with ?>.

For maximum compatibility, we recommend that you use the standard form (<?php) rather than the
shorthand form.

<?php
?> A PHP file normally contains HTML tags, just like an HTML file, and some PHP scripting code.

Below, we have an example of a simple PHP script which sends the text "Hello World" to the browser:

<html>
<body>

<?php
echo "Hello World";
?>

</body>
</html>

Each code line in PHP must end with a semicolon. The semicolon is a separator and is used to distinguish
one set of instructions from another.

There are two basic statements to output text with PHP: echo and print. In the example above we have
used the echo statement to output the text "Hello World".

Note: The file must have a .php extension. If the file has a .html extension, the PHP code will not be
executed.

Comments in PHP

In PHP, we use // to make a single-line comment or /* and */ to make a large comment block.

37
<html>
<body>

<?php
//This is a comment

/*
This is
a comment
block
*/
?>

</body>
</html>

Variables in PHP

Variables are used for storing a values, like text strings, numbers or arrays.

When a variable is declared, it can be used over and over again in your script.

All variables in PHP start with a $ sign symbol.

The correct way of declaring a variable in PHP:

$var_name = value;

PHP is a Loosely Typed Language In PHP, a variable does not need to be declared before adding a value
to it.

In the example above, you see that you do not have to tell PHP which data type the variable is.

PHP automatically converts the variable to the correct data type, depending on its value.

In a strongly typed programming language, you have to declare (define) the type and name of the
variable before using it.

In PHP, the variable is declared automatically when you use it.

38
Sessions
A PHP session variable is used to store information about, or change settings for a user session. Session
variables hold information about one single user, and are available to all pages in one application.

PHP Session Variables

When you are working with an application, you open it, do some changes and then you close it. This is
much like a Session. The computer knows who you are. It knows when you start the application and
when you end. But on the internet there is one problem: the web server does not know who you are
and what you do because the HTTP address doesn't maintain state.

A PHP session solves this problem by allowing you to store user information on the server for later use
(i.e. username, shopping items, etc). However, session information is temporary and will be deleted
after the user has left the website. If you need a permanent storage you may want to store the data in a
database.

Sessions work by creating a unique id (UID) for each visitor and store variables based on this UID. The
UID is either stored in a cookie or is propagated in the URL.

Starting a PHP Session

Before you can store user information in your PHP session, you must first start up the session.

Note: The session_start() function must appear BEFORE the <html> tag:

<?php session_start(); ?>

<html>
<body>

</body>
</html>

The code above will register the user's session with the server, allow you to start saving user
information, and assign a UID for that user's session.

39
Storing a Session Variable

The correct way to store and retrieve session variables is to use the PHP $_SESSION variable:

<?php
session_start();
// store session data
$_SESSION['views']=1;
?>

<html>
<body>

<?php
//retrieve session data
echo "Pageviews=". $_SESSION['views'];
?>

</body>
</html>

<?php
session_start();
// store session data
$_SESSION['views']=1;
?>

<html>
<body>

<?php
//retrieve session data
echo "Pageviews=". $_SESSION['views'];
?>

</body>
</html>

Output:

Pageviews=1

In the example below, we create a simple page-views counter. The isset() function checks if the "views"
variable has already been set. If "views" has been set, we can increment our counter. If "views" doesn't
exist, we create a "views" variable, and set it to 1:

<?php
40
session_start();

if(isset($_SESSION['views']))
$_SESSION['views']=$_SESSION['views']+1;
else
$_SESSION['views']=1;
echo "Views=". $_SESSION['views'];
?>

Destroying a Session

If you wish to delete some session data, you can use the unset() or the session_destroy() function.

The unset() function is used to free the specified session variable:

<?php
unset($_SESSION['views']);
?>

You can also completely destroy the session by calling the session_destroy() function:

<?php session_destroy(); ?>

Note: session_destroy() will reset your session and you will lose all your stored session data.

PHP Form Handling

The most important thing to notice when dealing with HTML forms and PHP is that any form element in
an HTML page will automatically be available to your PHP scripts.

Example

The example below contains an HTML form with two input fields and a submit button:

<html>
<body>

<form action="welcome.php" method="post">


Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>

41
</body>
</html>

The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input.

When a user fills out the form above and click on the submit button, the form data is sent to a PHP file,
called "welcome.php":

"welcome.php" looks like this:

<html>
<body>

Welcome <?php echo $_POST["fname"]; ?>!<br />


You are <?php echo $_POST["age"]; ?> years old.

</body>
</html>

Output could be something like this:

Welcome John!
You are 28 years old.

The PHP $_GET and $_POST functions will be explained in the next chapters.

Form Validation

User input should be validated on the browser whenever possible (by client scripts). Browser validation
is faster and reduces the server load.

You should consider server validation if the user input will be inserted into a database. A good way to
validate a form on the server is to post the form to itself, instead of jumping to a different page. The
user will then get the error messages on the same page as the form. This makes it easier to discover the
42
error.

MySQL

We started out with the intention of using the mSQL database system to connect to our tables
using our own fast low-level (ISAM) routines.This resulted in a new SQL interface to our
database but with almost the same API interface as mSQL.

The following list describes some of the important characteristics of the MySQL Database
Software. See also Section 1.6, “MySQL Development Roadmap”, for more information about
current and upcoming features.

Internals and Portability:

• Written in C and C++.

• Tested with a broad range of different compilers.

• Works on many different platforms.

• Uses GNU Automake, Autoconf, and Libtool for portability.

• APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are available.

Data Types:

• Many data types: signed/unsigned integers 1, 2, 3, 4, and 8 bytes long, FLOAT,


DOUBLE, CHAR, VARCHAR, TEXT, BLOB, DATE, TIME, DATETIME, TIMESTAMP,
YEAR, SET, ENUM, and OpenGIS spatial types.
• Fixed-length and variable-length records.

Statements and Functions:

Full operator and function support in the SELECT and WHERE clauses of queries. For example:
mysql> SELECT CONCAT(first_name, ' ', last_name)

FROM citizen

Security: A privilege and password system that is very flexible and secure,
and that allows host-based verification. Passwords are secure because all

43
password traffic is encrypted when you connect to a server.

Scalability and Limits:

• Handles large databases. We use MySQL Server with databases that contain 50
million records. We also know of users who use MySQL Server with 60,000 tables
and about 5,000,000,000 rows.

Connectivity: Clients can connect to the MySQL server using TCP/IP sockets on any platform.
On Windows systems in the NT family (NT, 2000, XP, or 2003), clients can connect using
named pipes. On Unix systems, clients can connect using Unix domain socket files.

• In MySQL 4.1 and higher, Windows servers also support shared-memory connections
if started with the --shared-memory option. Clients can connect through shared
memory by using the --protocol=memory option.

Localization:

• The server can provide error messages to clients in many languages. See
Section 5.11.2, “Setting the Error Message Language”.

• Full support for several different character sets, including latin1 (cp1252),
german, big5, ujis, and more. For example, the Scandinavian characters ‘å’, ‘ä’
and ‘ö’ are allowed in table and column names. Unicode support is available as of
MySQL 4.1.

Clients and Tools:

• MySQL Server has built-in support for SQL statements to check, optimize, and repair
tables. These statements are available from the command line through the mysqlcheck
client. MySQL also includes myisamchk, a very fast command-line utility for
performing these operations on MyISAM tables. See Chapter 5, Database
Administration.

• All MySQL programs can be invoked with the --help or -? options to obtain
online assistance.

44
MySQL Stability

This section addresses the questions, “How stable is MySQL Server?” and, “Can I depend
on MySQL Server in this project?”.The information in this section is based on data gathered from
the mailing lists, which are very active in identifying problems as well as reporting types of use.

Each release of the MySQL Server has been usable. Problems have occurred only when
users try code from the “gray zones.” The descriptions mostly deal with Versions 3.23 and later
of MySQL Server.

The MySQL Server design is multi-layered with independent modules. Some of the newer
modules are listed here with an indication of how well-tested each of them is:

• Replication (Stable)

Large groups of servers using replication are in production use, with good results work on
enhanced replication feature is continuing

• Inno DB tables (Stable)

The inno DB transactional storage engine has been stable since version 3.23.49. Inno DB is
being using in large, heavy-load production systems.

• BDB Tables (Stable)

The Berkerly DB code is very stable, but we are still improving the BDB transactional
storage engine interface in My SQL Server.

• Full text searches (Stable)

Full-text searching is widely used. Important feature enhancements were added in MySQL
4.0 and 4.1.

• MyODBC 3.51 (Stable)

MyODBC 3.51 uses ODBC SDK 3.51 and is in wide production use. Some issues brought up
appear to be application-related and independent of the ODBC driver or underlying database
server.

45
The InnoDB storage engine maintains InnoDB tables within a tablespace that can be created from
several files. This allows a table to exceed the maximum individual file size. The tablespace can include
raw disk partitions, which allows extremely large tables. The maximum tablespace size is 64TB.

The following table lists some examples of operating system file-size limits. This is only a rough
guide and is not intended to be definitive. For the most up-to-date information, be sure to check the
documentation specific to your operating system.

46
Tomcat

Apache Tomcat is the servlet container that is used in the official Reference Implementation for
the Java Servlet and Java Server Pages technologies. The Java Servlet and Java Server Pages
specifications are developed by Sun under the Java Community Process.

Tomcat 5 implements the Servlet 2.4 and Java Server Pages 2.0 specifications and includes many
additional features that make it a useful platform for developing and deploying web applications and
web services.

Directories and files: Directories and Files

$CATALINA_HOME represents the root of your Tomcat installation. When we say, "This
information can be found in your $CATALINA_HOME/README.txt file" we mean to look at the
README.txt file at the root of your Tomcat install.

These are some of the key tomcat directories, all relative to $CATALINA_HOME:

• /bin - Startup, shutdown, and other scripts. The *.sh files (for Unix systems) are
functional duplicates of the *.bat files (for Windows systems). Since the Win32
command-line lacks certain functionality, there are some additional files in here.

• /conf - Configuration files and related DTDs. The most important file in here is
server.xml. It is the main configuration file for the container.

• /logs - Log files are here by default.

• /webapps - This is where your webapps go.

INSTALLING TOMCAT

Installing Tomcat on Windows can be done easily using the Windows installer. Installation as a service:
Tomcat will be installed as a Windows NT/2k/XP service no matter what setting is selected. Using the
checkbox on the component page sets the service as "auto" startup, so that Tomcat is automatically
startup when Windows starts. For optimal security, the service should be affected a separate user, with
reduced permissions (see the Windows Services administration tool and its documentation).

Java location: The installer will use the registry or the JAVA_HOME environment variable to determine
the base path of the JDK or a JRE. If only a JRE (or an incorrect path) is specified, Tomcat will run but will
be unable tocompile JSP pages at runtime. Either all webapps will need to be precompiled (this can be
easily done using the Tomcat deployed), or the lib\tools. Jar file from a JDK installation must be copied
to the common\lib path of the Tomcat installation.

47
A Host is an association of a network name, e.g. www.yourcompany.com, to the Tomcat server.
An Engine may contain multiple hosts, and the Host element also supports network aliases such
as yourcompany.com and abc.yourcompany.com. Users rarely create custom Hosts because the
Standard Host implementation provides significant additional functionality.

itecture Overview:

Server: In the Tomcat world, a Server represents the whole container. A Server element represents the
entire Catalina servlet container. Therefore, it must be the single outermost element in the
conf/server.xml configuration file. Its attributes represent the characteristics of the servlet
container as a whole. Tomcat provides a default implementation of the Server interface, and this is
rarely customized by users.

Engine

An Engine represents request processing pipeline for a specific Service. As a Service may have
multiple Connectors, the Engine received and processes all requests from these connectors,
handing the response back to the appropriate connector for transmission to the client.

48
BEHAVIORAL DESCRIPTION

Data Flow:

There are three types of DFD’s they are

1. Context Level DFD


2. Top Level DFD and
3. Detailed Level DFD

Context Level DFD:

In the Context Level the whole system is shown as a single process.

• No data stores are shown.


• Inputs to the overall system are shown together with data sources (as External
entities).
• Outputs from the overall system are shown together with their destinations (as

Service

A Service is an intermediate component which lives inside a Server and ties one or more
Connectors to exactly one Engine. The Service element is rarely customized by users, as the
default implementation is simple and sufficient: service interface.

External entities).

DFD:

49
Top Level DFD:

The Top Level DFD gives the overview of the whole system identifying the major system
processes and data flow. This level focuses on the single process that is drawn in the context
diagram by ‘Zooming in’ on its contents and illustrates what it does in more detail.

50
51
Detailed Level DFD:

In Detailed D.F.Ds the main process is divided into sub processes and we try to find out the flow from
one process to another process. We find the interaction among External entities, processes, sub
processes and database.

52
Use Case Documentation:
Use Case Diagram

• A use case diagram is a diagram that shows a set of use cases and actors and relationships.
Contents

• Use case commonly contain


➢ Use cases
➢ Actors
Dependency, generalization and association relationships

Over all use case

53
Unregistration Use Case

Registration Use Case

54
55
Administrator Use Case

56
Process Flow:

Activity Diagrams:
• An activity diagram shows the flow from activity to activity. An activity is an ongoing non- atomic
execution within a state machine.
• Activities ultimately result in some action, which is made up of executable atomic computations that
result in a change in state of the system or the return of a value.
Activity diagrams commonly contain

➢ Activity states and action states


➢ Transitions
➢ Objects

• Like all other diagrams, activity diagrams may contain notes and constrains.

Login Process

<<Yes>>

Providing Retry
credentials

validation <<No>>

Services

57
Un Registration Process

58
Registration process

59
Administrator process

60
SYSTEM DESIGN

The main focus of the analysis phase of Software development is on “What needs to be done”. The
objects discovered during the analysis can serve as the framework or Design. The class’s attributes,
methods and association identified during analysis must be designed for implementation language. New
classes must be introduced to store intermediate results during the program execution.

Emphasis shifts from the application domain o implementation and computer such as user
interfaces or view layer and access layer. During analysis, we look at the physical entities or
business objects in the system, that is, which players and how they cooperate to do the work of
the application. These objects represent tangible elements of the business.
During the Design phase, we elevate the model into logical entities, some of which might relate
more to the computer domain as people or employees. Here his goal is to design the classes that we
need to implement the system the difference is that, at this level we focus on the view and access
classes, such as how to maintain information or the best way o interact with a user or present
information.

Design process:

During the design phase the classes identified in object-oriented analysis Must be revisited with a shift
focus to their implementation. New classes or attribute and Methods must be an added for
implementation purposes and user interfaces. The object-oriented design process consists of the
following activities:

1. Apply design axioms to design classes, their attributes, methods, associations, structure

And protocols Refine and complete the static UML class diagram by adding details to the UML diagram.
This step consists of following activities. *Refine attributes *Design methods and protocols by utilizing a
UML activity diagram to represent the method’s algorithms.

*Refine associations between classes

*Refine class hierarchy and design with inheritance

*Iterate and refine again


61
2. Design the access layer

• Create mirror classes: For every business class identified and created. For
example, if there are three business classes, create three access layer classes.

• Identify access layer class relationships.


• Simplify classes and their relationships: The main goal here is to eliminate
redundant classes and structures.

*Redundant classes: Do not keep two classes that perform similar translate results

activities. Simply select one and eliminate the other.

*Method classes: Revisit the classes that consist of only one or two methods to see if they
can be eliminated or combined with existing classes.

• Iterate and refine again.


Define the view layer classes

• Design the macro level user interface, identifying view layer objects.
• Design the micro level user interface, which includes these activities:
* Design the view layer objects by applying the design axioms and corollaries.

* Built a prototype of the view layer interface.

• Test usability and user satisfaction


• Iterate and refine.
3. Iterate refine the whole design process. From the class diagram, you can begin to extrapolate
which classes you will have to built and which existing classes you can reuse. As you do this, also
begin this, also begin thinking about the inheritance structure. If you have several classes that seem
relates but have specific differences.

Design also must be traceable across requirements, analysis, design from the Requirements model.

DESIGN AXIOMS

Axioms are a fundamental truth that always is observed to be valid and for which there is no
counter example or exception. Such explains that axioms may be hypothesized form a large
number of observations by nothing the common phenomena shared by all cases; they cannot
be proven or derived, but they can be invalidated by counter examples or exceptions. A
62
theorem is a proposition that may not be self-evident but can be proven from accepted
axioms. If therefore, is equivalent to a law or principle. A corollary is a proposition that
follows from an axioms or another proposition that has been proven. Again, corollary is
shown to be valid or not valid in the same manner as a theorem. In the two important axioms
axiom 1 deals with relationships between system components and axiom 2 deals with the complexity of
design.

The following the two important axioms:

Axiom 1: The independence axiom, which maintain the independence of the components.

Axiom 2: The information axioms that maintain the information content of the design.

Axioms1 states that, during the design process, as we go from requirement and use case to a system
component, each component must satisfy that requirement without affecting other requirements.

An axiom 2 is concerned with simplicity. Scientific theoreticians often rely on a general rule known as
Occam’s razor, after William of Occam. He says, “The best theory explains the known facts with a
minimum amount of complexity and maximum simplicity and straightforwardness.”

The best designs usually involve the least complex code but not necessarily the fewest number of classes
or methods. Minimizing complexity should be the goal, because that produces the most easily
maintained and enhanced application. In an object-oriented system, the best way to minimize
complexity is to use inheritance and the systems built in classes and to add as little as possible to what
already is there.

From the two design axioms, many corollaries may be derived as a direct consequence of the axioms.
These corollaries may be more useful in marking specific design decisions, since they can be applied to
actual situations.

1. Uncoupled design with less information content: Highly cohesive objects can improve coupling
because only a minimal amount of essential information need be passed between objects. The
degree or strength of coupling between two components is measured by the amount and
complexity of information transmitted between them.
2. Single purpose: Each class must have single, clearly defined purposes.
3. Large number of simple classes: Keeping the classes simple allows reusability. Large and
complex classes are too specialized to be reused.
63
4. Strong mapping: There must be a strong association between the physical system and logical
design. During the design phase, we need to design this class, design its methods, its association
with other objects. So a strong mapping links classes should be identified.

5. Standardization: promote standardization by designing interchangeable and reusing existing


classes or components.
6. Design with inheritance: Common behavior must be moved to super classes. The super class-sub
class structure must make logical sense.

Refining attributes and methods:

Attributes identified in object oriented analyzed must be refined in the design phase. In the analysis
phase, the name of the attributes was sufficient. But in the design phase, detailed information must be
added to the model. The three basic types of attributes are:

1. Single valued attributes: This has only value or state.


2. Multiplicity or multivalue attributes: This has a collection of many values at any point in time.
3. Instance connection attributes: This is required to provide the mapping needed by an object to
fulfill its responsibilities.

UML attribute presentation:

Visibility name: type-expression=initial-value

Visibility indicates either public visibility or protected visibility or private visibility. The public visibility
indicates that the attribute can be accessible to all classes. The protected visibility indicates that the
accessibility is given to the subclasses and operations of the class. The private visibility indicates that the
accessibility can be given only to the operations of the class only.

Type expression is a language dependent specification of the implementation type of an attribute. Initial
value is a language dependent expression for the initial value is optional.

Sequence Diagram

• An interaction diagram shows an interaction, consisting of a set of objects and their


relationships, including the messages that may be dispatched among them.
• A sequence diagram is an interaction diagram that emphasizes the time ordering of messages.

64
• Graphically, a sequence diagram is a table that shows objects arranged along x-axis and
messages, ordered in increasing time, along the y-axis.
Contents

• Sequence diagrams commonly contain the following:


➢ Objects
➢ Links
➢ Messages
Like all other diagrams, sequence diagrams may contain notes and constrains.

Administrator Sequence

65
Un registration sequence

66
Registration sequence

67
Collaboration Diagram

- Collaboration is a society of classes, interfaces, and other elements that work together to provide
some cooperative behavior that’s bigger than the sum of all its parts.

- Collaboration is also the specification of how an element, such as a classifier or an operation, is


realized by a set of classifiers and associations playing specific roles used in a specific way

Contents

Collaboration diagrams commonly contain the following:

▪ Objects
▪ Links
▪ Messages
Like all other diagrams, sequence diagrams may contain notes and constrains

68
Administrator Collaboration

69
Un registration collaboration

70
Registration collaboration

71
Component diagram

Deployment Diagram

- A deployment diagram is a diagram that shows the configuration of run time processing nodes and
the components that live on them.

- Graphically, a deployment diagram is collection of vertices and arcs.

Contents

72
- Deployment diagram commonly contain the following things:

• Nodes
• Dependency and association relationships
- Like all other diagrams, deployment diagrams may contain notes and constraints.

- Deployment diagrams may also contain components, each of which must live on some node.

- Deployment diagrams may also contain packages or subsystems, both of which are used to group
elements of your model into larger chunks

73
Class diagram

74
75
Er –diagram

76
77
TESTING AND IMPLEMENTATION
Testing

• Testing Methodologies
o Black box Testing:
o White box Testing.
o Gray Box Testing.

• Levels of Testing
o Unit Testing.
o Module Testing.
o Integration Testing.
o System Testing.
o User Acceptance Testing.

• Types Of Testing
o Smoke Testing.
o Sanitary Testing.
o Regression Testing.
o Re-Testing.
o Static Testing.
o Dynamic Testing.
o Alpha-Testing.
o Beta-Testing.
o Monkey Testing.
o Compatibility Testing.
o Installation Testing.
o Adhoc Testing.
o Ext….
• TCD (Test Case Documentation)
• STLC
o Test Planning.
o Test Development.
o Test Execution.

78
o Result Analysis.
o Bug-Tracing.
o Reporting.
• Microsoft Windows – Standards
• Manual Testing
• Automation Testing (Tools)
o Win Runner.
o Test Director
Testing:

• The process of executing a system with the intent of finding an error.


• Testing is defined as the process in which defects are identified, isolated, subjected for
rectification and ensured that product is defect free in order to produce the quality product and
hence customer satisfaction.
• Quality is defined as justification of the requirements
• Defect is nothing but deviation from the requirements
• Defect is nothing but bug.
• Testing --- The presence of bugs
• Testing can demonstrate the presence of bugs, but not their absence
• Debugging and Testing are not the same thing!
• Testing is a systematic attempt to break a program or the AUT
• Debugging is the art or method of uncovering why the script /program did not execute properly.
Testing Methodologies:

• Black box Testing: is the testing process in which tester can perform testing on an application
without having any internal structural knowledge of application.
Usually Test Engineers are involved in the black box testing.

• White box Testing: is the testing process in which tester can perform testing on an
application with having internal structural knowledge.
Usually The Developers are involved in white box testing.

• Gray Box Testing: is the process in which the combination of black box and white box
techniques are used.

79
Levels of Testing:

Test Planning: 1.Test Plan is defined as a strategic document which


describes the procedure how to perform various testing on the total
application in the most efficient way.

2. Objective of testing,

3. Areas that need to be tested,

4. Areas that should not be tested,

5. Scheduling Resource Planning,

7. Areas to be automated, various testing tools used

Test Development: 1. Test case Development (check list)

2. Test Procedure preparation. (Description of the test cases)

Test Execution: 1. Implementation of test cases. Observing the result.

Result Analysis: 1. Expected value: is nothing but expected behavior

Of application.

2. Actual value: is nothing but actual behavior of the

application

Bug Tracing: Collect all the failed cases, prepare documents.

Reporting: Prepare document (status of the application)

80
Types Of Testing:

• Smoke Testing: is the process of initial testing in which tester looks for the availability of all the
functionality of the application in order to perform detailed testing on them. (Main check is for available
forms)
• Sanity Testing: is a type of testing that is conducted on an application initially to check for the proper
behavior of an application that is to check all the functionality are available before the detailed testing is
conducted by on them.
• Regression Testing: is one of the best and important testing. Regression testing is the process in which
the functionality, which is already tested before, is once again tested whenever some new change is
added in order to check whether the existing functionality remains same.
• Re-Testing: is the process in which testing is performed on some functionality which is already tested
before to make sure that the defects are reproducible and to rule out the environments issues if at all
any defects are there.
• Static Testing: is the testing, which is performed on an application when it is not been executed. ex:
GUI, Document Testing
• Dynamic Testing: is the testing which is performed on an application when it is being executed. ex:
Functional testing.
• Alpha Testing: it is a type of user acceptance testing, which is conducted on an application when it is
just before released to the customer.
• Beta-Testing: it is a type of UAT that is conducted on an application when it is released to the
customer, when deployed in to the real time environment and being accessed by the real time users.
• Monkey Testing: is the process in which abnormal operations, beyond capacity operations are done
on the application to check the stability of it in spite of the users abnormal behavior.
• Compatibility testing: it is the testing process in which usually the products are tested on the
environments with different combinations of databases (application servers, browsers…etc) In order to
check how far the product is compatible with all these environments platform combination.
• Installation Testing: it is the process of testing in which the tester try to install or try to deploy the
module into the corresponding environment by following the guidelines produced in the deployment
document and check whether the installation is successful or not.
Adhoc Testing: Adhoc Testing is the process of testing in which unlike the formal testing
where in test case document is used, with out that test case document testing can be done of an
application, to cover that testing of the future which are not covered in that test case document.
Also it is intended to perform GUI testing which may involve the cosmotic issues
81
TCD (Test Case Document):

Test Case Document Contains

• Test Scope (or) Test objective


• Test Scenario
• Test Procedure
• Test case
This is the sample test case document for the Acadamic details of student project:

Test scope:

• Test coverage is provided for the screen “ Acadamic status entry” form of a student module of
university management system application
• Areas of the application to be tested
Test Scenario:

• When the office personals use this screen for the marks entry, calculate the status details,
saving the information on student’s basis and quit the form.
Test Procedure:

• The procedure for testing this screen is planned in such a way that the data entry, status
calculation functionality, saving and quitting operations are tested in terms of Gui testing,
Positive testing, Negative testing using the corresponding Gui test cases, Positive test cases,
Negative test cases respectively

Test Cases:

• Template for Test Case


T.C.No Description Exp Act Result

82
Guidelines for Test Cases:

1. GUI Test Cases:


• Total no of features that need to be check
• Look & Feel
• Look for Default values if at all any (date & Time, if at all any require)
• Look for spell check
Example for GUI Test cases:

T.C.
Actual
No Description Expected value value Result

Check for all the features in The screen must contain

1 the screen all the features

Check for the alignment of The alignment should be

2 the objects as per the validations in proper way

2. Positive Test Cases:


• The positive flow of the functionality must be considered
• Valid inputs must be used for testing
• Must have the positive perception to verify whether the requirements are justified.
Example for Positive Test cases:

T.C. Description Expected value Actual Result


value
No

1 Check for the date Time The date and time of the system
must be displayed
Auto Display

2 Enter the valid Roll no into the It should accept

83
student roll no field

3. Negative Test Cases:


• Must have negative perception.
• Invalid inputs must be used for test.
Example for Negative Test cases:

T.C. Description Expected value Actual Result

No value

1 Try to modify the information in Modification should not


date and time
be allow

2 Enter invalid data in to the student It should not accept invalid


details form, click on data, save should not allow

Save

84
85
OUT-PUT SCREENS
Screens

Home Page:

86
User Registration Page:

87
User Login:

88
Advanced Search:

89
Car Hire Page:

90
Search result hotel info.

91
Search Result (Hotel Photos):

92
Search Result (Hotel Facilities):

93
User Home Page:

94
Payment Page:

95
Successfully done page:

96
Admin Login:

97
Admin Panel:

98
Admin (Edit / Delete Hotel):

99
customer and user

Some of the functions of the Hotel Management, such as creating, maintaining

and updating the database are available only to the administrator. The functions of
the administrator, explained in detail are as follows:

Administrator Activities

Login: The administrator has to login first in order to be able to make changes to the
Hotel Management, by adding, deleting or modifying the data in the Hotel
Management database.

Add/Modify Customer Information: Daily the Hotel Management will have many
customers registering with the application and many of them unsubscribing. Only
the administrator will have the sole rights to modify the database accordingly.

Add/Modify Flight Information: The Administrator also has the sole rights to add,
delete or modify the HOTEL information. Sometimes any room information has to be
100
modified or if any new flights need to be added to the database, these operations
are performed by the administrator.

administrator use case diagram

USER CHARACTERISTICS

There are two kinds of users for the Hotel Management. One is the customer and

the other is the administrator. The customers do not need to have any prior training to use
the application. However, instructions for making room reservations would be provided to
them through application. The administrators would however need to be trained in
order to use the application.

CONSTRAINTS

In case of changes made to the database, the application should be able to show the
updated information without much delay. The database for the project is designed to
be of moderate size. The Hotel Management system will be designed in such a way
that, it can be run on a Windows 8 and its older versions. The .NET technology will be
used to code the project and SQL server 2012 will act as the database for the project.

SPECIFIC REQUIREMENTS

EXTERNAL INTERFACES

The different types of interfaces that we would come across while developing the
Hotel Management application are as follows:

• User Interface
• Hardware Interface

• Software Interface

101
USER INTERFACE

There are two types of users for the Hotel Management project. One is the

Customer and the other is the administrator. Both the customer and administrator
user interface

would be a graphical user interface. The graphical user interface for the customer
home page would be as follows:
20

Home page contains a booking form . Customer fill the book form to search a particular
room as per date, Customer will fill the Checkout and checkin date with number of
adults and childeren then click on availabilty ,then result will be rooms that are
available for that particulaer date.

102
Once customer selection of room completed , user can reserve room and make payments,
Next screenshot shows the same.

103
Use Case name: User Registration

• Description: This use case describes the scenario where the user registers with
the Application by providing all the necessary details, in order to make
reservations or bookings for rooms.

• Actor: User or the Customer

• Input: The user or the customer will have to provide all the necessary details present
in The customer registration form of the application.

Use Case name: User Login

• Description: This use case describes the scenario where the user logs into
the application, with the username and password
• Actor: User or the Customer

• Input: The user or the customer creates a username and password He then uses them
to logon to the system and make reservations or views any information.

Use Case name: Book Flights

• Description: This use case describes the scenario where the user books hotel rooms.

• Actor: User or the Customer

• Input: After logging into the application, the customer looks up the information
related to various rooms and checks the availability of rooms. If he finds that there are
Any available rooms, he then books them.

104
Use Case name: Login/Logout

.Description: This use case describes the scenario where the administrator of the
application, logs into the system and logs out after the work is done.

Actor: Administrator

• Input: The administrator logs into the application with the username and
password provided to him.

• Output: The application verifies the authenticity and displays the home page of
the administrator.

Use Case name: Add/Delete or Modify Customer information

• Description: This use case describes the scenario where the administrator adds, deletes
or modifies customer information in the system database

• Actor: Administrator

• Input: The administrator of the applications logs onto the system with his
username and password.

• Output: The application authenticates the administrator, and then displays the pa where
the administrator can add new customers to the database, or delete existing customers or
modify details of customers in the database

105
Use Case name: Add/Delete or Modify flight information

• Description: This use case describes the scenario where the administrator adds, deletes
or modifies rooms information in the application database

• Actor: Administrator

• Input: The administrator logs onto the system with the username and
password provided to him.

• Output: The application authenticates the administrator, by verifying the


username and password. Then the application displays the page where the
administrator can add new rooms to the database.

PERFORMANCE REQUIREMENTS

The Hotel Management application should be able to respond to the queries


submitted by the customer without much delay. When a user searches for a room,
the application should not take much time to return the results. Considering that the
application is of moderate size, it should be able to display the results at a time on a
page, when the customer looks up for any particular data.

106
ARCHITECTURE DESIGN

INTRODUCTION

The main purpose of the Architecture Design document is to discuss the


architectural design for the Hotel Management project in a clear and concise form.
This design document will give a detailed description of the presentation tier, the
middle tier which consists of the class diagrams, sequence diagrams for the Hotel
Management and finally the data tier.

ARCHITECTURE OF THE AIRLINE RESERVATION SYSTEM

The architecture of the Hotel Management is based on the three-tier architecture.

This three-tier architecture mainly consists of three layers namely:

• Presentation Tier

• Business Tier
• Data Access Tier

The Presentation Tier converts and displays information into a human legible form.
This tier displays information related to services such as browsing the room
avaliability, booking rooms etc. It communicates with the other tiers by outputting
results to the client tier and all the other tiers. The Business Logic tier is mainly
responsible for information exchange between the user interface and the database
of the project. The final layer of the three tiered architecture is the Data Access tier,
which mainly consists of the Database servers. The information related to the Hotel
Management is stored and retrieved from here.

107
A simple representation of the three-tier architecture would be as follows:

PRESENTATION TIER

The presentation tier is the top most layer of the Hotel Management application.

The presentation tier is mainly responsible for the user interface of the application
which deals with the presentation of data to the user. The presentation tier of the
Hotel Management is mainly formed by the C#.NET forms. In the case of the Hotel
Management project, I have used the Visual Studio 2012.NET to create the forms.
Each form will have the extension .cs and there are several forms created for the
user and the administrator.

BUSINESS LOGIC TIER

The Business Logic Tier is the middle tier of the three-tier architecture. The business
logic for the Hotel Management would be present here. In the case of my project,
the C# classes would be performing the duty of the business logic. This is the layer
which is responsible for the information exchange between the user interface and
the database. The Hotel Management mainly consists of the Users, which can be
further classified into the customer and administrator of the Hotel Management.

108
The class diagram for the Hotel Management would be as follows

109
SEQUENCE DIAGRAM

The sequence diagram for the Customer of the Hotel Management would be as follows:

DATABASE TIER

The database tier is the final and last tier of the three-tier architecture. All the data
related to the Airline Reservation System project is stored and retrieved from here.
For this project I have used the Microsoft SQL server to create the database. To be
specific, Microsoft SQL server 2012 is being used. It is very easy to work with and
makes creation and maintaining of tables very easy.

110
COMPONENT DESIGN

INTRODUCTION AND PURPOSE

The main purpose of the Component Design document is to provide and


explain the component design for the Inventory Management System project
in detail.

CLASS DIAGRAM

The class diagram of the Inventory System project would be as follows:

111
CLASS DESCRIPTIONS

ROOM TYPES:-

The attributes for the room types table are roomtypeid, which is a unique key and
roomtypename

ROOM CATEGORY:-

The attributes for the rooms category table are roomcategoryid, which is a
unique key and roomcategoryname.

The functions of the above two table are that the admin can

Search for the type and category of the rooms.

Add the type or category of the room.

ROOM FARE:-

The attributes for the ROOMFARE table are fareid, which is a unique key,
roomcategoryid, roomtypeid which are the foreign key and fare.

112
The function of this table is that the admin can enter the room fare
corresponding to the room category and room type that are added in the hotel.

HOTEL SECTION:-

The attributes for the HotelSection are sectioned which is the primary key and
Section name.

HOTEL SERVICES:-

The attributes of this table are serviced which is a primary key,


serviceName, serviceCharges and sectioned.

FUNCTIONS:-

The function of the above two tables are

Add:- admin can add the the Section and its corresponding services that
are provided in the hotel to the customers

113
HOTEL CUSTOMER:-

The attributes of this table are customerid, which is a primary key,


customerName, Address, Checkin, Checkout and roomNo.

The functions of this form is :

The admin enters the customer details that are required by the hotel for the
customer’s check in.

The admin asks the customer for his/her details and seeks for which type and
category room he/she is availing for, then assigns the corresponding room.

CUSTOMER BILL:-

The attributes of this table are customerid which is a reference key, roomNO,
serviced which is also a reference key, date of service and status.

The function of this table is;-

114
The admin retrieves the information about the customer’s stay in the hotel.

He adds the the room no in which the customer was staying.

Also he checks the service that a customer has prevailed during the
stay Finally he enters the status whether the bill has paid or it is
pending.

115
TEST PLAN

TEST PLAN IDENTIFIER

Hotel Management System

INTRODUCTION

The main purpose of the test plan for the Hotel Management System is to discuss
the testing details of the use cases of the Hotel Management System. The software
project test plan also describes the objective, scope and approach of the software
testing effort for the Hotel Management System project. The test plan for the
Hotel Management System also indicates the personnel responsible for each task
and also specifies the risks associated with the test plan.

OBJECTIVES

The main objectives of the test plan for the Hotel Management
System are as follows:

• To identify the features of the system that will be tested.

• To identify and define all the activities necessary to prepare for and conduct the
testing process on the Hotel Management System.

• To discuss the testing techniques being used to test the Hotel Management System.

DEFINITIONS

The following are some of the terms and definitions that are related to the test plan of the

Hotel Management System:

116
• Pass/Fail criteria: Decision rules that are used to determine whether a software
item passes or fails a test.
• Test: A collection of one or more test cases

• Test Item: A software item that is an objective of testing.

• Test Plan: A document describing the scope, approach, resources and schedule
of the intended testing activities.
• Test Summary Report: A document summarizing the testing activities and results.

• Testing: The process of analyzing a software item to detect the differences


between the existing and required conditions.

TEST ITEMS

This section of the test plan lists all the items of the Hotel Management System
project that will be tested:

• Login
• generate bill
• Register

APPROACH

This section of the test plan describes the overall approach for testing the Hotel
Management System project. The approach followed for testing the Hotel
Management System ensures that the major features of the project are adequately
tested. The testing would be carried out on the Hotel Management System while
logging into the system as a Hotel manager or a superadmin of the system.

INTEGRATION TESTING

In Integration Testing, the individual software modules are combined and tested
as a whole unit. The integration testing generally follows unit testing where each
module is tested as a separate unit. The main purpose of the integration testing
is to test the functional and performance requirements on the major items of the
project.

117
All the modules of the project developed individually would be combined together
and tested as a whole system in the integration testing

REGRESSION TESTING

The Regression Testing is generally done whenever modifications are made to the
source code of a project. The Regression Testing can also be defined as the process
of testing changes made to the computer program and also makes sure that the
older programming still works with the new changes.

So, before any new version of a software product is released, the old test cases for
the project will be run against the software with the changes made, to make sure
that the old functionalities of the project still work.

ACCEPTANCE TESTING

This testing is generally performed when the project is nearing its end. This test
mainly qualifies the project and decides if it will be accepted by the users of the
system. The users or the

customers of the project are responsible for the test.

SYSTEM TESTING

The system testing is mainly done on the whole integrated system to make sure that the
project that has been developed meets all the requirements. The test cases for the
system testing will be the combination of unit and integration tests

118
TEST CASES

The following are the test cases for the Hotel Management System:

TEST CASE 1 – USER LOGIN

• Incorrect Input: Incorrect username.

• Pass Criteria: An appropriate message should be generated to indicate that an


invalid username has been typed.

• Correct Input: The correct input would be a valid username of the user and a
correct password associated with the username which he uses to log in.

TEST CASE 2 – USER REGISTRATION

• Incorrect Input: Wrong format entered in the input fields for the registration page.

• Pass Criteria: An appropriate message should be generated to the user saying


that he has entered the wrong format in the specific input field.

• Correct Input: The correct input would a correct format entered by the user into
the input fields of the registration page.

• Pass Criteria: The pass criteria for Hotel Management System.

TEST CASE 3 – USER REGISTRATION

• Incorrect Input: The data fields left out empty in the registration page.

• Pass Criteria: An error message should be generated to the user saying that he has to
fill out those fields in order to be registered into the system.

• Correct Input: The correct input in this case, would be that the customer would enter
the data in all the fields in the registration form.

• Pass Criteria: The pass criteria for the system would be that it accepts all the new
user details and then registers the user and helps him log into the system.

TEST CASE 4 – GENERATE BILL

119
• Incorrect Input: Incorrect input in this case, would be incorrect search criteria entered
or incorrect format of data entered into the data entry fields of the generate bill page.

• Pass criteria: A message has to be generated to the user indicating the wrong
entry that he has made in the fields.

• Correct Input: A correct input would be entering the data into the data entry fields
in a correct format.

• Pass Criteria: The pass criteria for this test case would be that data will be added
to the database.and bill will be generated

PASS OR FAIL CRITERIA

The test cases executed on the Hotel Management System will pass if they meet the
specific requirements mentioned in the Vision document of the project. A test case
is said to fail, if the desired functionality is not satisfied by the system.

SUSPENSION CRITERIA AND RESUMPTION REQUIREMENTS

SUSPENSION CRITERIA

Testing for all the dependant features will be suspended if a test case fails. The
failed test case will be logged onto the test log which contains the description for
the error.

RESUMPTION REQUIREMENT

The test cases which are not dependant on the case where the bug is reported will
be executed in parallel with the bug fixing. Once the failed test case has been
taken note of and has been identified and fixed then the testing for the failed test
case will resume.

TEST DELIVERABLES

The following documents will be produced after the testing phase for the
Hotel Management System has been completed.

• Test Plan
• Test Cases
• Test Log

120
ASSESSMENT EVALUATION

INTRODUCTION

The Assessment Evaluation document presents the results obtained by testing the
Hotel Management System. The test cases are in reference to the test cases
defined in the Test Plan document from the Phase II.

TEST CASE RESULT SUMMARY

The summary of the test case result has been depicted in the table shown below:

These are the test cases for the User/Customer pages. The major part of testing
has been concentrated on the customer pages, as they would be the main clients
of the Hotel Management System.

The below table represents the summary of results of testing on the Administrator pages.

The results have been explained in detail later in the document.

121
DETAILED TEST RESULTS

MANUAL TESTING

To start with, I have performed manual testing on the Hotel Management System
Manual Testing is one of the oldest and rigorous methods of software testing. This
testing strategy gives the best opportunity to check every page thoroughly and
make sure it works in the expected manner. Due to the complexity of the various
automation tools and the time available for testing the entire application, I
preferred to use manual testing based on the fact that it is one of the best methods
of testing suggested for a beginner. All the test cases mentioned in the Test Plan
document of Phase II were tested here. The results of the manual testing are
represented in the following tables:

TC # 1 – USER LOGIN

122
TC # 3 – SEARCH AND BOOK ROOMS

TC # 6 - ADMINISTRATOR SIGN IN

123
TC # 7 – NEW FLIGHT ADDITION

thus, the Administrator forms have also passed the manual testing phase
and thus the above results have been produced

124
SNAPSHOTS OF THE FORMS

INTRODUCTION

The User Manual explains us the step by step procedure to use the Hotal
Management application.

REQUIRED SOFTWARE

The required software for the Hotal Management project would be as follows:

• Operating System: Microsoft Windows 8 or lower .

• PHP : It can be downloaded from Microsoft website


(http://www.microsoft.com/en- in/download/details.aspx?id=3324 ).

Microsoft SQL server 2019: It can be downloaded from Microsoft


website(http://www.microsoft.com/en-in/download/details.aspx?id=35575 )

HOTEL MANAGEMENT SYSTEM DETAILED VIEW

1. LOGIN FORM

125
MAIN FORM

The administrator can perform the following functions like

Addition of new ROOM TYPES

Add new ROOM CATEGORIES

Add new Hotel section

Add services

Add Customers

126
ROOM TYPE:-

127
ROOM CATEGORY:

128
ROOM FARE:-

129
HOTEL ROOM:-

130
HOTEL SECTION:-

131
CUSTOMER DETAILS:-

132
SERVICE CHARGES:-

133
CUSTOMER BILL:-

134
CONCLUSION

This project is designed to meet the requirements of Online Hotel Management. It has been developed
in VB & Mas-Access keeping in mind the specifications of the system.

For designing the system we have used simple data flow diagrams.

Overall the project teaches us the essential skills like:

▪ Using system analysis and design techniques like data flow diagram in designing the system.

▪ Understanding the database handling and query processing.

135
REFERENCES

The following references have been used by me, during all the phases of the
project:

1. http://www.tutorialspoint.com/csharp/index.htm
2. http://msdn.microsoft.com/en- us/library/kx37x362(v=vs.80).aspx

3. SQL Server 2012 download -


http://www.microsoft.com/en-
in/download/details.aspx?id=35575
4. http://www.c-sharpcorner.com/

136
9. BIBLIOGRAPHY

System Analysis And Design

- Kenneth E. Kendall, Julie E. Kendall

An Analysis and Design of Information Systems

- Grayce M. Booth

Software Engineering

- Roger S. Pressman

Database Management System

- James A. Larson

PHP: A Beginner’s Guide

- Riwanto Megosinarso

Java Server Pages Programming: A visual professional guide for Design

- Scott Mitchell

137

Вам также может понравиться