This project implements a simple interactive coffee machine simulation. Users can select various coffee options, make payments, and receive their chosen beverages. The project is divided into modular files, each handling specific functionalities.
Description: The main script that orchestrates the coffee machine simulation.
Responsibilities:
User interface and menu interaction.
Integration of Menu, MoneyMachine, and CoffeeMaker functionalities.
Description: Defines the menu and menu item classes for different coffee options.
Responsibilities:
Menu item creation and initialization.
Retrieving available menu items and finding a specific drink.
Description: Manages the financial aspects of the coffee machine, including payment and change calculation.
Responsibilities:
Handling user input for money.
Processing payments and making change.
Keeping track of profits.
Description: Simulates the coffee-making process.
Responsibilities:
Deducting required ingredients from available resources.
Displaying a message for the user when the coffee is ready.
git clone https://github.com/shohanR/Coffee-machine.git
cd your-repository
python main.py
- Follow the on-screen instructions to choose a coffee option.
- Enter the corresponding number for your desired coffee.
- Enter the required amount when prompted.
- After making a purchase, choose to make another purchase or exit the program.
- Python 3.x
ANSI escape codes are used for colored output. Make sure your terminal supports ANSI escape codes for the best visual experience.