You are on page 1of 88

1

A
PROJECT
REPORT PIZZA hut

Submitted By:
Priyanka rani
166819548

2
CONTENTS
1) Certificate 4.
2) Acknowledgement 5.
3) Declaration 6.
4) Introduction 9.
3.1) Requirement analysis
3.1.1) Problem Definition
3.1.2) Scope and Objectives of the project

4) System Methodology (Waterfall Model)

5) Analysis

5.1) Feasibility study

5.2) Data flow diagrams (DFDs)

5.2.1) 0 Level DFD

5.2.2)1 Level DFD

6) System Design

6.1) Hardware and Software Requirements

6.2) Menu Design

6.3) Database Design

6.4) Coding

7) Testing

7.1) Test Screens

8) Input Output Screens

9) User Manuals

10) Conclusion

11) Limitations

12) Bibliography

3
CERTIFICATE

This is to certify that the project report has been completed by Priyanka rani

under my supervision and guidance during the final year of Bachelor degree

of computer applications.

This is to further certify that the project report is authentic and

has been prepared by student under my supervision.

Mr. VIKAS SHARMA

Asst. Professor of BCA department

H.S.R College Jeewala Saharanpur

4
ACKNOWLEDGEMENT
It plunges me in exhilaration in taking privilege in expressing our heartfelt

gratitude to Mr. VIKAS SHARMA of BCA Department of H.S.R Degree College,

for providing every facility, constant supervision. It gives us immence pleasure to

acknowledge a debt of gratitude especially to our project incharge Mr. VIKAS

SHARMA , for his constant encouragement, suggestions, constant supervision,

and abundant support throughout our project.

Thanks to all the teaching and non-teaching staff of H.S.R Degree


College for their support and also to our Teamates for their valuable

Co- operation.

5
DECLARATION

I undersigned, hereby declare that the project titled “PIZZA


HUT” submitted in partial fulfillment for the award of degree of
Bachelor of computer application of the university of
“Chaudhary charan singh university” is a bonafide record of
work done by me under the guidance of Priyanka rani. This
report has not previously formed the bases for the award of
any degree or similar title of any university.

6
CCS UNIVERSITY MEERUT
Project Work Evaluation

1. Candidate Roll No: 166819548

2. Name: PRIYANKA RANI

3. Project Title: PIZZA HUT

4. College/Institute: H.S.R COLLEGE JEEWALA, SAHARANPUR(681)

5. Submitted for course & year :- BCA (2019)

6. University project Examiner’s Evaluation

Total Marks Awards ..................... out of

Details of evaluation alone with name and sign of university examiner.

Particulars Marks out of Marks Awarded Examiner Name &


Sign

7. Details of Evaluation along with name and sign: ……………..

8. Remarks of University Examiner: …………………………….

7
OBJECTIVE

Objective of this software is to computerize any Fast-food Restaurant, so

that all the transactions become fast and there should not be any error in

transactions like calculation mistake. It replaces all the paper work. It

keeps records of all the bills also, given to the customers, so that user

could update his daily accounts.

8
INTRODUCTION

This project is entitled ‘PIZZA HUT’ which is very famous spot for people
of all age group. Due to increasing popularity of Pizza Hut,it needs to get all the
work and procedures automated which eventually decreases the burden alongwith
whole lot of improvement in working manner. Hence,in order to accomplish this
task, the software is prepared to perform bulk amount data and sorting procedures.
As the time taken in dealing with the problem is quite large, so, we need to prepare
a software to solve these problems.

The software for department of pizza hut is developed in Visual Basic


because of the fact that it is one of the leading programming language as wall as
more powerful,easy to understand and user-friendly. Visual Basics helps to design
database files as per requirement and specific format. It also helps us to enter and
manage data in database files.

Thus, we use VB and ACCESS to prepare our software. In this, a perfect


report is being prepared for those who have to pay bills, for collection of orders for
varios items, to keep track of customer’s arrival & departure alongwith their orders
and to employees been working in-house. Collectively, we need to maintain the
records of sales per day.

9
As we know maintaining records is quite tedious work and has to be made
and updated regularly. So to ensure the accuracy, feasibility, time consumption and
maintenance. We need to prepare the project with utmost care & dedication. To
start up with the project, one should know about the exact techniqhe which is based
on certain steps:-

1. Requirement Analysis & Specifications


2. Designing
3. Implementation & Unit Testing
4. Integration & System Testing
5. Maintenance & Operation

10
Visual Basic
Visual Basic was derived from BASIC, and is an event-driven programming
language.Programming in Visual Basic is done visually, which means that as we
design,we will know how our application will look on execution.We can therefore
change and experiment with the design to meet our requirement.

These editions of Visual Basic are available:

 Standard
 Professional
 Enterprise

Features of Visual Basic


Visual Basic 6.0 has many powerful features that are required in today’s
programming environment,which include features from the previous
versions.Some of them are:

 Programming objects and events: the Visual forms and objects like list
boxes and radio buttons that we use on the forms, help us to interact with
applications in order to find out the flow of the program. The forms and
objects perform a specified action when an event occurs. This is known as
event-driven programming.
 A common programming platform across all Microsoft Office
applications: Almost all Microsoft Office applications support Visual Basic
by sharing and reusing code across applications.
 32-bit support: Visual Basic support 32-bit application.
 A quick and easy way to develop applications: The tools provided by Visual
Basic help us to reduce development time. It is faster to create applications
using the tools available.

 Objects types: New object types enable us to work faster and easier with
files and directories.

11
 ActiveX features: Visual Basic allows us to migrate applications to an
ActiveX document, which enables the application to install and run from a
web browser.

