Object & Class Diagram
Object & Class Diagram
Objects:
a concept, abstraction, or thing with identity that has meaning for
an application.
• used for
– general conceptual modeling of the systematics of the
application
– detailed modeling translating the models into programming
code.
Objects
Class Name
Attributes
Operations
Class and Object
– A class is an abstraction;
– an object is one concrete manifestation of that abstraction.
• The two inherited classes have all the properties as the Order
class. In addition they have additional functions like dispatch
() and receive ().
Class Diagram for Order System
Relationships among Classes
• Links
– the basic relationship among objects
– a tuple i.e. the list of objects
– an instance of an association
• Association
– represents a family of links with common structure and
semantics.
– Links of an association connect objects from same classes.
– Describes a set of potential links
– Binary associations (with two ends) are normally
represented as a line.
Notation
• Link
– line between objects
– If the link has name, it is underlined
• Association
– Line between related classes
– Association name is optional, if unambiguous
• Ambiguity arise when a model has multiple associations
among the same classes
– Bidirectional
• Can be traversed in either direction and equally
meaningful
Class Diagram
Class Diagram: Generalization
Class Diagram: Association Names
Multiplicity