Skip to content

DavidMANZI-093/PizzaOrderingSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Pizza Ordering System


πŸ“¦ Project Structure

src/
└── main/
    β”œβ”€β”€ app/         β†’ Contains the main class `PizzaTester`
    β”œβ”€β”€ model/       β†’ Core classes: `Pizza`, `Order`, `Customer`, `InvalidPizzaException`
    └── enums/       β†’ Enum definitions for all types (Meat, Veggie, etc.)

πŸš€ How to Run the Program

  1. Open terminal in src/main/

  2. Compile the classes

    javac app/*.java model/*.java enums/*.java
  3. Run the main app

    java app/PizzaTester.java

πŸ§‘β€πŸ³ How it Works

  • You’ll be asked how many pizzas you want to order.
  • For each pizza, enter:
    • Number of slices
    • Meat, Veggie, Crust, Size
    • One or more toppings (comma-separated)
  • Enter customer name, address, and phone number.
  • Choose delivery or pickup.
  • Your order is saved to pizza_orders.json and displayed on screen.
  • The system auto-loads and shows previous orders every time it starts.

πŸ“„ File Format

Orders are saved in a human-readable format to pizza_orders.json
Each order includes:

  • Order ID and timestamp
  • Customer details
  • List of pizzas with price breakdown
  • Delivery/pickup option
  • Grand total with discount if applicable

πŸ’‘ Notes

  • Input is case-insensitive, but enum values must match predefined options.
  • A 5% discount is applied if you order more than one pizza.
  • Invalid entries throw friendly custom exceptions.
  • Orders are appended, not overwritten β€” you’ll always have your order history!

About

The PizzaOrderingSystem is a Java application for managing pizza orders. It allows users to customize pizzas, manage customer details, and choose delivery or pickup options. Orders are saved in a JSON file with support for discounts and persistent order history.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages