Professional Documents
Culture Documents
NAME:MANOHAR KANTH
USN:1NH18CS732
SEM:5D
ABSTRACT
The Digitalized hotel billing invoice is developed using graphical user interface gui python to
achieve the easy way to maintain the system. It is developed to eradicate the manual
system. The traditional system of hotel menu is paper based. Papers are used in hotel for
displaying the traditional menu cards, writing down the orders of customers, storing the
records of customers. This process requires a lot of labours and also lot of efforts and hard
work. To overcome this problem, the hotel billing invoice is developed which is digitalized
system where the orders and Billings are done in the system.
This project helps to benifit the hotel managers and also customers by reducing the time
consumption, manual calculation errors and also reduces the efforts. This project is
enhanced to develop to display the menu in system and generate the receipt or bill in the
system.
I
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany the successful completion of any task would
be impossible without the mention of the people who made it possible, whose constant
guidance and encouragement crowned our efforts with success.
I am grateful to Dr.Prashanth C.S.R, Dean Academics, for his unfailing encouragement and
suggestions, given to me in the course of my project work.
I would also like to thank Dr. B. Rajalakshmi, Professor and Head, Department of Computer
Science and Engineering, for her constant support.
MANOHAR KANTH
(1NH18CS732)
II
CONTENTS
ABSTRACT
ACKNOWLEDGEMENT
LIST OF FIGURES
LIST OF RESULTS
1. INTRODUCTION
COURSE DEFINITION
PROBLEM DEFINITION
OBJECTIVES
EXPECTED OUTCOMES
2. REQUIREMENTS
HARDWARE REQUIREMENTS
SOFTWARE REQUIREMENTS
3. PHYTHON FUNDAMENTALS
D PYTHON DICTIONARY
DATABASE FUNDAMENTALS
DATABASE BASICS
III
TKINTER
4. DESIGN
4.1. ALGORITHM
5. IMPLEMENATION
IMPLEMENTATION OF FUNCTION
IMPLEMENTATION OF TKINTER
IMPLEMENTATION OF MYSQL
6. RESULTS
RESULT STEP 1
RESULT STEP 2
RESULT STEP 3
RESULT STEP 4
RESULT STEP 5
RESULT STEP 6
RESULT STEP 7
RESULT STEP 8
RESULT STEP 9
CONCLUSION
REFERENCE
IV
LIST OF FIGURES
Fig no Figure description Page no
4.1 Schema diagram 16
4.2 Er diagram 17
LIST OF RESULTS
V
P age |1
CHAPTER 1
INTRODUCTION
Hotel is generally an establishment where the public may obtain meals or refreshments.
The term Hotel has its origins in Paris. Restaurants have become places of social contact,
of discovering new cultures and tastes from far-away lands, of spending an evening with
your loved ones, of clinching business deals over a glass of wine, and so forth. In addition,
it is the basic functions of “restoring” people with the help of good food, service and
ambience.
The digital Hotel billing invoice helps the manager to manage the Hotel more effectively
and efficiently by computerizing meal ordering, billing and inventory control.
COURSE OBJECTIVES
The main objective of the mini project is to develop the application that will have the
following functions like: -
PROBLEM DEFINITION
The traditional system of Hotel menu is paper based. Papers are used in Hotel for
displaying the traditional menu cards, writing down in the orders of customers, storing
the records of customers. This process requires lot of labors and also lot of efforts and
hard work. It is possible to make mistake while calculating the bill due to distraction and
lack of mind etc. To overcome this problem, "" restaurant is developed using python
graphical user interface and Structured Query Language.
The main goal of " digital Hotel billing invoice " is to develop digitalized system where
orders and billing are done in system without using paper and pen. Due to digitalized
system of manual errors is eliminated. This project has few options such as the customer
can view the information about the order or menu along with price, billing along with
receipt, and it also contains calculator where we can perform simple calculations
OBJECTIVES
EXPECTED OUTCOMES
CHAPTER 2
REQUIREMENT SPECIFICATIONS:
HARDWARE REQUIREMENTS
SOFTWARE REQUIREMENTS
CHAPTER 3
PYTHON FUNDAMENTALS
The Python fundamental consists of the basic building blocks of Python programming
language. And it is basically divided into the following categories as follows.
Statements
Indentations
Comments
Variables
Constants
Tokens
1. Statements:
They are logical instructions that interpreter can execute and read them, it can also be
both single and multiline.
The two categories of the Python Statements are:
Expression Statement
Assignment Statement
2. Indentation:
The programming languages python uses indentation to mark a block of the code. Most
of the Programming languages provide indentation for better code formatting and doesn’t
enforce to have it. But mainly in Python it is mandatory.
That’s why indentation is crucial in Python.
3. Comments:
Comments are basically nothing but tagged lines of in codes which increases the
readability of the code and make the code self-explanatory.
There are two categories of Comments:
i. Single line Comments: ‘#’ by the help of these we begin a single-line comment.
ii. Multi-line comments: ‘’’…’’’ by the help of these we write multiline comments in
python.
iii. Doctstring comments: The documentation string in Python gives programmers an easy
way of adding qui k notes with every Python module, functions, class and method.
Multiline comments are using triple quotation in strings.
4. Variables:
In Python variable is a memory address that can change, when a memory address cannot
change then it is known as constant. Variable is the name of the memory location where
the data is stored. Once the variable is stored then space is allocated in memory. It also
defines the variable using a combination of numbers, letters, and the underscore
character.
5. Constants:
In Python constants is a type of variable that holds values, whose value cannot be
changed. We rarely use constants in Python.
6. Token:
In Python tokens are the smallest unit of the program. Python contains the following
tokens:
Reserved words: Reserved words are nothing but a set of special words, which are
reserved by python and also have a specific meaning. Here, in Python we are not allowed
to use keywords as variables. Reserved words are case sensitive in Python.
For example: False, if, none, import, True, in, and, def, return, elif, try, else, while, except,
with, finally, yield, is, as, break, class, etc
i. We can use a sequence of letters lowercase or uppercase. We can also mix up digits or
an underscore while defining an identifier.
iv. You are not allowed to use any other special characters other than underscore.
v. Even though python doc says that you can name an identifier with unlimited length.
Literals: Other built-in objects in python are literals. The Literals can be defined as data
that is given in a variable or constant.
The following literals are in:
Boolean literals: Boolean literal can have any of two values i.e. true or false.
Collection literals: The four types of collection literals are List literals, Tuple literals,
Dict literals, and Set literals.
Special literals: Python basically contains one special character that is none.
Operators: In python operators are the symbols which perform the operation on some
values. The following are the known operators in the Python.
Arithmetic Operators
Relational Operators
Assignment Operators
Logical Operators
Membership Operators
Identity Operators
Bitwise Operators
Number data types store numeric values. Number objects are created when you assign a
value to them. For example −
var1 = 1
var2 = 10
You can also delete the reference to a number object by using the Del statement. The
syntax of the Del statement is −
You can delete a single object or multiple objects by using the Del statement. For example
− Del var Del var_a, var_b
Long (long integers, they can also be represented in octal and hexadecimal) float (floating
point real values) Complex (complex numbers)
Python Strings
The plus (+) sign is the string concatenation operator and the asterisk (*) is the repetition
operator. For example − str = 'Hello World!'
Print str
Lists are the most versatile of Python's compound data types. A list contains items
separated by commas and enclosed within square brackets([]). To some extent, lists are
similar to arrays in C. One difference between list is that all the items belonging to a list
can be of different data type.
The values stored in a list can be accessed using the slice operator ([ ] and [:]) with indexes
starting at 0 in the beginning of the list and working their way to end -1. The plus (+) sign
is the list concatenation operator, and the asterisk (*) is the repetition operator.
For example −
#!/usr/bin/python
list = [ 'abcd', 786 , 2.23, 'john', 70.2 ] tinylist = [123, 'john'] printlist # Prints
completelist
A tuple is another sequence data type that is similar to the list. A tuple consists of a
number of values separated by commas. Unlike lists, however, tuples are enclosed within
parentheses.
The main differences between listsand tuples are: Lists are enclosed in brackets ( [ ] ) and
their elements and size can be changed, while tuples are enclosed in parentheses ( ( ) )
and cannot be updated. Tuples can be thought of as read-only lists.
For example −
#!/usr/bin/python
tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 ) tiny tuple = (123, 'john') printtuple # Prints
the completetuple
D Python Dictionary
Python's dictionaries are kind of hash table type. They work like associative arrays or
hashes found in Perl and consist of key-value pairs. A dictionary key can be almost any
Python type, but are usually numbers or strings. Values, on the other hand, can be any
arbitrary Python object.
Dictionaries are enclosed by curly braces({}) and values can be assigned and
accessedbusing square braces ([]).
For example−
DATABASE FUNDAMENTALS
Database Management System or DBMS in short refers to the technology of storing and
retrieving users data with utmost efficiency along with appropriate security measures.
This tutorial explains the basics of DBMS such as its architecture, data models, data
schemas, data independence, E-R model, relation model, relational database design, and
storage and file structure and much more.
It introduces database concepts, relational database, tables and data types, manipulation
and data selection, views, stored procedures, backup and restores normalization,
constraints, indexes, security, and functions.
TABLES:
It is most basic building of a database. It’s the place where we will put our idea, and define
their data type, and also their relationship with the other tables. It consists of rows and
columns.
Dept of CSE, NHCE 10
P a g e | 11
PRIMARY KEY:
If we have a long list of rows, it’s very important to have something that uniquely identifies
each row that is called primary key.
And we are going to use primary key to connect between the tables, and to form a
relationship.
SQL: The structured query language is the defect language used for the management and
manipulation of data in relational database. The Sql can be used by query, insert, update,
and modify data.
SELECT:
The select statement retrieves zero or more rows from one or more database tables.
1. SQL join combines the records from two or more tables in a relational database.
2. CROSS join will produce the row which is the combination of each row from the first
table with each row from the second table.
3. AN INTERSECTION combines the results of two queries and it returns only rows that
appear in both result sets.
4. A UNION enables to combine the results of two SQL queries into a single table of all
matching row.
MANIPULATE DATA:
1. Insert data: - The statement INSERT adds one or more records for any single table in a
relational database.
2. Update data: - The statement UPDATE changes the data of one or more records in a
table.
3. Delete data: - DELETE statements remove one or more records from the table.
VIEWS:
Create views: Create views are the result of set of a stored query on the data,
where the database users can query just as they would persistent database
collection object.
FUNCTIONS:
A user defined functions are provided by user and aggregate function is a function where
the multiple values of rows are grouped together as an input on an certain criteria to form
single value of more significant meaning.
NORMALIZATION:
Normalization is the process of organizing the columns and tables of a relational database
to minimize data redundancy.
The types are First normal form (1NF), Second normal form (2NF), Third normal form
(3NF), Fourth normal form (4NF).
CONSTRAINTS:
We have to choose appropriate primary keys, select appropriate data type, select
appropriate fields for composite keys, understand the relationship between foreign and
primary key.
INDEXES:
They are basically used to quickly to locate data without having to search each and every
row in database table every time a database table is accessed.
SECURITY:
Database security is the use of a board range of information security controls to store
functions, protect databases, data servers, database systems, against compromises of
their confidentiality, integrity, and availability.
DATABASE BASICS:
Data item:
The data item is also called as field in data processing and is the smallest unit of data that
has meaning to its users. Eg: “e101”,”sumit” Entities and attributes: An entity is a thing
or object in the real world that is distinguishable from all other objects
Eg: Bank, employee, student
Attributes:
These are properties are properties of an entity.
Eg: Empcode, ename, rollno ,name
Database:
It is platform independent and therefore can be implemented and used across several
such as Windows, Linux server and is compatible with various hardware mainframes. It is
fast in performance, stable and provides business values at a low cost.
The database has become an integral part of almost every human's life. Without it, many
things we do would become very tedious, perhaps impossible tasks. Banks, universities,
and libraries are three examples of organizations that depend heavily on some sort of
database system. On the Internet, search engines, online shopping, and even the website
naming convention would be impossible without the use of a database. A database that
is implemented and interfaced on a computer is often termed a database server.
Entity
An entity is an “object” in the real world that is distinguishable from all other objects. An
entity set is a set of entities of the same type that share the same attributes.
Weak Entity
An entity set that may not have sufficient attributes to form a primary key is termed as a
weak entity set.
Attribute
Attributes are descriptive properties possessed by each member of an entity set.
Key attribute
A key attribute is the unique, distinguishing characteristic of the entity.
Multivalued attribute
In an instance where an attribute has a set of values for a specific entity is called
multivalued attribute.
Derived attribute
In these attributes the value can be derived from the values of other related attributes.
TKINTER
Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the
Tk GUI toolkit, and is Python's de facto standard GUI. Tkinter is included with standard
Linux, Microsoft Windows and Mac OS X installs of Python. The name Tkinter comes from
Tk interface. Tkinter was written by Fredrik Lundh.
Widget Edit
The generic term for any of the building blocks that make up an application in a graphical
user interface.
Tkinter provides three modules that allow pop-up dialogs to be displayed: tk.messagebox
(confirmation, information, warning and error dialogs), tk.filedialog (single file, multiple
file and directory selection dialogs) and tk.colorchooser (colour picker).
This allows Tk widgets to be easily themed to look like the native desktop environment in
which the application is running, thereby addressing a long-standing criticism of Tk (and
Dept of CSE, NHCE 15
P a g e | 16
hence of Tkinter). Some widgets are exclusive to ttk, such as the combobox, progressbar
and treeview widgets
Frame Edit:
In Tkinter, the Frame widget is the basic unit of organization for complex layouts. A frame
is a rectangular area that can contain other widgets.
BUTTONS
Active back ground: Background color when the button is under a cursor.
Active fore ground: Foreground color when the button is under a cursor.
bd: Border width in the pixels. Default is 2.
bg: its Normal background color.
command: Function or method to be called when the button is clicked on it.
fg: Normal foreground (text) color
font: Text font to be used for a button's label.
height: Height of the button in the text lines or pixels (images).
highlightcolor: The color of the focus highlight when the widget has focus.
image: Image to be displayed on the button.
justify: How to show multiple text lines: LEFT to left-justify each line; CENTER to
center them; or RIGHT to right-justify.
padx: Additional padding left and right of the text.
pady: Additional padding above and below the text.
relief: Relief specifies the type of the border. Some of the values are SUNKEN,
RAISED, GROOVE, and RIDGE
CHAPTER 4
DESIGN
4.1 ALGORITHM
SCHEMA DIAGRAM
Fig 4.1
ER DIAGRAM
Fig 4.2
CHAPTER 5
IMPLEMENTATION
IMPLEMENTATION OF FUNCTION
A function is a block of code which only runs when it is called.
We can pass a data, known as the parameters, into a function.
"def" is the keyword used to define a function.
A function can return a value
IMPLEMENTATION OF TKINTER
Tkinter is the standard GUI library for Python.
fast and easy way to create GUI applications.
It is a powerful object-oriented interface to the Tk GUI toolkit.
Import the Tkinter module.
IMPLEMENTATION OF MYSQL
MySQL is an open source in relational database management system that can be easily
implemented and managed either on-premise or via the cloud through the hosting
provider. It supports a lots of simultaneous writes and scales via replication.
CHAPTER 6
RESULTS
RESULT STEP 1:
When the user executes the program the output screen will be displayed.
RESULT STEP 2:
Before generating the bill, orders is placed (i.e, food name and and number of quantity is
entered) and the discount is 0%.
RESULT STEP 3:
When a customer orders a food and discount is 0%. To know the total amount of the order
we have to click on total button and to generate the receipt we have to click on receipt
button.
RESULT STEP 4:
When a customer orders food and the discount 10% is given. Then click on button apply
to calculate the total after applying the discount. And then click on total button to get
the total amount after discount and them click on receipt button to generate the receipt.
RESULT STEP 5:
To display the price list click on price button. It opens a new window which contains item
name and cost of each item.
RESULT STEP 6:
RESET FUNCTION
When a new customer orders we have to click on reset button to clear the previous order
or previously generated bill.
RESULT STEP 7:
CALCULATE FUNCTION
Cash pay , return and equals to are the three function which we use to calculate. If the
total amount of the order is rs.880 and the customer gives rs.1000. then fill the amount
customer given in entry of cashpay and then click on equals to button to display how much
money should be returned to customer.Thus Rs.120 will be displayed in return entry box.
RESULT STEP 8:
EXIT FUNCTION
When we have to close the program execution then we have click on exit button which
gives a pop message as "do you want to exit?". If the answer is yes then click on the "yes"
button and if the answer is no then click on the "no" button.
RESULT STEP 9:
DATABASE FUNCTION
When the program execution is done the recipt will be saved in database like date ,time,total,discount
and grand total. Which was created in mysql hence the calculations and misunderstanding is reduced and
it will be for further reference if any calculations error.
CONCLUSION
The Digitalized hotel billing is developed using graphical user interface (gui) python to
achieve the easy and simplified way of restaurant management system. This project is
proposed to reduce the manual system which consumes lot of time and efforts and also
which demands for labors and cost of labors is high. This project is made user friendly
which can surely bring improvements in the Quick hotel Service. Over a short period of
time, it will eliminate the traditional paper menu and with it, enhance the hotel dining
experience of every dinner.
The Digitalized hotel billing invoice brings a tremendous benefit to everyone. It benefits
for restaurant managers by saving money and time and enhances the profits for the
business. It benefits hotel guests or customers by providing an easy and comfortable
ordering and billing experiences.
REFERENCE
REFERENCE BOOK:
REFERENCE LINK:
StackOverflow:www.stackoverflow.com
www.tutorailspoint.com
https://www.geeksforgeeks.org/python-gui-tkinter/
https://docs.python.org/2/library/tkinter.html
www.youtube.com
Python GUI Programming Cookbook
www.wikipedia.org
www.dev.mysql.com/doc/