You are on page 1of 13

Classes and Objects

Group 8

By

Zulfikar Akbar (116101088)

Bagus Dwi Sandi Putra (116101102)


Muhamad Mulya Fuadi Agisna (116102113)

Indaryani Kumala Wardani (116104118)

The Nature of an Object

An object is an entity that has state, behavior, and identity. The structure and behavior of similar objects are defined in their common class. The terms instance and object are interchangeable. A mechanism is a structure whereby a set of objects work together to provide a behavior that satisfies some requirement of the problem.

The Nature of an Object

The state of an object encompasses all of the (usually static) properties of the object plus the current (usually dynamic) values of each of these properties. Behavior is how an object acts and reacts in terms of its state changes and message passing.

Identity is the property of an object that distinguishes it from all other objects.

The Nature of an Object

Relationships among Objects

There are two kinds of object relationships in OOAD:


1. 2.

Links Physical or conceptual connection between objects. (Rumbaugh) Aggregation Links seem to be client/supplier relationships, Aggregation seem to be a whole/part hierarchy, with the ability to navigate from the whole (also called the aggregate) to its parts.

Links (example)
Aang

Appa

Aggregation (example)
Shareholder

Shares

The Nature of a Class

A class is a set of objects that share a common structure, common behavior, and common semantics. Object is concrete entity that exists in time and space. Class represents only abstraction, the essence of an object.

The Nature of a Class

Relationships among Classes

Association

Inheritance
Aggregation

Dependencies

The Interplay of Classes and Objects

Every object is the instance of some class, and every class has zero or more instances.

On Building Quality Classes and Objects

Key abstractions are the classes and objects that form the vocabulary of the problem domain. While measuring the quality of an abstraction to determine a well designed class or object, we should consider these five meaningful metrics:
1.
2. 3. 4. 5.

Coupling
Cohesion Sufficiency Completeness Primitiveness

You might also like