June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
- 1 -
Terry Corlet, Josip Lozina and Stephan Brumme
June 3rd, 2004
Vending Machine Terry Corlet, Josip Lozina and Stephan Brumme June - - PowerPoint PPT Presentation
32536: Object Oriented Modelling Vending Machine Terry Corlet, Josip Lozina and Stephan Brumme June 3 rd , 2004 June 3 rd , 2004 Terry Corlet, Josip Lozina and Stephan Brumme - 1 - Agenda 1. Introduction 2. Process 3. Implementation 4.
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
June 3rd, 2004
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
1 2 3 4 5
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
– who ? – when ? – where ? – what ?
– UML
certain experiences ?
1 2 3 4 5
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
– start with a simple model refine to build the final model – we came up with 8 revisions !
1 2 3 4 5
Design Implementation [Refinement] [Refinement]
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
1 2 3 4 5
– what is clear ?
– what is ambiguous ?
– 5 cent rounding – smallest accepted coin
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
– class diagram is integral – look for adequate names – semantics
– well-known techniques – often directly mapped to UML structures
1 2 3 4 5
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
1 2 3 4 5
KeyPad Product Balance Coin Display TransactionController 1 8 contains alpha buttons 1 1 creates 1 1 has a keypad 1 1 has a balance 1 1 has a balance 1 1 has a transaction controller 1 2 has displays 1 0..* contains coins 1 80 contains products 1 0..1 has a product ProductLocation 1 1 has a location 1 1 has a cancel button «uses» «uses» 1 10 contains numeric buttons Button CancelButton NumericButton AlphaButton CoinValidator 1 1 has a coin validator
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
1 2 3 4 5
Purchase product
System
Select product Pay for product «extends» «extends»
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
1 2 3 4 5
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
– mapping state diagram to OO structure – several diagrams !
1 2 3 4 5
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
– emphasize temporal relationships
1 2 3 4 5
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
1 2 3 4 5
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
– UML is a mix of several notations
– and no consistent level of detail (use cases vs. class diagram)
– hundreds of possibilities to model a problem with UML
1 2 3 4 5
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
– human perception – Bertin’s variables
1 2 3 4 5
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
1 2 3 4 5
– … but UML helped to speak the same language !
– but the last meetings were quite efficient and effective time initially spent paid off
– now essential skill of advanced developers
June 3rd, 2004 Terry Corlet, Josip Lozina and Stephan Brumme
1 2 3 4 5