class11

9
Class diagram II Asper School of Business University of Manitoba Systems Analysis & Design Instructor: Bob Travica Updated: October 2009

Upload: wmomoni

Post on 25-Jul-2015

178 views

Category:

Education


3 download

TRANSCRIPT

Class diagram II

Asper School of Business University of Manitoba

Systems Analysis & Design

Instructor: Bob Travica

Updated: October 2009

3510 Systems Analysis & Design * Bob Travica 2 of 9

Outline

More on associations

Association class

Fully developed classes

Completing procedure for creation of class diagrams

3510 Systems Analysis & Design * Bob Travica 3 of 9

Associations One-to-many (most frequent;

example: Customer—Order) One-to-one (occasionally; example:

Customer—CustomerBillingAddress)

Many-to-many (moderately frequent; examples: Student—Course Section Order—Item (Product) Employee—Project

3510 Systems Analysis & Design * Bob Travica 4 of 9

Association class Two ways to think about it:

1) A class that stores some extra attributes that characterize associations between classes

2) A class that intermediates in many-to-many relationship (resolves variation that exists on both sides of association)

term

3510 Systems Analysis & Design * Bob Travica 5 of 9

RMO class diagram (simplified)

Customary simplification:- Show just maximum multi- plicity- Just attributes of Association Classes shown

Customary simplification:- Show just maximum multi- plicity- Just attributes of Association Classes shown

Figure 8-9modified

Catalog

ReturnItem

Product

Order

ProductOrder

Customer

CatalogProductproductPrice

InventoryItem

Shipper

*

*

1 has *

1

*

1 *

delivered by

*

1

* 1

*

has

can be

places

delivered by

appears on

*

*ReturnItemOrde

r

dateReturned reason quantity

Shipment

ordered on

*

ProductShipment

quantity

quantity

• Association Entity consists of transaction data.

3510 Systems Analysis & Design * Bob Travica 6 of 9

Fully developed classes (design level)

Methods

Attributes

- = private+ = public() = attribute affected or input data: string, number = data type

Figure 8-7

3510 Systems Analysis & Design * Bob Travica 7 of 9

How to get information for class diagram

The source of information can be: Description (narrative) Use case diagrams & descriptions Use case table Analyzing master data and

transactional data

3510 Systems Analysis & Design * Bob Travica 8 of 9

Completing a class diagram Standard procedure:1. List classes2. List attributes3. Draw simplified class rectangles (name and

attribute spaces only)4. Insert attributes in class rectangles 5. Determine keys 6. Draw associations and name them7. (New) Draw Association Class for each

relationship that has attribute(s) on its own, or that you think is M:M.

Exercises

Determine if Association Class is needed between the classes:1. Product – Supplier2. Product – SalesPerson3. Advertisement – TVShow4. Advertisement – MarketingAgency5. BankAccount – TransactionLedger6. GeneralLedger – AccountPayable 7. Book – LibraryLoan

3510 Systems Analysis & Design * Bob Travica 9 of 9