Visual Basic Development Environment


It consists of the following items:

 Menu bar: The menu bar is displayed directly below the title bar and
includes a list of options. Each option has a drop-down list that is related to
the option chosen from the menu bar.
 Form: A form is the main building block in a Visual Basic application. User
interacts with the controls on the home to obtain the desired result. In the
design mode, we can see a grid of dots on the form. The grid helps to line up
the controls at the time of design. The dots disappear at runtime PROJECT
WINDOW. The project window lists forms and modules in the current
project. A project is a list files used to build an application.
 Tool box: The tool box is a window that provides us with asset of tools that
are used to design time to place controls on the form. The buttons on the
toolbar depict controls.
Properties windows: The properties widows list the property settings for
the form are the control that we select. A property is a characteristic of an
object, such as size, pattern, or color.

12
he properties window will display the property of only one object at a time.

MS ACCESS

Microsoft access calls anything that can have a name and object. Within an access
database, the main objects are tables, queries, forms, reports, data access pages,
macros, modules.

DATABASE

A database is files in which you store data include all the major objects related to
the stored data, including objects you define to automat the use of your data. In
other database systems, the term database used to refer to only those files in which
you store data.

TABLE

An object you define and use to store data. Each table contains information about a
particular subject, such as customers or orders. Table contains fields (or columns)
that store different kinds of data, such as a name or an address, and, record (or
rows) that collect all the information about a particular instance of the subject.

E.g. All the information about a company

13
QUERY

Query in an object that provides a custom view of data from one or more table. In
Access, you can use the graphical query by example (QBE) facility or you can
write SQL statements to create your queries. You can define queries to select,
update, insert, or delete data. You can also define queries that create new tables
from data in one or more existing table.

FORM

An object designed primarily for data input or display or for control of application
execution. You use forms to customize the presentation of data that your
application extracts for queries or tables. You can also print forms. You can design
a form to run a macro or a Visual Basic procedure in response to any of a number
of events- for eg, to run a procedure when the of data changes.

REPORT

An object designed for formatting, calculating, printing and summarizing selected


data. You can view a report on your screen before you print it.

14
DATA ACCESS PAGE

An object that includes an HTML file and supporting files to provide custom
access to your data from Microsoft Internet Explorer. You can publish these files
on your company internet to allow other users on your network who also have
office 2000 and internet explorer version 5 or later to view, search, and edit your
data.

MACRO

Macro is an object that is a structured definition of one or more action that you
want Access to perform in response to a defined event. For eg, you might design a
macro that opens a second form in response to the selection of an item on a main
form. You might have another macro that validate the content of a field whenever
the value in the field changes. You can include simple conditions in macros to
specify when one or more actions in the macro should be performed or skipped.
You can use macros to open and execute queries, to open tables, or to print or view
reports. You can also run other macros or Visual Basic procedures from within a
macro.

MODULE
it is an object containing custom procedures that you code using Visual Basic.
Modules provide a discrete flow of actions and allow you to trap errors something
that you can’t do with macros. Modules can be stand- alone objects containing
functions that can be called from anywhere in your application, or they can be
directly associated with a form or a report to respond to events on the associated
form or report. Table stores the data that you can extract with queries and display
in reports and update in forms or data access pages.
Notice that forms, reports, and data access pages can use data either directly from
tables or a filtered “view” of the data created by using queries. Access has also
built-in functions that allow you to summarize and format your data in queries.

15
EVENT

Event is any change in state of an Access object.

For eg, you can write macros or Visual Basic procedures to respond to

 Opening a form
 Closing a form
 Entering a new row on a form
 Changing data in the current record

CONTROL
Control is an object on a form or report that contains data. You can even use design
a macro or a Visual Basic procedure that responds to the user pressing individual
keys on the keyboard when entering data.

16
SYSTEM METHODOLOGY

17
METHODOLOGY

The methodology used to develop the Pizza Hut or proposed system is waterfall model.

WATERFALL MODEL

It’s also known as Linear Sequential model or the classic life cycle model. This
model suggests a systematic, sequential approach to the software development that begins
at the system level and progresses through analysis, design, development and coding,
testing and maintenance.

The model acquires its name from the fact the classic software cycle is
represented as a sequencing of descending steps –like Waterfall.

Feasibility
study

Requirement
Definition

Design
specification

Coding

Testing

Implementation

Maintenance

18
SALIENT FEATURES OF THE WATERFALL MODEL
 It bought a definite to the process of the software development, which was a major
improvement over the previous code and fix culture.

 Each phase is district and is mandatory for every project irrespective of project
size.

 Every phase has a well—defined entry and exit criterion.

 Every phase has a provision for verification, validation and correction of errors
and inconsistencies.

STRENGHTS OF WATERFALL MODEL


The waterfall model redeems the software development process of the code and
fixes problems. Its major strength lies in the fact that it emphasizes the fact that the
software development process must be planned, disciplined, and well managed.

It also ensures through segregation that implementation of a product


happens only after all its development requirements have been met with. Another
strength of waterfall model is that it allows for communication between customer
and developer and specifies what will be delivered, when and at what cost.

19
REQUIREMENT ANALYSIS

Requirements analysis in systems engineering and software engineering, encompasses those tasks
that go into determining the needs or conditions to meet for a new or altered product,
taking account of the possibly conflicting requirements of the various stakeholders, such as
beneficiaries or users.
Systematic requirements analysis is also known as requirements engineering.
Requirements must be actionable, measurable, testable, related to identified business needs
or opportunities, and defined to a level of detail sufficient for system design.

There are three types of requirements: -


