Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 8 Appendix Object-Oriented Analysis and Design: Object Modeling – Class Diagrams Modern Systems Analysis and Design Seventh Edition Jeffrey A.

Similar presentations


Presentation on theme: "Chapter 8 Appendix Object-Oriented Analysis and Design: Object Modeling – Class Diagrams Modern Systems Analysis and Design Seventh Edition Jeffrey A."— Presentation transcript:

1 Chapter 8 Appendix Object-Oriented Analysis and Design: Object Modeling – Class Diagrams Modern Systems Analysis and Design Seventh Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich

2 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 2 Chapter 8 Appendix Learning Objectives Concisely define each of the following key data modeling terms: object, state, behavior, object class, class diagram, operation, encapsulation, association role, abstract class, polymorphism, aggregation, and composition. Draw a class diagram to represent common business situations. Explain the unique capabilities of class diagrams compared with E-R diagrams for modeling data.

3 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 3 Chapter 8 Appendix Representing Objects and Classes Object: an entity with a well-defined role in an application domain; has state, behavior, and identity characteristics State: encompasses an object’s properties (attributes and relationships) and the values of those properties

4 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 4 Chapter 8 Appendix Representing Objects and Classes (Cont.) Behavior: represents how an object acts and reacts Identity: uniqueness—no two objects are the same Object class (class): a logical grouping of objects that have the same (or similar) attributes, relationships, and behaviors (methods)

5 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 5 Chapter 8 Appendix Representing Objects and Classes (Cont.) Class diagram: a diagram that shows the static structure of object classes, their internal structure, and the relationships in which they participate UML classes are analogous to E-R entities.

6 © 2014 Pearson Education, Inc. Publishing as Prentice Hall Representing Objects and Classes (Cont.) 6 Chapter 8 Appendix Figure 8-26 UML class diagram showing two classes

7 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 7 Chapter 8 Appendix Representing Objects and Classes (Cont.) Operation: a function or a service that is provided by all the instances of a class to invoke behavior in an object by passing a message Encapsulation: the technique of hiding the internal implementation details of an object from its external view

8 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 8 Chapter 8 Appendix Types of Operations Constructor: an operation that creates a new instance of a class Query: an operation that accesses the state of an object but does not alter the state Update Operation: an operation that alters the state of an object Class Scope Operation: an operation that applies to a class rather than an object instance

9 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Chapter 8 Appendix Representing Associations Association: a relationship among instances of object classes Association role: the name given to the end of an association where it connects to a class

10 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 10 Chapter 8 Appendix Representing Associations (Cont.) Multiplicity: indicates how many objects participate in a given relationship:  means minimum of 0 and maximum of 10  1, 2 means can be either 1 or 2  * means any number UML associations are analogous to E-R relationships and UML multiplicities are analogous to E-R cardinalities.

11 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 11 Chapter 8 Appendix Representing Associations (Cont.) Figure 8-27 Examples of association relationships of different degrees

12 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 12 Chapter 8 Appendix Representing Associations (Cont.) Figure 8-28 Examples of binary associations

13 © 2014 Pearson Education, Inc. Publishing as Prentice Hall Representing Associative Classes Associative class: an association that has attributes or operations of its own or that participates in relationships with other classes UML association classes are analogous to E-R associative entities. Generalization and inheritance are implemented via superclass/subclasses in UML and via supertypes/subtypes in E-R. 13 Chapter 8 Appendix

14 © 2014 Pearson Education, Inc. Publishing as Prentice Hall Representing Associative Classes (Cont.) 14 Chapter 8 Appendix Figure 8-29 Class diagram showing associative classes

15 © 2014 Pearson Education, Inc. Publishing as Prentice Hall Representing Stereotypes for Attributes 15 Chapter 8 Appendix Figure 8-31 Stereotypes

16 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 16 Chapter 8 Appendix Representing Generalization Abstract class: a class that has no direct instances but whose descendants may have direct instances Concrete class: a class that can have direct instances

17 © 2014 Pearson Education, Inc. Publishing as Prentice Hall Representing Generalization (Cont.) 17 Chapter 8 Appendix Figure 8-32 Example of generalizations, inheritance, and constraints

18 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 18 Chapter 8 Appendix Representing Generalization (Cont.) UML keywords:  Overlapping: a descendant may be descended from more than one of the subclasses  Disjoint: a descendant may not be descended from more than one of the subclasses  Complete: all subclasses have been specified  Incomplete: some subclasses have been specified, but the list is known to be incomplete

19 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 19 Chapter 8 Appendix Representing Generalization (Cont.) Class-scope attribute: an attribute of a class that specifies a value common to an entity class, rather than a specific value for an instance

20 © 2014 Pearson Education, Inc. Publishing as Prentice Hall Representing Generalization (Cont.) 20 Chapter 8 Appendix Figure 8-33 Polymorphism, abstract operation, class- scope attribute, and ordering

21 © 2014 Pearson Education, Inc. Publishing as Prentice Hall 21 Chapter 8 Appendix Representing Generalization (Cont.) Abstract operation: defines the form or protocol of the operation, but not its implementation Method: the implementation of an operation Polymorphism: the same operation may apply to two or more classes in different ways

22 © 2014 Pearson Education, Inc. Publishing as Prentice Hall Representing Aggregation Aggregation: a part-of relationship between a component object and an aggregate object  Represented with open diamonds Composition: a part object that belongs to only one whole object and that lives and dies with the whole  Represented with filled diamonds 22 Chapter 8 Appendix

23 © 2014 Pearson Education, Inc. Publishing as Prentice Hall Aggregation and Composition 23 Chapter 8 Appendix Figure 8-34 Aggregation and composition

24 © 2014 Pearson Education, Inc. Publishing as Prentice Hall An Example of Conceptual Data Modeling at Hoosier Burger 24 Chapter 8 Appendix Figure 8-35 Level-0 data flow diagram for Hoosier Burger’s new logical inventory control system

25 © 2014 Pearson Education, Inc. Publishing as Prentice Hall An Example of Conceptual Data Modeling at Hoosier Burger (Cont.) 25 Chapter 8 Appendix Figure 8-36 Reduced decision table for Hoosier Burger’s inventory reordering

26 © 2014 Pearson Education, Inc. Publishing as Prentice Hall An Example of Conceptual Data Modeling at Hoosier Burger (Cont.) 26 Chapter 8 Appendix Figure 8-38 Final class diagram for Hoosier Burger’s inventory control system

27 © 2014 Pearson Education, Inc. Publishing as Prentice Hall Summary In this appendix you learned how to: Concisely define each of the following key data modeling terms: object, state, behavior, object class, class diagram, operation, encapsulation, association role, abstract class, polymorphism, aggregation, and composition. Draw a class diagram to represent common business situations. Explain the unique capabilities of class diagrams compared with E-R diagrams for modeling data. 27 Chapter 8 Appendix

28 Copyright © 2014 Pearson Education, Inc. Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall


Download ppt "Chapter 8 Appendix Object-Oriented Analysis and Design: Object Modeling – Class Diagrams Modern Systems Analysis and Design Seventh Edition Jeffrey A."

Similar presentations


Ads by Google