1
L5-1 L5-2
Recap : UML artefacts Actors Use Cases Use Case Diagrams - - PDF document
L5-1 Recap : UML artefacts Actors Use Cases Use Case Diagrams Storyboards Black Box Functional Requirements Specification Diagrams: Class System System Sequence Test Design Statechart Activity Test Cases System System
L5-1 L5-2
L5-3
L5-4
(These are not a sequence of steps!!!!)
L5-5
L5-6
selectZone() pickupChange() pickUpTicket() insertCoins() Passenger TicketMachine
L5-7
selectZone() Passenger ZoneCheckbox TarifSchedule Display lookupPrice(selection) displayPrice(price) price
L5-8
L5-9
blinkHours() blinkMinutes() incrementMinutes() refresh() commitNewTime() stopBlinking() pressButton1() pressButton2() pressButtons1And2() pressButton1() :WatchUser :Time :LCDDisplay :SimpleWatch L5-10
L5-11
button1&2Pressed button1&2Pressed button1Pressed button2Pressed button2Pressed button2Pressed button1Pressed button1&2Pressed Increment Minutes Increment Hours Blink Hours Blink Seconds Blink Minutes Increment Seconds Stop Blinking
L5-12
* Functional model: use case diagram * Object model: class diagram * Dynamic model: sequence, statechart and activity diagrams
L5-13
L5-14
L5-15
L5-16
L5-17
L5-18
L5-19
L5-20
L5-21
L5-22
L5-23
L5-24
L5-25
L5-26
Narrow and deep Balanced Wide and shallow Inheritance Trees of classes with a common super class Small classes Exploits commonality Hard to understand Combination Hard to define Hard to achieve Successful trade-off Aggregation or Composition Forests of loosely coupled classes Large classes May not exploit commonality Easier to understand
L5-27
L5-28
L5-29
Class Square_Efficient_Storage { int width; void setWidth(int width) { this.width = width; } int getArea() { return width*width; } … } Class Square_Efficient_Computation { int width; int area; void setWidth(int width) { this.width = width; area = width*width; } int getArea() { return area; } … } L5-30
L5-31
L5-32
L5-33
L5-34
L5-35
L5-36
L5-37
L5-38
L5-39
L5-40
L5-41
L5-42
L5-43
L5-44
L5-45
L5-46