https://github.com/md-talim/coffee-machine-simulator
A Java-based coffee machine simulator to brew coffee, manage resources, and handle money.
https://github.com/md-talim/coffee-machine-simulator
beginner-project console-application java oop simulation
Last synced: about 1 year ago
JSON representation
A Java-based coffee machine simulator to brew coffee, manage resources, and handle money.
- Host: GitHub
- URL: https://github.com/md-talim/coffee-machine-simulator
- Owner: Md-Talim
- Created: 2025-04-27T07:50:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-27T07:54:38.000Z (about 1 year ago)
- Last Synced: 2025-04-27T08:29:08.916Z (about 1 year ago)
- Topics: beginner-project, console-application, java, oop, simulation
- Language: Java
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Coffee Machine Simulator
Welcome to the Coffee Machine Simulator! This project is a simple yet powerful simulation of a coffee machine that allows you to brew coffee, manage resources, and handle money. It was built as part of the Hyperskill Java course to practice object-oriented programming (OOP) concepts and Java basics.
## Features
- Brew three types of coffee: **Espresso**, **Latte**, and **Cappuccino**.
- Manage resources like water, milk, coffee beans, and disposable cups.
- Collect money from coffee sales.
- Refill the machine with supplies.
- Clean the machine after making several coffees.
- Display the current state of the machine.
- Exit the program gracefully.
## How to Use
1. Run the program.
2. Choose an action from the menu:
- `buy`: Purchase a coffee.
- `fill`: Refill the machine with resources.
- `take`: Collect the money from the machine.
- `clean`: Clean the machine.
- `remaining`: View the current state of the machine.
- `exit`: Exit the program.
3. Follow the prompts to interact with the coffee machine.
## Project Highlights
- **Object-Oriented Design**: The project uses classes like `CoffeeMachine` and `Coffee` to encapsulate functionality and data.
- **User Interaction**: The program uses a menu-driven interface for user input.
- **Resource Management**: Tracks and updates resources dynamically based on user actions.
- **Error Handling**: Notifies the user when resources are insufficient to make coffee.
## Learning Outcomes
This project helped reinforce the following concepts:
- Basic Java syntax and structure.
- Object-oriented programming principles.
- Working with loops, conditions, and methods.
- Managing user input and program flow.
## How to Run
1. Clone the repository.
2. Compile the Java files:
```bash
javac -d bin src/*.java
```
3. Run the program:
```bash
java -cp bin App
```
## About the Project
This project was developed as part of the Hyperskill Java course. It serves as a graduate project, showcasing the application of core Java concepts and OOP principles.