OOAD Using UML LAB R21
WEEK 1:
Familiarization with rational rose
a. A Tour of Rational Rose
Environment
• Application Window: a title bar, tool bar, menu bar, and a work area
for displaying toolbox, browser, document window, diagram window,
and specification window
• Browser: a window with navigation tool for viewing diagrams and
many other model elements
• Documentation Window: for preparing text information to describe
model elements or relationships
• Diagram Windows
• Overview Window: can be showed through put the mouse pointer
over hand icon
• Other windows such as Log, Edit, can be access through View on menu
bar
Title
Menu
Tool Bar
Bar
Browser Window
Documentation Toolbox Window
Diagram
Window
Specification
b) Creating a simple application
(Hello.java) Step 1: Run Rational Rose
Enterprise
Step 2: Create a Use Case Diagram
1. Click on Use Case View > Main
AI&DS 1
OOAD Using UML LAB R21
2. From the menu bar select Tool > Create > Use Case
3. Select the Actor from the Toolbox and place it into the Use Case
Diagram
4. Right click on the Actor to see the pop-up menu, and then select Open
Specification menu
5. Select the Use Case from the Toolbox and place it into the User Case
Diagram
6. Right click on the User case to change the name to Hello UML
Actor HelloUML
Step 3: Create Hello Class Diagram (classes, attributes, and operations)
1. Click on Use Logical View > Main
AI&DS 2
OOAD Using UML LAB R21
2. Create a new class called “Hello”
- Tools > Create > Class
- Select the Class icon (rectangle box symbol) from the Toolbox
- Place a class to the workspace of the Class Diagram
- Type in a desired class name: “Hello”
- Right click the new class diagram and select “Open Specification”
- View the class name in the name box: Hello - Select “class” in the
Type combo box
AI&DS 3
OOAD Using UML LAB R21
3. Add Attributes to the Hello class
- Right click the Hello class to select New Attributes from a dialog box
- Accept the default name, and hit enter
- Right click the Hello class again to select Open Specification - The
window called Class Specification for Hello is then displayed; change
the attribute name to message; select Type as: String; specify Initial
Value with a pair double quotes as: “Hello UML”; set Export Control
to: private
4. Add Operations to the Hello class
- Right click the Hello class to get an dialog box
- Select New Operations, and give a new method name as getName,
then hit Enter key to enter another method name as Hello
- Doubleclick the getName method to display Operation Specification
menu for getName dialog box
- Add return type as: String; add some information on this operation
method to Document text box
5. Change Operation Specification for Hello method
- Right click on the class diagram Hello to select Operation
Specification for showing Class Specification for Hello
- Select Implementation radio button in the Export Control
AI&DS 4
OOAD Using UML LAB R21
- Verify the Hello class diagram is the same as shown below.
message : String
getName()
Hello() Hello = "Hello UML"
Step 4. Create the Test Class Diagram
1. Select Class icon from the Toolbox
2. Place a class into the workspace Class Diagram, and give the class
name: Test
3. Right click on the Test class, and select New Operations
4. Add two methods: main and Test
Test
main()
Test()
Step 5. Object Instantiation
1. Select the dash line icon (Dependency or instaintiates)
2. Draw the line starting from the Test to Hello to make an object
instantiation
AI&DS 5
OOAD Using UML LAB R21
AI&DS 6
OOAD Using UML LAB R21
WEEK 2, 3&4:
Case Study: Customer Supporting System
a) Identify and analyze events
b) Identify Use cases
c) Develop event table
An event in the Unified Modelling Language (UML) is a notable
occurrence at a particular point in time. Events can, but do not
necessarily, cause state transitions from one state to another in
state machines represented by state machine diagrams.
Occurrences at a specific time and place
Trigger all system processing
Requirement for defining events:
Determine relevant events
External events first
Temporal events second
Decompose system into manageable units
Event Table for Customer Supporting System:
AI&DS 7
OOAD Using UML LAB R21
Fig: Event Table for Customer Supporting System
d) Identify & analyze domain classes
e) Represent use cases and a domain class diagram using Rational Rose
f) Develop CRUD matrix to represent relationships between cases and problem
domain classes
AI&DS 8
OOAD Using UML LAB R21
Case Study: Point Of Sales
a) Identify and analyze events
b) Identify Use cases
c) Develop event table
d) Identify & analyze domain classes
e) Represent use cases and a domain class diagram using Rational Rose
f) Develop CRUD matrix to represent relationships between cases and problem
domain classes
AI&DS 9
OOAD Using UML LAB R21
AI&DS
10
OOAD Using UML LAB R21
Case Study: Library Management System
a) Identify and analyze events
b) Identify Use cases
c) Develop event table
d) Identify & analyze domain classes
e) Represent use cases and a domain class diagram using Rational Rose
f) Develop CRUD matrix to represent relationships between cases and problem
domain classes
AI&DS
11
OOAD Using UML LAB R21
AI&DS
12
OOAD Using UML LAB R21
Week 5 & 6
Case Study: Customer Supporting System
a) Develop Use case diagrams
AI&DS
13
OOAD Using UML LAB R21
b) Develop elaborate Use case descriptions & scenarios
AI&DS
14
OOAD Using UML LAB R21
AI&DS
15
OOAD Using UML LAB R21
c) Develop prototypes (without functionality)
d) Develop system sequence diagrams
AI&DS
16
OOAD Using UML LAB R21
Case Study: Point Of Sales
a) Develop Use case diagrams
b) Develop elaborate Use case descriptions & scenarios
AI&DS
17
OOAD Using UML LAB R21
AI&DS
18
OOAD Using UML LAB R21
c) Develop prototypes (without functionality)
d) Develop system sequence diagrams
AI&DS
19
OOAD Using UML LAB R21
AI&DS
20
OOAD Using UML LAB R21
Case study: library management System
a) Develop Use case diagrams
AI&DS
21
OOAD Using UML LAB R21
AI&DS
22
OOAD Using UML LAB R21
b) Develop elaborate Use case descriptions & scenarios
c) Develop prototypes (without functionality)
AI&DS
23
OOAD Using UML LAB R21
AI&DS
24
OOAD Using UML LAB R21
d)Develop system sequence diagrams
Sequence diagram for issuing book:
Sequence diagram for returning book:
AI&DS
25
OOAD Using UML LAB R21
Week 7, 8, 9 &10:
Case Study: Customer Supporting System
a) Develop high-level sequence diagrams for each use case
b) Identify MVC classes / objects for each use case
c) Develop Detailed Sequence Diagrams / Communication diagrams for each
use case showing interactions among all the three-layer objects
AI&DS
26
OOAD Using UML LAB R21
d) Develop detailed design class model (use GRASP patterns for responsibility
assignment)
e) Develop three-layer package diagrams for each case study
AI&DS
27
OOAD Using UML LAB R21
Case Study: Point Of Sales
a) Develop high-level sequence diagrams for each use case
AI&DS
28
OOAD Using UML LAB R21
b) Identify MVC classes / objects for each use case
Point of Sale Terminal:
View Model Controller
ICashier Sale Saleslineitem
ICustomer Store Product Specification
IManager Payment Item
IProductCatalog Post
AI&DS
29
OOAD Using UML LAB R21
c) Develop Detailed Sequence Diagrams / Communication diagrams for each
use case showing interactions among all the three-layer objects
d) Develop detailed design class model (use GRASP patterns for responsibility
assignment)
e) Develop three-layer package diagrams
AI&DS
30
OOAD Using UML LAB R21
Case Study: Library Management System
a) Develop high-level sequence diagrams for each use case
b) Identify MVC classes / objects for each use case
View Model Controller
Librarian Member Record Book Journal
Transaction Magazines
Bill Text Books
AI&DS
31
OOAD Using UML LAB R21
C) Develop Detailed Sequence Diagrams / Communication diagrams for each
use case showing interactions among all the three-layer objects
d) Develop detailed design class model (use GRASP patterns for responsibility
assignment)
AI&DS
32
OOAD Using UML LAB R21
Develop three-layer package diagrams
AI&DS
33
OOAD Using UML LAB R21
AI&DS
34
OOAD Using UML LAB R21
Week 11 & 12:
Case Study: Customer Supporting System
a) Develop Use case Packages
Case Study: Point Of Sales
a) Develop Use case Packages
AI&DS
35
OOAD Using UML LAB R21
b) Develop component diagrams
Case Study: Library Management System
a) Develop Use case Packages
b) Develop component diagrams
AI&DS
36
OOAD Using UML LAB R21
Week 13
Case Study: Customer Supporting System
a) Develop sample diagrams for other UML diagrams - state chart diagrams,
activity diagrams and deployment diagrams
State chart diagrams
AI&DS
37
OOAD Using UML LAB R21
Activity diagrams
Deployment diagrams
AI&DS
38
OOAD Using UML LAB R21
Case Study: Point Of Sales
a) Develop sample diagrams for other UML diagrams - state chart diagrams,
activity diagrams and deployment diagrams
State chart diagrams
AI&DS
39
OOAD Using UML LAB R21
Activity diagrams
Customer Cashier Barcode reader pos system
enters the
shop
select prepare item scan items bill
product list generation
pay the bill process bill
Deployment diagrams
AI&DS
40
OOAD Using UML LAB R21
Case Study: Library Management System
a) Develop sample diagrams for other UML diagrams - state chart diagrams,
activity diagrams and deployment diagrams
State chart diagrams
AI&DS
41
OOAD Using UML LAB R21
Activity diagrams
Deployment diagrams
AI&DS
42