1) Unknown requirement: - This is such kind of a requirement which is forgotten
by user because they are not needed right now or by some other user who accesses
it.
2) Known user: - It is something which user believes to be implemented as it is must
for the existing system.
3) Undreamt requirement: - Users may not be able to think of new requirements
due to limited domain knowledge.

20
PROBLEMS OCCURING IN THE MANUAL DATABASE OF
PIZZA HUT

Manual system suffers many problems. Users found themselves in the perplexed
state while searching any detail.

The following limitations are encountered are:

 It becomes very difficult to maintain records related to stock.


 Keeping track of all the customers arriving and employees being working becomes
really difficult.
 Lot of time is wasted while surfing a particular record.
 Adding or removing the record of particular employee becomes tedious.
 It does not ensures security and accuracy to great extent.

21
SYSTEM REQUIREMENTS

Hardware Requirement

1. Pentium Processor or above

2. Color Monitor

3. Keyboard

4. 8 GB Hard Disk or above

5. 32 MB RAM or above

6. 1.44 MB Floppy Disk Drive

Software Requirement

1. Microsoft Windows 9x .

2. Microsoft Visual Basic 6.0.

22
ANALYSIS

Analysis is the first technical step in the process of any software development. A careful
analysis can help the software designer and programmer to have a better insight of the
product to be created. A careless analysis can result into incomplete or dysfunctional
software. To avoid such a situation it is very important to properly identify the required
software’s features and create an effective design for it.

It is also important to analyze and find out whether the application being developed suits
the current hardware and software platform available or not. The application should be
developed well within time and should meet the specified requirements. If the application
is being developed for commercial purposes then a cost-benefit analysis becomes must to
find out the real value of the software product.

An Object-Oriented approach will be followed to develop the application because the


data or information to be displayed and the user who will view that information are more
important here than the process flow of the system. This methodology will also make the
development process more efficient, effective and easy. The application thus developed
will be more user friendly and can be easily extended or modified whenever required.

23
TECHNIQUES USED FOR ANALYSIS

On-Site Observations:

This is one of the main tools for gathering information. It is a process of recognizing and
noticing people, objects and occurrences to obtain information. The major objective of
this tools is to get as close as possible to the real system being studies. For this reason it is
extensively used by the system analyst during the development of a particular system.

Guidelines for onsite observations:-


 What kind of system is it?
 Who are the important people in the system?
 Who runs the system?
 Apart from its formal function, what kind of system is it in comparison with
other systems in the organization? Is it primary or secondary contributor to
the organization?

It is to be kept in the mind that during observations the observer has to listen more than
talk and to listen with sympathetic and genuine interest when information is being
conveyed.

Types of observation methods:

 Natural method: A natural observation occurs in a setting such as the user’s


workplace.

 Obtrusive method: An obtrusive observation takes place when the respondent


knows he/she is being observed.

24
 Direct method: A direct observation takes place when the analyst actually
observes the subject or the system at work.

 Structured and Unstructured method: In case of structured method, the


observer looks for and records a specific action. While in case of unstructured
method the observer is placed in a situation to observe whatever might be
pertinent at that time.

25
FEASIBILITY STUDY

Feasibility Study is a step towards identification of the candidate system as a feasible


product. First the studies often pre-suppose that when the feasibility document is being
prepared, the analyst is in a position to evaluate solutions. Second, most studies tend to
overlook the confusion inherent in system development – the constraints and the assumed
attitudes.

If the feasibility study is to serve as a decision document, it must answer three questions:

 Is there a new and better way to do a job that will benefit the user?

 What are the costs and savings of the alternatives?

 What is recommended?

Feasibility Considerations:
There are three key considerations to the feasibility study:

1) Economic

2) Technical

3) Behavioral

Economic Feasibility:
Economic analysis is the most frequently used method for evaluating the effectiveness of
the candidate system. The project was considered to be economically feasible because-

 The cost involved in developing the candidate system well under the budget of the
organization.

 The Cost-Benefit Analysis tells us that the value of the benefits offered by the
proposed system is much higher than the cost.

26
Technical Feasibility:

Technical feasibility centers around the existing computer system (Hardware and
Software etc) and to what extend it support the proposed addition. For example, if the
current computer is operating at 80 percent capacity - an arbitrary ceiling - then running
another application could overload the system or require additional Hardware. This
involves financial considerations to accommodate technical enhancements. So this
proposed system is technically feasible because all the necessary hardware and software
required for developing and installing the system is available with the organization.

Operational Feasibility: -
This Application is very easy to operate as it is made user friendly with the help of very
effective GUI tools. Main consideration is user’s easy access to all the functionality of
the Application. Another main consideration is here is that whether user organization is
trained enough to use the newer application.

Behavioral Feasibility:

People are inherently resistant to change, and computers have been known to facilitate
change. An estimate should be made of how strong a reaction the user staff is likely to
have toward the development of a computerized system. Therefore it is understandable
that the introduction of a candidate system requires special efforts to educate and train the
staff. The software that is being developed is user friendly and easy to learn. In this way,
the developed software is truly efficient and can work on any circumstances, tradition,
locales.

Behavioral study strives on ensuring that the equilibrium of the organization and status
quo in the organization neither are nor disturbed and changes are readily accepted by the
users.

27
SYSTEM DESIGN

28
e-r diagram
Cust_id Emp_code Emp_name

Cust_name
designation

Cust_add
Customer Employee salary
orders

Cust_no
Emp_doj

Emp_add

buys
sells
pays

Bill_no
Item_name

date Bill Item

Item_price
time

Max_amt
quantity
Add_tax Pay_mode

29
Data Flow Diagrams

1st Level DFD

