100 likes | 394 Views
Asper School of Business University of Manitoba. Systems Analysis & Design. Instructor: Bob Travica. Class diagram II. Updated: October 2013. Outline. More on associations & multiplicity Association class Fully developed classes Completing procedure for creation of class diagrams.
E N D
Asper School of Business University of Manitoba Systems Analysis & Design Instructor: Bob Travica Class diagram II Updated: October 2013
Outline • More on associations & multiplicity • Association class • Fully developed classes • Completing procedure for creation of class diagrams 3510 Systems Analysis & Design * Bob Travica
Associations • Association types determined by maximum multiplicity (if 2 symbols for multiplicity provided, read that on the right) • One-to-one (1:1) - occasional; e.g., Customer—CustomerBillingAddress • One-to-many (1:M) - most frequent; e.g., Customer—Order (or SaleTransaction) • Many-to-many (M:M) - moderately frequent; examples: • Order—Product (or Item), Employee—Project 3510 Systems Analysis & Design * Bob Travica
Multiplicity (more) • Multiplicity question: Each (one) object on the left sideof a relationship can be associated with how many objects on the right side? Then, write the number on right side. - Rule: Usually, the same movie plays in several theatres. Each (one) object on the right side can be associated with how many objects on the left side? • Then, right the number on left side. • - Rule: Most theaters play several movies in a day. * (1, assumed) Movie Theatre * (1, assumed) Theatre Movie 3510 Systems Analysis & Design * Bob Travica
Association class • Two ways to think about it: 1) A class that stores some extra attributes that characterize associations between classes term 2) A class that intermediates in many-to-many relationship and manages variation on both sides of association 3510 Systems Analysis & Design * Bob Travica
RMO CRM system class diagram (simplified) • Customary simplification, showing: • Just maximum multiplicity • Just attributes of Association • Classes Figure 8-9 modified Catalog CatalogID CatalogItem productPrice * * has delivered by * * Item InventoryItem Shipment ItemID ShipmentNum ItemItemNumber 1 has * ItemShipment quantity * delivered by * 1 appears on ShipperID ItemID ReturnItem ItemOrder Shipper quantity discount ReturnItemOrder dateReturned reason ordered on * * * OrderNum CustomerID Customer Order places 1 * • Association class consists of transaction data. • Read multiplicity. Note: Neglect association classes! 3510 Systems Analysis & Design * Bob Travica
Fully developed classes (design level) Figure 8-7 Attributes • = private + = public () = attribute affected or input data : string, number = data type Methods 3510 Systems Analysis & Design * Bob Travica
How to get informed for creating class diagram • Sources: • Description (narrative) • Use case diagrams & descriptions • Analysis of master data and transacti-onal data 3510 Systems Analysis & Design * Bob Travica
Completing a class diagram • Standard procedure: 1. List classes 2. List attributes 3. Draw simplified class rectangles (name and attribute segments only) 4. Insert attributes in class rectangles 5. Determine keys 6. Draw associations and name them 7. (New) Draw Association Class for each relationship that has attribute(s) on its own, or that you think is M:M. Note: For now it is important to recognize M:M relationship, not entire multiplicity. 3510 Systems Analysis & Design * Bob Travica