ObjectOriented Programming Using Unified Modeling Language - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

ObjectOriented Programming Using Unified Modeling Language

Description:

The user starts by entering the fabrication mode of every machine and execution time. ... the user enters the fabrication modes and execution time again, ... – PowerPoint PPT presentation

Number of Views:65
Avg rating:3.0/5.0
Slides: 31
Provided by: ccEeN
Category:

less

Transcript and Presenter's Notes

Title: ObjectOriented Programming Using Unified Modeling Language


1
Object-Oriented Programming Using Unified
Modeling Language
  • Shyh-Kang Jeng
  • Department of Electrical Engineering/
  • Graduate Institute of Communication Engineering
  • National Taiwan University

2
Reference
  • G. Booch, J. Rumbaugh, and I. Jacobson, The
    Unified Modeling Language User Guide, Addison
    Wesley, 1999.

3
Brief History of UML
  • Object-oriented modeling languages (1970s-1980s)
  • Object-oriented methods (1984-1994)
  • Boochs method (expressive)
  • Jacobsons OOSE (use cases)
  • Rumbaughs OMT (useful for data-intensve systems)
  • Three Amogos and Rational Software Corporation
  • UML (1994) and OMG standard (v1.3, 1998)

4
Use Case Diagrams
  • Example

5
Flow of Events
  • Example ATM Validate User
  • Main flow of events
  • Exceptional flow of events
  • Customer cancel a transaction
  • Customer clear a PIN number
  • Customer enters an invalid PIN number

6
Scenarios
  • A use case describes a set of sequences in which
    each sequence in the set represents one possible
    flow through all these variations.
  • Each sequence is called a scenario.
  • A scenario is a specific sequence of actions that
    illustrates behavior.

7
Association Name, Role, Multiplicity
  • Example

1..

Works for
Company
Person
employee
employer
8
Association Aggregation
  • Example

Company
1

Department
9
Modeling Structural Relationships
  • Example

10
Responsibilities
  • Example

FraudAgent
Responsibility -- determine the risk of a
customer order -- handle customer- specific
criteria for fraud
11
Visibility
  • Example

12
Dependency
  • Example

13
Notes
  • Examples

14
Modeling Different Views of a System
  • Use case view
  • Use case diagrams (structural modeling)
  • Activity diagrams (behavioral modeling)
  • Design view
  • Class diagrams (structural modeling)
  • Interaction diagrams (behavioral modeling)
  • Statechart diagrams (behavioral modeling)

15
Interaction Diagrams
  • Examples

16
Instances
  • Examples

17
Messages
  • Examples

18
Sequence Diagrams
  • Example

19
Collaboration Diagrams
  • Example

20
Statechart Diagrams
  • Example

21
Case Study
  • Statement of the Problem

22
Use case diagram
Simulate Operation
23
Use case description
  • The user starts by entering the fabrication
    mode of every machine and execution time. The
    system then simulates the production line for the
    entered execution time. After that the system
    reports the sizes of all queues. The user
    decides to quit or continue. If continue, the
    user enters the fabrication modes and execution
    time again, and the system repeats. The system
    stops when the user decides to quit.

24
Initial Class Diagram
ProductionLine
5
2
Queue
Machine
4
Connects to
2 input queues 2 output queues
25
Statechart Diagram for Machine
26
Statechart Diagram for Machine Modes
Input Queue is Empty
27
Collaboration Diagram
1decrease
4increase
3decrease
2increase
2increase
4increase
3decrease
1decrease
28
Flow-of-Events Description
  • First, machine m1 responds according to the
    statechart diagrams related to its fabrication
    mode and state. If in Idle state and the input
    queue is not empty, decrease the input queue (1).
    If in InProduction state and the In Production
    Hour reaches the Required Work Hours, increase
    the output queue (2). Similarly, machine m2
    responds according to the statechart diagrams
    related to its fabrication mode and state (3,4).

29
Initial Class Design -- ProductionLine
ProductionLine
Responsibilities -- simulate one hour -- set
fabricate modes -- add raw material
30
Initial Class Design Queue
Queue
size int
Write a Comment
User Comments (0)
About PowerShow.com