/Coffee-machine

A coffee machine simulation project. It allows users toselect different types of coffee, check available resources, make purchases, and handle the financial aspect of the transactions.

Primary LanguagePython

Coffee-machine

Overview

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.

Files

1. main.py

Description: The main script that orchestrates the coffee machine simulation.
Responsibilities:
User interface and menu interaction.
Integration of Menu, MoneyMachine, and CoffeeMaker functionalities.

2. menu.py

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.

3. money_machine.py

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.

4. coffee_maker.py

Description: Simulates the coffee-making process.
Responsibilities:
Deducting required ingredients from available resources.
Displaying a message for the user when the coffee is ready.

How to Run the Coffee Machine Project

1. Clone the Repository:

git clone https://github.com/shohanR/Coffee-machine.git 
cd your-repository

2. Run the Coffee Machine:

python main.py

3. Interact with the Menu:

  • Follow the on-screen instructions to choose a coffee option.
  • Enter the corresponding number for your desired coffee.

4. Make Payments:

  • Enter the required amount when prompted.

5. Repeat or Exit:

  • After making a purchase, choose to make another purchase or exit the program.

Dependencies

  • Python 3.x

Notes

ANSI escape codes are used for colored output. Make sure your terminal supports ANSI escape codes for the best visual experience.