The Sandwich Shop Ordering System is a Java-based application designed to help users customize, order, and track their sandwich purchases in a simple and intuitive manner. This project uses object-oriented principles and design patterns to handle different sandwich components like bread, meat, cheese, vegetables, sauces, and beverages. The system allows customers to easily create custom sandwiches or select from preset options, add side items like chips and drinks, and process orders with detailed receipts.
- Sandwich Customization: Users can choose from various types of bread, meats, cheeses, vegetables, and sauces to create a personalized sandwich.
- Preset Sandwiches: Users can also select preset sandwich combinations from the menu.
- Order Processing: The application calculates the total cost and calories of the order.
- Receipt Generation: After checkout, a detailed receipt is generated and saved as JSON and Text file.
- User-Friendly Interface: A console-based UI that interacts with users, displaying relevant information and guiding them through the ordering process.
private static void appendIngredientDetails(StringBuilder stringBuilder, String prefix, String name, double price, double calories) {
stringBuilder.append("║ ").append(prefix)
.append(String.format("%-20s", name))
.append(String.format("%.2f", price))
.append("\t\t").append(String.format("%.1f", calories))
.append("\n");
}
This method allows us to maintain consistent formatting when displaying the sandwich order details in a user-friendly manner.
Below is a screenshot of the UML class diagram used to structure the application’s classes and their relationships:UML Class Diagram
the class is a diagram that shows the relationship between objects in a system. It describes the structure of the system by showing the system's classes, attributes, operations, and the relationships among the classes.

A use case diagram is a graphical representation of the interactions between the system and the actors that use the system. It shows the relationship between the actors and the use cases within the system.

This project is licensed under the MIT License - see the LICENSE file for details.