ITEM MANAGER
Add, modify, delete items,

Receive bills reports


calculates customer bills

Purchase items, Request for


Item menu PIZZA HUT
MANAGEMENT Reports
Customer
SYSTEM
Print bills details,
Receive item Details customer bills, item
details, item menu, etc.
Data Storage

Data Access

Data Base

30
2nd Level DFD

Add Item

1 5

Purchase
Delete Item
Item

2 6

Item Manager
Customer

PIZZA HUT
Request AUTOMATION Modify Item
item SYSTEM

Request
Data Access

3 7
Data Storage

Print
Receive
Print Reports
Bill

Data 8

Calculate bill

31
3rd Level DFD

3 Billtrans Add Item

1 Bill
1 5

Purchase 2 Item
Delete Item
Item
2 Item

2 6

Item Manager
Customer

Request Modify Item


item

2 Item Request
Print
Print 7
3
Print
Receive 1 Bill
Reports
Bill
Print

3 Billtrans 1 Bill
8

Calculate bill
3 Billtrans

32
DATA STRUCTURE

Four tables have been used in this project:

1. ITEM : Keeps record of food items.

 ItemCode : This is unique field and generated


automatically by the program.

 Name : This is name of the item.

 Price : This is price of the item.

33
2. BILL : Keeps record of bills.

 ItemCode : Code no. of the item.

 BillNo : Bill no. of the bill, automatically


generated by the program.

 DateofBill : Date of the Bill.

 Price : Price per unit.

 Quantity : Quantity purchased.

 CustName (Character) : Name of the Customer.

 Amount : Total Bill amount.

34
3. BILLTRANS : Keeps record of individual items in bill.

 ItemCode : Code no. of the item.

 BillNo : Bill no. of the bill, automatically


generated by the program.

 Price : Price per unit.

 Quantity : Quantity purchased.

 Amount : Total amount.

35
4. PASS : Keeps record of password.

 Password : Password to open the project.

WORKING OF THE PROJECT

Customer comes to purchase any food item

Selects the item from the list

36
Input Quantity

Bill calculated and printed

All information related to bill is saved in file BILL.DAT

 User can Add new food items, modify or delete and existing food items from
the table- ITEM, by selecting forms ADDITEM and EDITITEM.

 User can view list of food items by selecting option TODAY’S MENU from the
MAIN form.

37
 User can purchase items by selecting form SALES from the MAIN form, bill is
calculated and printed automatically after selecting items to purchase and
stored in the table- BILL.

User can view list of bills at the end of the day by selecting LIST OF BILLS report
the REPORTS form.

38
STRUCTURE OF THE PROGRAM

FORMS IN THE PROJECT:

 frmNewItem : Adds new food item in the item table.

 frmModifyItem : Modify the item records.

 frmDelete : Delete the item records.

 frmSales : Sale food items and add calculate bill.

 frmToday : Display list of food items

 frmPrintBill : Prints the customers bill.

 frmMain : Ask user to input password.

 frmMenu : Display main menu.

 frmFileMaintenance : Display edit menu (add, modify, delete


items).

 frmReports : Display reports menu.

 frmDateWise : Display date wise list of bills.

 frmChangePassword : To change the password.

39
REPORTS IN THE PROJECT:

 DateWise : Date wise list of bills.

 repItemList : List of Items.

 ListofBills : List of all bills.

 repPrintBill : Prints the customers bill.

40
OUTPUT/ REPORT GENERATION

1. With information that we have in the table - item, we can extract the list of

records of the items. Which provides the information like item code, item

name and item price.

2. Using information in table - bill, we can extract the list of bills. Which

provides details about all the sales done. It contains important information

like billno, item code, item name, date of bill, customer name, quantity,

price and total bill amount. User can view date wise list of bills and single

customer bill also.

41
VALIDATION CHECKS

1. Item code is checked whether exist in the file or not whenever user
input, while purchase, delete or modify.

2. Validation for quantity is checked, customer should not purchase above


the available quantity.

42
43
Coding

Module1

Public con As New ADODB.Connection

frmMain

Private Sub cmdOk_Click()

Dim rsPass As New ADODB.Recordset

rsPass.Open "select Password from Pass", con, adOpenDynamic

If Not rsPass.EOF Then

If (txtPassword.Text = "" And IsNull(rsPass("Password"))) Or (rsPass("Password")


= txtPassword.Text) Then

Unload Me

frmMenu.Show vbModal

Else

MsgBox "Invalid Password"

End If

Else

Unload Me

frmMenu.Show vbModal

End If

44
rsPass.Close

Set rsPass = Nothing

End Sub

Private Sub cmdExit_Click()

Unload Me

End Sub

Private Sub Form_Load()

con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security


Info=False;Data Source=" + App.Path + "\fastfood.mdb"

con.Open

End Sub

frmMenu

Private Sub Command1_Click()

End Sub

45
Private Sub cmdFile_Click()

frmFileMaintainance.Show vbModal

End Sub

Private Sub cmdHelp_Click()

Call Shell("Notepad.exe " & App.Path & "\readme.txt", 1)

End Sub

Private Sub cmdQuit_Click()

Unload Me

End Sub

Private Sub cmdReports_Click()

frmReports.Show vbModal

End Sub

Private Sub cmdSales_Click()

frmSales.Show vbModal

End Sub

Private Sub cmdToday_Click()

frmToday.Show vbModal

46
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y


As Single)

Me.Image2.Picture = LoadPicture(App.Path & "\mc1.bmp")

End Sub

Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y


As Single)

Me.Image2.Picture = LoadPicture(App.Path & "\mc2.bmp")

End Sub

47
frmChangePassword

Private Sub cmdExit_Click()

Unload Me

End Sub

Private Sub cmdOk_Click()

Dim rsPass As New ADODB.Recordset

rsPass.Open "select Password from Pass", con, adOpenDynamic

If rsPass("Password") <> Me.txtOld.Text Then

MsgBox "Invalid Password."

Me.txtOld.SetFocus

Exit Sub

ElseIf Me.txtNew.Text <> Me.txtConfirm.Text Then

MsgBox "Invalid Password."

Me.txtConfirm.SetFocus

Exit Sub

Else

con.Execute "update Pass set Password = '" & Me.txtNew.Text & "'"

MsgBox "Password Changed"

Unload Me

End I

48
End Sub

frmDateWise

Private Sub cmdExit_Click()

Unload Me

End Sub

Private Sub cmdPreview_Click()

If Me.txtFrom.Text = "" Then

MsgBox "Input Date."

Me.txtFrom.SetFocus

Exit Sub

End If

If Not IsDate(Me.txtFrom) Then

MsgBox "Invalid Date."

Me.txtFrom.SetFocus

Exit Sub

End If

If Me.txtTo.Text = "" Then

MsgBox "Input Date."

Me.txtTo.SetFocus

Exit Sub

49
End If

If Not IsDate(Me.txtTo) Then

MsgBox "Invalid Date."

Me.txtTo.SetFocus

Exit Sub

End If

'Dim rsList As New ADODB.Recordset

'rsList.Open "select * from ListofBills where DoB >= cdate('" & Me.txtFrom.Text &
"') and DoB <= cdate('" & Me.txtTo.Text & "') order by DoB,BillNo", con,
adOpenDynamic

'Set repDatewiseBillList.DataSource = rsList

'repDatewiseBillList.Show vbModal

'rsList.Close

'Set rsList = Nothing

Dim acApp As Access.Application

Set acApp = New Access.Application

acApp.OpenCurrentDatabase App.Path & "\fastfood.mdb"

acApp.DoCmd.OpenReport "repPrintBill", acViewPreview, "select * from PrintBill


where DoB >= cdate('" & Me.txtFrom.Text & "') and DoB <= cdate('" &
Me.txtTo.Text & "')"

acApp.DoCmd.Maximize

50
acApp.Visible = True

End Sub

Private Sub Form_Load()

Me.txtFrom.Text = Date

Me.txtTo.Text = Date

End Sub

51
frmDelete

Private Sub cmbItemCode_Click()

Dim rsFill As New ADODB.Recordset

rsFill.Open "select * from Item where ItemCode = " & Me.cmbItemCode.Text, con,
adOpenDynamic

If Not rsFill.EOF Then

Me.txtName.Text = rsFill("Name").Value

Me.txtPrice.Text = rsFill("Price").Value

End If

rsFill.Close

Set rsFill = Nothing

End Sub

Private Sub cmdExit_Click()

Unload Me

End Sub

Private Sub cmdDelete_Click()

52
con.Execute "delete from Item where ItemCode = " & Me.cmbItemCode.Text

MsgBox "Record Deleted."

Me.txtName.Text = ""

Me.txtPrice.Text = ""

Me.cmbItemCode.RemoveItem (Me.cmbItemCode.ListIndex)

If Me.cmbItemCode.ListCount <> 0 Then

Me.cmbItemCode.ListIndex = 0

End If

Me.cmbItemCode.SetFocus

End Sub

Private Sub Form_Load()

Me.txtName.Enabled = False

Me.txtPrice.Enabled = False

Dim rsItemCode As New ADODB.Recordset

rsItemCode.Open "select ItemCode,Name from Item order by Itemcode", con,


adOpenDynamic

Do While Not rsItemCode.EOF

Me.cmbItemCode.AddItem rsItemCode("ItemCode").Value

53
rsItemCode.MoveNext

Loop

If Me.cmbItemCode.ListCount <> 0 Then

Me.cmbItemCode.ListIndex = 0

End If

rsItemCode.Close

Set rsItemCode = Nothing

End Sub

54
frmFileMaintenance

Private Sub cmdChangePassword_Click()

frmChangePassword.Show vbModal

End Sub

Private Sub cmdDelete_Click()

frmDelete.Show vbModal

End Sub

Private Sub cmdModify_Click()

frmModifyItem.Show vbModal

End Sub

Private Sub cmdNew_Click()

frmNewItem.Show vbModal

End Sub

Private Sub cmdReturn_Click()

Unload Me

End Sub

55
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y
As Single)

Me.Image2.Picture = LoadPicture(App.Path & "\mc1.bmp")

End Sub

Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y


As Single)

Me.Image2.Picture = LoadPicture(App.Path & "\mc2.bmp")

End Sub

56
frmModifyItem

Private Sub cmbItemCode_Click()

Dim rsFill As New ADODB.Recordset

rsFill.Open "select * from Item where ItemCode = " & Me.cmbItemCode.Text, con,
adOpenDynamic

If Not rsFill.EOF Then

Me.txtName.Text = rsFill("Name").Value

Me.txtPrice.Text = rsFill("Price").Value

End If

rsFill.Close

Set rsFill = Nothing

End Sub

Private Sub cmdExit_Click()

Unload Me

End Sub

Private Sub cmdUpdate_Click()

If Me.txtName.Text = "" Then

MsgBox "Please input Item Name."

57
Me.txtName.SetFocus

Exit Sub

End If

If Me.txtPrice.Text = "" Then

MsgBox "Please input Item Price."

Me.txtPrice.SetFocus

Exit Sub

End If

If Not IsNumeric(Me.txtPrice) Then

MsgBox "Please input Numeric Value."

Me.txtPrice.SetFocus

Exit Sub

End If

con.Execute "update Item set Name='" & Me.txtName.Text & "', Price=" &
Me.txtPrice.Text & " where ItemCode = " & Me.cmbItemCode.Text

MsgBox "Record Updated."

Me.cmbItemCode.Text = ""

Me.txtName.Text = ""

Me.txtPrice.Text = ""

Me.cmbItemCode.SetFocus

End Sub

58
Private Sub Form_Load()

Dim rsItemCode As New ADODB.Recordset

rsItemCode.Open "select ItemCode,Name from Item order by Itemcode", con,


adOpenDynamic

Do While Not rsItemCode.EOF

Me.cmbItemCode.AddItem

rsItemCode("ItemCode").Value rsItemCode.MoveNext

Loop

If Me.cmbItemCode.ListCount <> 0 Then

Me.cmbItemCode.ListIndex = 0

End If

rsItemCode.Close

Set rsItemCode = Nothing

End Sub

59
frmNewItem

Private Sub cmdExit_Click()

Unload Me

End Sub

Private Sub cmdNew_Click()

If Me.cmdNew.Caption = "&New Item" Then

Me.cmdNew.Caption = "&Update"

Me.txtName.Enabled = True

Me.txtPrice.Enabled = True

Dim rsItemCode As New ADODB.Recordset

rsItemCode.Open "select ItemCode from Item order by ItemCode desc", con,


adOpenDynamic

If Not rsItemCode.EOF Then

Me.txtItemCode.Text = rsItemCode("ItemCode").Value + 1

Else

Me.txtItemCode.Text = 1

End If

rsItemCode.Close

Set rsItemCode = Nothing

Me.txtName.SetFocus

60
Else

If Me.txtName.Text = "" Then

MsgBox "Please input Item Name."

Me.txtName.SetFocus

Exit Sub

End If

If Me.txtPrice.Text = "" Then

MsgBox "Please input Item Price."

Me.txtPrice.SetFocus

Exit Sub

End If

If Not IsNumeric(Me.txtPrice) Then

MsgBox "Please input Numeric Value."

Me.txtPrice.SetFocus

Exit Sub

End If

con.Execute "Insert into Item(ItemCode,Name,Price) values(" &


Me.txtItemCode.Text & ",'" & Me.txtName.Text & "'," & Me.txtPrice.Text & ")"

MsgBox "Record Saved"

Me.txtItemCode.Text = ""

Me.txtName.Text = ""

Me.txtPrice.Text = ""

61
Me.txtName.Enabled = False

Me.txtPrice.Enabled = False

Me.cmdNew.Caption = "&New Item"

End If

End Sub

Private Sub Form_Load()

Me.txtItemCode.Enabled = False

Me.txtName.Enabled = False

Me.txtPrice.Enabled = False

End Sub

62
frmPrintBill

Private Sub cmdExit_Click()

Unload Me

End Sub

Private Sub cmdPreview_Click()

'Dim rsBill As New ADODB.Recordset

'rsBill.Open "select distinct * from ListofBills where BillNo=" & Me.cmbBillNo.Text


& " order by billno", con, adOpenDynamic

'Set repPrintBill.DataSource = rsBill

'repPrintBill.Show vbModal

'rsBill.Close

'Set rsBill = Nothing

Dim acApp As Access.Application

Set acApp = New Access.Application

acApp.OpenCurrentDatabase App.Path & "\fastfood.mdb"

acApp.DoCmd.OpenReport "repPrintBill", acViewPreview, "select * from PrintBill


where BillNo=" & Me.cmbBillNo.Text

acApp.DoCmd.Maximize

acApp.Visible = True

63
End Sub

Private Sub Form_Load()

Dim rsBillCode As New ADODB.Recordset

rsBillCode.Open "select BillNo from ListofBills order by BillNo", con,


adOpenDynamic

Do While Not rsBillCode.EOF

Me.cmbBillNo.AddItem rsBillCode("BillNo").Value

rsBillCode.MoveNext

Loop

If Me.cmbBillNo.ListCount <> 0 Then

Me.cmbBillNo.ListIndex = 0

End If

rsBillCode.Close

Set rsBillCode = Nothing

End Sub

64
frmReports

Private Sub cmdFile_Click()

'Dim rsList As New ADODB.Recordset

'rsList.Open "select * from ListofBills", con, adOpenDynamic

'Set repAllBills.DataSource = rsList

'repAllBills.Show vbModal

'rsList.Close

'Set rsList = Nothing

Dim acApp As Access.Application

Set acApp = New Access.Application

acApp.OpenCurrentDatabase App.Path & "\fastfood.mdb"

acApp.DoCmd.OpenReport "repPrintBill", acViewPreview

acApp.DoCmd.Maximize

acApp.Visible = True

End Sub

Private Sub cmdQuit_Click()

Unload Me

End Sub

65
Private Sub cmdReports_Click()

frmDatewise.Show vbModal

End Sub

Private Sub cmdSales_Click()

Dim rsList As New ADODB.Recordset

rsList.Open "select * from Item order by ItemCode", con, adOpenDynamic

Set repItemList.DataSource = rsList

repItemList.Show vbModal

rsList.Close

Set rsList = Nothing

End Sub

Private Sub cmdToday_Click()

frmPrintBill.Show vbModal

End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y


As Single)

Me.Image2.Picture = LoadPicture(App.Path & "\mc1.bmp")

66
End Sub

Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y


As Single)

Me.Image2.Picture = LoadPicture(App.Path & "\mc2.bmp")

End Sub

67
frmSales

