Faris-Abuali / Snack-Vending-Machine

Snack Machine Project implemented using State design pattern

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snack Machine Implementation using State Design Pattern

Vending machines can be of different types. Some vending machines are dedicated to coffee, some are dedicated to drinks, and others are dedicated to snacks. Here in this repository, I have implemented a Snack Vending machine.

UML Class Diagram

**Figure:** a UML diagram to illustrate my understanding of Object-Oriented design techniques and concepts.

The above is my UML class diagram. I have used the "State design pattern".

  • State design pattern simply allows an object to alter its behavior when its internal state changes.
  • The object will appear to change its class.
  • Each state is represented in an individual class (I have designed 4 states)

Here is an additional diagram (state machine diagram) I have designed to illustrate the states and the transitions/actions:

UML State Machine Diagram

Output Example 👇

image image image image image image image

About

Snack Machine Project implemented using State design pattern


Languages

Language:Java 100.0%