COM 244 Object Oriented Programming Some parts of
COM 244 Object Oriented Programming Some parts of those slides are adapted on course materials by Stuart Reges http: //www. cs. washington. edu/331/
A Case Study The Unified Modeling Language (UML) is a very leading modeling graphical language for constructing and documenting the basis of software system. 2
Case Study ( Coffee Vending Machine) • Design a coffee machine • This machine can serve coffee with sugar and cream or without cream or sugar (black coffee) • The machine requires 1 TL to serve coffee 3
Objects used in the Coffee Machine • Cash box: It is able to regulate the amount of money given by customers and knows the amount of coffee. Besides it can control the front panel • Front Panel: It presents user organization. of the mixer choices and responsible from the 2012 4
Objects used in the Coffee Vending Machine (2) • Mixer: Send required ingredients to dispenser • Dispenser: It knows how to mix ingredients and can reliaze when any of those ingredients ( coffee, sugar 0 r cream ) or/and cup do not exist in the machine 2012 5
Objects used in the Coffee Vending Machine (2) • UML The use case diagram covers 3 major components. The first component is the use case or cases. Given figure employs a case diagram of an Coffee machine. There exists 4 use cases. The second component is the actor. The actor is the external entity that interacts with the system. The last component is the relationship between the use case and an actor or another use case. There can be multiple types of relationships shown on a use case diagram 2012 6
Objects used in the Coffee Vending Machine (2) • UML 2012 7
Objects used in the Coffee Vending Machine (2) • UML 2012 8
Sequence Diagram for Coffee Machine 9
Test Conditions • Ali put 50 kuruş into machine and orders a coffee • Ali put 2 coins , each of them is 50 kuruş, into machine but goes away and does not come back again. • Ali orders two coffees with sugar and cream (white coffee) but the machine can only serve one white coffee ? 2012 10 10
Class Diagram of an ATM Machine 11
Class Diagram of a Medical Clinic System This template was adapted from the template can be seen in: https: //creately. com/diagram/example/ild 9 fmpk 1/Online%2 BMedical%2 BClinic%2 BSystem%2 B-%2 BClass%2 BDiagram 12
- Slides: 12