Dim tmpPrice As Integer

Private Sub cmbItemCode_Click()

Dim rsFill As New ADODB.Recordset

rsFill.Open "select * from Item where ItemCode = " & Me.cmbItemCode.Text, con,
adOpenDynamic

If Not rsFill.EOF Then

Me.txtName.Text = rsFill("Name").Value

Me.txtPrice.Text = rsFill("Price").Value

tmpPrice = rsFill("Price").Value

End If

rsFill.Close

Set rsFill = Nothing

End Sub

Private Sub cmdAdd_Click()

If Me.txtQuantity.Text = "" Then

MsgBox "Please input quantity"

Me.txtQuantity.SetFocus

68
Exit Sub

End If

If Not IsNumeric(Me.txtQuantity.Text) Then

MsgBox "Please input numeric data"

Me.txtQuantity.SetFocus

Exit Sub

End If

Me.lstItemCode.AddItem Me.cmbItemCode.Text

Me.lstQuantity.AddItem Me.txtQuantity.Text

Me.lstPrice.AddItem Me.txtPrice * Me.txtQuantity.Text

t=0

For i = 0 To Me.lstPrice.ListCount - 1

Me.lstPrice.ListIndex = i

t = t + Val(Me.lstPrice.Text)

Next

Me.txtAmount.Text = t

Me.lstPrice.ListIndex = -1

End Sub

Private Sub cmdExit_Click()

Unload Me

End Sub

69
Private Sub cmdPrintBill_Click()

'Dim rsBill As New ADODB.Recordset

'rsBill.Open "select * from ListofBills where BillNo=" & Me.txtBillNo.Text, con,


adOpenDynamic

'Set repPrintBill.DataSource = rsBill

'repPrintBill.Show vbModal

'rsBill.Close

'Set rsBill = Nothing

Dim acApp As Access.Application

Set acApp = New Access.Application

acApp.OpenCurrentDatabase App.Path & "\fastfood.mdb"

acApp.DoCmd.OpenReport "repPrintBill", acViewPreview, "select * from PrintBill


where BillNo=" & Me.txtBillNo.Text

acApp.DoCmd.Maximize

acApp.Visible = True

End Sub

Private Sub cmdRemove_Click()

If Me.lstItemCode.ListIndex <> -1 Then

70
t = Me.lstItemCode.ListIndex

Me.lstItemCode.RemoveItem (t)

Me.lstQuantity.RemoveItem (t)

Me.lstPrice.RemoveItem (t)

t=0

For i = 0 To Me.lstPrice.ListCount - 1

Me.lstPrice.ListIndex = i

t = t + Val(Me.lstPrice.Text)

Next

Me.txtAmount.Text = t

Me.lstPrice.ListIndex = -1

End If

End Sub

Private Sub cmdSaleItem_Click()

If Me.cmdSaleItem.Caption = "&New Sale" Then

Me.cmdSaleItem.Caption = "&Sale Item"

Me.cmdAdd.Enabled = True

Me.cmdPrintBill.Enabled = False

Me.cmbItemCode.Enabled = True

Me.txtDoB.Enabled = True

71
Me.txtCustName.Enabled = True

Me.txtQuantity.Enabled = True

Me.txtCustName.Text = ""

Me.txtQuantity.Text = ""

Me.txtDoB.Text = Date

Me.txtAmount.Text = "0"

Me.lstItemCode.Clear

Me.lstPrice.Clear

Me.lstQuantity.Clear

Dim rsBillNo As New ADODB.Recordset

rsBillNo.Open "select BillNo from Bill order by BillNo desc", con,


adOpenDynamic

If Not rsBillNo.EOF Then

Me.txtBillNo.Text = rsBillNo("BillNo").Value + 1

Else

Me.txtBillNo.Text = 1

End If

rsBillNo.Close

Set rsBillNo = Nothing

If Me.cmbItemCode.ListCount <> 0 Then

Me.cmbItemCode.ListIndex = 0

End If

72
Me.cmbItemCode.SetFocus

Else

If Me.txtDoB.Text = "" Then

MsgBox "Please input Date."

Me.txtDoB.SetFocus

Exit Sub

End If

If Not IsDate(Me.txtDoB) Then

MsgBox "Please input valid date."

Me.txtDoB.SetFocus

Exit Sub

End If

If Me.txtCustName.Text = "" Then

MsgBox "Please input Name of the Customer."

Me.txtCustName.SetFocus

Exit Sub

End If

If Me.txtQuantity.Text = "" Then

MsgBox "Please input Item Quantity."

Me.txtQuantity.SetFocus

Exit Sub

End If

73
If Not IsNumeric(Me.txtQuantity) Then

MsgBox "Please input Numeric."

Me.txtQuantity.SetFocus

Exit Sub

End If

con.Execute "insert into


