Professional Documents
Culture Documents
Object
Class
Abstraction
Inheritance
Polymorphism
Encapsulation
Modularity
Object
An object is a well-defined entity with a distinct identity and boundaries that incorporates state and
activity.
-Attributes and relationships represent state. A state is a circumstance that an object finds itself in at
any given time that performs an action, waits for an occurrence, or satisfies a condition.
-Operations, techniques, and state machines are used to express behavior. An object's behavior
determines how it behaves and responds.
A rectangle with the name of the object underlined is used to represent it.
Class
A class is a description of a group of objects that have similar semantics, relationships, operations,
and attributes. Three compartments in a rectangle are used to represent a class.
Abstraction
the fundamental traits that set an entity apart from all other types of entities. used to hide some
information and display just key aspects of the objects. defines a boundary in relation to the
observer's viewpoint.
Encapsulation
a means of combining the code acting on the data (methods) and the data (variables) as a single
unit.
Polymorphism
Inheritance
a process by which one object takes on all the traits and characteristics of a parent object. There are
3 types of inheritance:
– single inheritance
– multiple inheritance
– multi-level inheritance
Modularity
divides a difficult object into manageable pieces. facilitates understanding of complex systems.
this.length=length;
this.width=width;
}
@Override int area() { return length * width;};
System.out.println(f1.toString());