This C++ program simulates a vending machine, providing an interactive console interface for users to select and purchase products. It demonstrates object-oriented programming concepts such as classes and encapsulation.
Product Class: Represents a product in the vending machine with attributes like name, price, and icon. VendingMachine Class: Manages a collection of products and handles operations such as displaying products, selecting a product, checking payment, and calculating change. Interactive Console Interface: Allows users to View available products and their prices, Select a product by entering its number and Insert payment and receive change if the payment is sufficient.
Compile the program using a C++ compiler. Run the compiled executable. Follow the prompts to view products, select a product, and insert payment.
Contributions are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.