Bill(BillNo,ItemCode,DoB,Quantity,Price,Amount,CustName) values(" &
Me.txtBillNo.Text & "," & Me.cmbItemCode.Text & ",'" & Me.txtDoB.Text & "'," &
Me.txtQuantity.Text & "," & tmpPrice & "," & Me.txtAmount.Text & ",'" &
Me.txtCustName.Text & "')"

For i = 0 To Me.lstItemCode.ListCount - 1

Me.lstItemCode.ListIndex = i

Me.lstPrice.ListIndex = i

Me.lstQuantity.ListIndex = i

con.Execute "insert into BillTrans(BillNo,ItemCode,Quantity,Amount,Price)


values(" & Me.txtBillNo.Text & "," & Me.lstItemCode.Text & "," &
Me.lstQuantity.Text & "," & Me.lstPrice.Text & "," & Me.lstPrice.Text /
Me.lstQuantity.Text & ")"

Next

MsgBox "Record Inserted."

Me.cmdSaleItem.Caption = "&New Sale"

Me.cmdPrintBill.Enabled = True

Me.cmdAdd.Enabled = False

Me.cmbItemCode.Enabled = False

74
Me.txtDoB.Enabled = False

Me.txtCustName.Enabled = False

Me.txtQuantity.Enabled = False

Me.cmdSaleItem.SetFocus

End If

End Sub

Private Sub cmdToday_Click()

frmToday.Show vbModal

End Sub

Private Sub Form_Load()

Me.txtAmount.Text = "0"

Me.txtName.Enabled = False

Me.txtPrice.Enabled = False

Me.txtBillNo.Enabled = False

Me.txtAmount.Enabled = False

Me.cmbItemCode.Enabled = False

Me.txtDoB.Enabled = False

Me.txtCustName.Enabled = False

75
Me.txtQuantity.Enabled = False

Me.cmdPrintBill.Enabled = False

Me.cmdAdd.Enabled = False

Dim rsItemCode As New ADODB.Recordset

rsItemCode.Open "select ItemCode,Name from Item order by Itemcode", con,


adOpenDynamic

Do While Not rsItemCode.EOF

Me.cmbItemCode.AddItem

rsItemCode("ItemCode").Value rsItemCode.MoveNext

Loop

'If Me.cmbItemCode.ListCount <> 0 Then

' Me.cmbItemCode.ListIndex = 0

'End If

rsItemCode.Close

Set rsItemCode = Nothing

End Sub

76
frmToday

Private Sub cmbItemCode_Click()

Dim rsFill As New ADODB.Recordset

rsFill.Open "select * from Item where ItemCode = " & Me.cmbItemCode.Text, con,
adOpenDynamic

If Not rsFill.EOF Then

Me.lblName.Caption = rsFill("Name").Value

Me.lblPrice.Caption = rsFill("Price").Value

End If

rsFill.Close

Set rsFill = Nothing

End Sub

Private Sub cmdExit_Click()

Unload Me

End Sub

Private Sub Form_Load()

77
Me.lblName.Enabled = False

Me.lblPrice.Enabled = False

Dim rsItemCode As New ADODB.Recordset

rsItemCode.Open "select ItemCode,Name from Item order by Itemcode", con,


adOpenDynamic

Do While Not rsItemCode.EOF

Me.cmbItemCode.AddItem

rsItemCode("ItemCode").Value rsItemCode.MoveNext

Loop

If Me.cmbItemCode.ListCount <> 0 Then

Me.cmbItemCode.ListIndex = 0

End If

rsItemCode.Close

Set rsItemCode = Nothing

End Sub

78
TESTING

79
TESTING

Testing is a very critical activity that ensures the liability of a particular software product.
During this activity the software to be tested is executed with a set of tests, and the output
and functioning of the program are evaluated. It is done to ensure whether the system
meets the specified requirements or not.

Testing can bring forth some aspects that have not been considered or covered by the
developers. Testing a large program is a complex process that can be broken down into
two parts:

 unit testing
 system testing

In the first case the different modules of the application are tested individually. In case of
system testing the software is tested as a whole. The system undergoes several tests like:

 time tests
 performance tests
 memory tests
 input and output tests, etc.

Testing can be done in the following three phases:

 Programmatic Testing – This is done to determine whether the application works


according to the specifications. Here it is checked whether the application is
providing all the required functionalities and features or not. All the validations

80
are checked thoroughly. All the links are tested and the database functionalities are
also checked.

 User Testing – In this phase it is ascertained whether the target audience of the
application can use the application easily and effectively. Is the software system is
serving their purpose and fits their requirements or not. It is checked whether they
are satisfied with the information provided. They are asked about the clarity,
attractiveness and the overall presentation of the screens and reports.

 Goal Testing – Finally this test is performed to test whether the application meets
the goals, which were set before developing the application. Here it must be
ensured that the organization is satisfied with the working and presentation of the
application.

81
82
SUGGESTIONS

PIZZA HUT is large growing fast food centre in India and other countries also, it

becomes very difficult to keep records for large no. of items and customers and

calculating bills. This project is very useful in the fastfood management.

Utmost care and back-up procedures must be established to ensure 100%

successful implementation of the computerized fastfood system. In case of system

failure, the organization should be in a position to process the transaction with

another organization or if the worst comes to the worst, it should be in a position to

complete it manually.

83
Major advantages of the project:
1. Accuracy will be highly enhanced due to negligible chance of
error in computer.
2. Data storage will become much easier and compact.
3. A lot of computational will be reduced.
4. The system being menu-driven will be easy to use as we just
need to click on the options with minute efforts.

84
Limitations:
1. It doesnot ensures security of data to extreme extent.
2. Only a single user can access the data at a time.

85
CONCLUSION

This project is designed to meet the requirements of a Pizza Hut Automation


System. It has been developed in Visual Basic and the database has been built in
MS-SQLSERVER only, keeping in mind the specifications of the system. Apart
from MS-SQLSERVER we could have also implemented other database software
like Oracle or Ms-Access.

For designing the system we have used simple data flow diagrams and E/R
diagrams.

Overall the project teaches us the essential skills like:

1. Using system analysis and design techniques like data flow diagram and E/R
diagram in designing the system.

2. Understanding programming logic and language along with utilities like


reports, forms, queries etc. in Visual Basic and MS-SQL SERVER.

86
FUTURE SCOPE

87
BIBLIOGRAPHY

Visual basic
Black book

Sumita Arora

Oracle
Evan Baross

88