Skip to content

TashanAppuhami/Burger_Shop2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

:

๐Ÿ” iHungry Burger Ordering System

A simple Java console application that simulates a burger shop ordering system. This project was created for learning Object-Oriented Programming (OOP) concepts such as classes, objects, constructors, arrays, methods, validation, and encapsulation.

๐Ÿš€ Features

Place an Order

Automatically generates unique Order IDs (B0001, B0002, โ€ฆ).

Validates customer phone number (must be 10 digits starting with 0).

Validates customer name (only letters allowed).

Calculates total price (Quantity ร— BURGERPRICE).

Best Customer

Finds customers who spent the most.

Ignores cancelled orders.

Displays all customers with their total spent, sorted from lowest โ†’ highest.

Search Order

Look up an order using its Order ID.

Displays order details (ID, customer, quantity, total, and status).

Search Customer

Search orders by customer phone number.

Displays all orders placed by that customer.

View Orders by Status

Delivered Orders

Preparing Orders

Cancelled Orders

Update Order Details

Update order quantity (recalculates price).

Update order status (PREPARING, DELIVERED, CANCELLED).

Restrictions: Delivered or Cancelled orders cannot be updated.

Exit

Cleanly exits the system.

๐Ÿ› ๏ธ Technologies Used

Java (Core, Console I/O, OOP)

No external libraries needed

๐Ÿ“‚ Project Structure โ”œโ”€โ”€ Burger.java # Burger class with order details & methods โ”œโ”€โ”€ BurgerShop2.java # Main class with menu & logic

Burger.java

Fields: orderId, customerId, customerName, burgerQty, burgerPrice, orderStatus

Methods: Getters, setters, update quantity, update status

BurgerShop2.java

Handles menu, input, and program flow

Stores all Burger objects in a static array

Contains validation and search functions

โ–ถ๏ธ How to Run

Clone the repository

git clone https://github.com/your-username/burger-ordering-system.git cd burger-ordering-system

Compile the program

javac BurgerShop2.java

Run the program

java BurgerShop2

๐Ÿ“– Example Menu +----------------------------------------------------+ | iHungry Burger | +----------------------------------------------------+

[1] Place Order [2] Search Best Customer [3] Search Order [4] Search Customer [5] View Orders [6] Update Order Details [7] Exit

Enter an option :

๐Ÿ”ฎ Future Improvements

Replace arrays with ArrayList for easier order management.

Allow customer names with spaces (e.g., "John Doe").

Save orders to a file (so data isnโ€™t lost when the program closes).

Add discounts and loyalty points for frequent customers.

About

OOP_Project 1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages