Problem: A Vending Machine stores diferent types of candy from different companies with different prices. For example: company A has a chocolate with price X and company B has also a chocolate with price Y and a candy bar with price Z. A client can only pay with a credit card. At the end of the day the vending machine makes the totalAmount which is the gain that it made during that day. Also the vending machine verifies if the client has enough money to buy the item
Question: Is there a design pattern or best practice that can be used in order to solve this problem? How should this problem look in a UML Diagram?
Sorry if I made some mistakes in English.
Aucun commentaire:
Enregistrer un commentaire