Skip to content

abdullahcodes-dev/CafeManagementSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

β˜• Cafe Management System

A console-based Cafe Management System built in Java as part of my Programming Fundamentals coursework.

The application allows customers to browse the menu, place orders, and generate receipts, while administrators can manage menu items. It uses Java file handling to store menu data and customer order history, ensuring data persists between program executions.


⭐ Features

Customer Panel

  • View available menu items
  • Place customer orders
  • Select item quantities
  • Generate itemized receipts
  • Save order history to orders.txt

Admin Panel

  • View the current menu
  • Add new menu items
  • Remove existing menu items
  • Save updated menu data to menu.txt

πŸ’‘ Programming Concepts Practiced

This project was developed to strengthen core Programming Fundamentals concepts, including:

  • Arrays & Parallel Arrays
  • Methods
  • Loops (for and do-while)
  • Conditional Statements
  • Switch Case
  • File Handling
  • Exception Handling

πŸ“‚ Data Persistence

The application stores data using two text files.

menu.txt

Stores menu items and their prices.

Example:

Burger,15.99
Pizza,30.59
Shawarma,10.09

orders.txt

Stores customer receipts and order history so previous orders are preserved.


βš™οΈ How It Works

  1. Load menu data from menu.txt.
  2. Display the main menu.
  3. Allow customers to browse and place orders.
  4. Generate and save customer receipts.
  5. Allow administrators to manage menu items.
  6. Automatically save menu updates and order history.

πŸ› οΈ Technologies Used

  • Java
  • Zed IDE
  • Java File I/O
  • File
  • FileWriter
  • PrintWriter
  • Scanner

πŸ“ Project Structure

CafeManagementSystem/
β”‚
β”œβ”€β”€ screenshots/
β”‚   β”œβ”€β”€ code_snippets/
β”‚   └── output/
β”‚
β”œβ”€β”€ CafeManagementSystem.java
β”œβ”€β”€ menu.txt
β”œβ”€β”€ orders.txt
β”œβ”€β”€ .gitignore
└── README.md

▢️ How to Run

Compile

javac CafeManagementSystem.java

Run

java CafeManagementSystem

πŸ“Έ Screenshots

Main Menu

Main Menu

Customer Ordering

Customer Ordering

Customer Receipt

Customer Receipt

Return to Main Menu

Return

Admin Panel

Admin Panel

Add Menu Item

Add Item

Remove Menu Item

Remove Item

Navigation

Navigation

Program Exit

Exit


πŸ’» Code Highlights

Menu Display

Code Snippet 1

Menu File Handling

Code Snippet 2

Loading Menu Data

Code Snippet 3

Main Menu Logic

Code Snippet 4

Customer Ordering Logic

Code Snippet 5

Quantity & Billing

Code Snippet 6

Receipt Generation

Code Snippet 7

Saving Orders

Code Snippet 8

Admin Panel Logic

Code Snippet 9

Add Menu Items

Code Snippet 10

Remove Menu Items

Code Snippet 11


πŸ“š Learning Outcomes

Through this project, I strengthened my understanding of:

  • Java programming fundamentals
  • Problem solving
  • Arrays and methods
  • File handling
  • Exception handling
  • Structuring console-based applications

πŸš€ Future Improvements

Potential enhancements include:

  • Java Swing or JavaFX GUI
  • Database integration
  • Improved input validation
  • Dynamic menu management using ArrayList
  • Admin authentication

πŸ‘¨β€πŸ’» Author

Muhammad Abdullah

BSCS Student at COMSATS University Islamabad

GitHub: https://github.com/abdullahcodes-dev

About

Console-based Java Cafe Management System with customer ordering, admin menu management, and file handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages