[go: up one dir, main page]

0% found this document useful (0 votes)
17 views17 pages

Café Ordering System

Uploaded by

Ivan Rey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views17 pages

Café Ordering System

Uploaded by

Ivan Rey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Café Ordering

System
Team
AI - 25
• Jhanward A. Alde
• Jhoe Mario Alfe S. Bagtong
• Kristian G. Lazarte
• Cyric Jhon Sudario
• Sean Vincent Q. Naputo
• Edril A. Cuevas

2
Overview of
the System

The proposed system will cover processes


allowing a user to create an order, select
coffee types, customize the coffee (size, milk
type, etc.), and provide the total price. The
system is designed to automate taking coffee
orders, customizing them, and managing
multiple items in an order efficiently.

3
. Objective
The objective of this system is to ensure
that consumers have the flexibility to
personalize their coffee orders based
on their desired selections (size, milk,
and extras). Price adjustments are
made dynamically depending on the
alterations chosen, guaranteeing
precise and clear invoicing. The system
also supports future scalability and
integration, which will ultimately help
coffee businesses grow while delivering
a better customer experience. 4
OOP
Implementation
and Code
Documentation
We implemented the 4 principles of OOP (Object-oriented Programming) to our benefit and decided to
integrate Data Abstraction.
This system demonstrates Object-Oriented Programming (OOP) principles effectively through
encapsulation, abstraction, and composition. Encapsulation is evident as each class, such as Coffee,
OrderItem, Order, and Customer, groups related data and methods together. For instance, the Coffee
class encapsulates attributes like name, base price, and image, while the OrderItem class encapsulates
the pricing logic based on size, milk type, and extra shots. Private attributes like base price in the
Coffee class ensure controlled access through methods like get price().

Abstraction is applied to hide complex implementation details from the user. Methods such as
OrderItem. get item price() abstract the calculation logic for item pricing, and Order. save to database()
abstracts the database operations, shielding the user from the intricacies of SQL queries. Similarly,
Order.print receipt() provides a clear summary of the order without exposing the underlying logic for
formatting and calculations. These abstractions simplify interaction with the system while maintaining
clarity and functionality.
While inheritance and polymorphism are not directly used, they could be seamlessly integrated to
extend the system's functionality. 6
Relevant code snippets with proper documentation and
comments Example

Comment:
The base price attribute is made private
(prefix) to restrict direct access, ensuring it
cannot be modified directly. Instead, a public
method get price() is provided to allow
controlled access to the value. This
demonstrates encapsulation, as the internal
details of Coffee are hidden from the rest of
the system, exposing only necessary
functionality.
Comment: The get_item_price() method abstracts the
complex logic of calculating an item's price based on size,
milk type, and extra shots. This shields users from the
underlying computation details, providing a simple way to
retrieve the price. This is an example of abstraction, where
only the essential information is exposed.

These snippets highlight how the system uses OOP principles


like encapsulation, abstraction, and polymorphism. This
design promotes clarity, modularity, and maintainability in
the system. Overall, this system's modularity and reusability
highlight its alignment with OOP principles, making it 7
extensible and maintainable for future enhancements.
2/1/20XX

Data Structures
and Algorithm

8
When a user places an order, a pricing algorithm automatically
calculates the cost of each item by factoring in the adjustments for
size, milk type, and extra shots based on the predefined rules. The
total cost of the order is calculated by summing up the individual
item prices, ensuring that the bill is accurate. To save the order
details, the system uses a database-saving algorithm that stores the
customer information, the order details, and item-specific details in
separate tables.
If the user forgets to input his name while making an order the
system notifies the user using Flask’s flash function, reminding them
that they haven’t completed the action yet. Once the order is
confirmed, a receipt is automatically generated and shown to the
user with all of the order details, giving the user a clear easy-to-read
summary of their purchase.
9
10
Database Management System (DBMS)

Customers: Stores information about the customer.


id (Primary Key) name (Customer name)

Orders: Stores information about orders placed. id (Primary Key) customer_id (Foreign Key
Customers.id) order_type (e.g., Dine-in, Takeout) total_price (Computed total for the order)

Order_Items: Stores details of items in an order. id (Primary Key) order_id (Foreign Key
Orders.id) coffee_name (The coffee item) size (Small, Medium, Large) milk (Regular, Soy,
Almond) extra_shots (Number of additional shots) price (Computed price for the item)

Results System:

The homepage welcomes users,


offering them options to view the
menu or place an order.
Features:
Buttons for "View Menu" and "Place an
Order." A welcoming message for users.

11
The menu page displays available coffee, with their names, prices, and
images.

Features:
- Coffee options with a clear layout.
- Price information for each item.
Images of each coffee type to make the menu
visually appealing

12
The order page allows users to
choose their coffee, specify
customizations (size, milk type,
extra shots), and submit their order

Features:
- A form for entering customer details and selecting order type.

- Checkboxes for selecting coffee items.

- Dropdowns to customize size, milk, and number of extra shots.

- Real-time price calculation based on selected options.


13
After placing the order, the receipt
page displays the details of the
order, including the selected coffee
items, customizations, and the total
price.

Features:
- List of ordered items with detailed customization.

- Total price for the order.

- Back-to-home button for easy navigation.


14
Relevant codes: 2/1/20XX

15
Tools used:

Xampp (for MySQL Database Management)

VSCode

phpMyAdmin

16
Thank You

17

You might also like