Professional Documents
Culture Documents
OOP Project
OOP Project
0
Term Project Proposal Date: November 12, 2019
UNIVERSITY OF GUJRAT
Department of Computer Science
Submitted By:
Supervised By:
© Department of CS
University of Gujrat
1
CS- UOG – Canteen Management System Version: 1.0
Term Project Proposal Date: November 12, 2019
The program can store new canteen item, edit them, delete them. You can see the full list of items
stored in Canteen. Here I am using MySql database.
1. All Items
2. Sold Items
3. Add New Item
4. Edit Item
5. Delete Item
6. Search By Id
7. Search By Name
8. Check Quantity
9. Add New Sale
© Department of CS
University of Gujrat
2
CS- UOG – Canteen Management System Version: 1.0
Term Project Proposal Date: November 12, 2019
Project Features
Inheritance
Composition
Polymorphishm
Global variables
Class Canteen
Function main
© Department of CS
University of Gujrat
3
CS- UOG – Canteen Management System Version: 1.0
Term Project Proposal Date: November 12, 2019
o Sold Items
o Add New Item
o Edit Item
o Delete Item
o Exit
If else is used to select
o New Customer
o All Items
o Sold Items
o Add New Item
o Edit Item
o Delete Item
o Exit
Function show ()
Function addNewItem ()
© Department of CS
University of Gujrat
4
CS- UOG – Canteen Management System Version: 1.0
Term Project Proposal Date: November 12, 2019
If insertion query work successfully, then success message will be shown if not then error
message will be shown in this Canteen Management System program.
Function addNewSale()
In this function I passed two parameter name and quantity of the item stored in canteen
In this function I used stringstream to convert string to integer and integer to string
After adding new item to sold table, an update query will run to update the quantity of
item in items table in Canteen Management System C++ program.
Function allItems()
Function soldItems ()
In this function, I fetched all sold items from the sold table
And showing them in a table
If query failed, then it will show the error message
Function searchById ()
Function searchByName ()
© Department of CS
University of Gujrat
5
CS- UOG – Canteen Management System Version: 1.0
Term Project Proposal Date: November 12, 2019
In this function, I searched item with one specific name passed as parameter
First selects all items and then checking if the row[1] means our name column from
database table is equal to or not. If equal then loop will break and assign true to the found
variable.
At last it return found bool variable.
Function checkQuantity ()
When user select item from the whole list, then it checks if the quantity is available or not
with the specific name passed name and quantity
Stringstream used to convert string to integer
previousQuantity is a global variable. It is used to update items after user purchase any
item
It will return the found variable
Function editItem()
Function deleteItem ()
© Department of CS
University of Gujrat
6
CS- UOG – Canteen Management System Version: 1.0
Term Project Proposal Date: November 12, 2019
© Department of CS
University of Gujrat
7