This repository contains the source code for a coffee machine software. The software allows users to interact with the coffee machine, make various types of coffee, check resources, process payments, and generate reports.
The coffee machine software fulfills the following requirements:
-
Print Report: Users can generate a report that displays the current status of the coffee machine, including the company's profit and available resources.
-
Check Resources: The software checks if there are sufficient resources (water, milk, and coffee) available in the machine before preparing a coffee.
-
Process Coins: The software handles the payment process by accepting coins from the user and calculating the total payment amount.
-
Check Transaction Successful: The software verifies if the user's payment is sufficient to purchase the selected coffee and completes the transaction accordingly.
-
Make Coffee: The software prepares the selected type of coffee by deducting the required resources from the machine and delivering the coffee to the user.
To run the coffee machine software, execute the source_code.py file. The software provides a user-friendly command-line interface for interaction. You can type the following commands:
espresso: Make an espresso coffee.latte: Make a latte coffee.cappuccino: Make a cappuccino coffee.report: Generate a report of the coffee machine status.off: Turn off the coffee machine.
If you need assistance or want to explore other commands, you can type help to access the help section.
The project consists of the following files:
-
source_code.py: The main source code file that contains the coffee machine software logic. It imports functions fromprog_functions.pyand uses ASCII art fromart.pyfor UI enhancements. -
prog_functions.py: This file provides additional functions required by the coffee machine software, including functions to read the company's profit, generate reports, process payments, and handle the coffee purchase process. -
database.py: This file defines a dictionary that stores the menu options, including the available types of coffee, their ingredients, and costs. It also defines another dictionary for tracking the available resources in the coffee machine. -
art.py: This file contains ASCII art used for enhancing the user interface. It includes the company logo, report design, and payment section design.
Special thanks to Angla Yu for bringing about the idea for this project through her 100 days of code course on Udemy
The ASCII art used in the software's user interface is created using the art library.
Note: The ASCII art in the README might not render properly on all platforms. Please refer to the actual source code files for accurate representations.
Feel free to explore the source code and adapt it to your needs. Enjoy your coffee machine software!
This project is licensed under the MIT License - see the LICENSE.txt file for details.
- Author: Ehiane Oigiagbe(me)
