This project simulates the activity of a vending machine for snacks and drinks. It uses five types of Design Patterns.
- Singleton Pattern is used to ensure that there is only one instance of the vending machine.
- Mediator Pattern is used to encapsulates interactions between the various parts of the machine.
- Builder Pattern is used to create types of drinks step-by-step according to customer requirements.
- Decorator Pattern is used to intended for adding optional extras to the purchased products.
- Template method Pattern is used to select the purchase report print format. The project also includes a UML diagram that shows the relationships between the different classes in the project. The diagram is available in the docs folder.
The project is made with WinForm technology. It can be run on Windows 10 or later.
- Open a command prompt and navigate to the project directory.
- Run the following command: dotnet run
- The project will start up and you will be able to interact with the vending machine.
The following UML diagram shows the relationships between the different classes in the project:
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request on the GitHub repository.