You are on page 1of 20

1

Information Systems Analysis


and Design

Lecture 7 – Part 2:
Analyzing System Data Requirements

Object-Oriented Analysis and Design:


Object Modeling – Class Diagrams

Information Systems Department


Learning Objectives
2

 Concisely define the main concepts related to Object-


Oriented modeling
 Explain the types of operations possible in class
diagrams
 illustrate how associations are represented in class
diagrams,
 Show how associative classes are drawn in class
diagrams
 Show how generalization and aggregation are
represented in class diagrams
Chapter 8 Appendix © 2011 Pearson Education, Inc.
Representing Objects and Classes
3

 Object: an entity with a well-defined role in an


application domain, and has state, behavior,
and identity characteristics
 State: encompasses an object’s properties
(attributes and relationships) and the values of
those properties
 Behavior: represents how an object acts and
reacts

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Objects and Classes (Cont.)
4

 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)
 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.

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Objects and Classes (Cont.)
5

Figure 8-26 UML class diagram showing two classes

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Objects and Classes (Cont.)
6

 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

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Associations
7

 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

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Associations
8

 Multiplicity: indicates how many objects participate in


a given relationship:
 0..10 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.

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Associations (Cont.)
9

Figure 8-27
Examples of
association
relationships of
different degrees

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Associations (Cont.)
10
Figure 8-28 Examples of binary associations

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Associative Classes
11

 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 implemented via
superclass/subclasses in UML, supertypes/subtypes
in E-R.

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Associative Classes (Cont.)
12

Figure 8-29 Class diagram showing associative classes

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Generalization
13
(Cont.)
Figure 8-32 Example of generalizations, inheritance, and constraints

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Generalization
14
(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

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Generalization
15
(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

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Generalization
16
(Cont.)
Figure 8-33 Polymorphism, abstract operation, class-scope attribute, and ordering

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Representing Aggregation
17

 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

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Aggregation and Composition (Cont.)
18

Figure 8-34 Aggregation and composition

Chapter 8 Appendix © 2011 Pearson Education, Inc.


19
Summary
 In this chapter you learned how to:

 Concisely define the main concepts related to Object-


Oriented modeling
 Explain the types of operations possible in class diagrams
 illustrate how associations are represented in class
diagrams,
 Show how associative classes are drawn in class diagrams
 Show how generalization and aggregation are represented
in class diagrams

Chapter 8 Appendix © 2011 Pearson Education, Inc.


Reference
20
20

Modern Systems Analysis and Design, Eighth Edition, Global


Edition, Joseph S. Valacich & Joey F. George –
Chapter 8, Appendix A.

You might also like