An object is a person, place, thing, concept, or possibly event.
An attribute is a characteristic of an object.
A behavior is an action that an object is capable of performing.
Focusing on objects makes it easy for us to understand complex things. Objects enable us to look at details that are of interest to us and ignore other details that we are not interested in.
Inheritance is a way for one object to receive attributes and behaviors of another object in what programmers call an is a relationship.
Attributes and behaviors need to be defined in one object, such as Person. Other objects that require those attributes and behaviors ”such as Student, Teacher, Department Chair, Dean, Secretary, and Bursar ”can inherit the object. This allows for attributes and behaviors to be defined in only one object, making it easy to add new attributes and behaviors or remove existing attributes and behaviors.
The attributes of the order form in Figure 1-1 are as follows :
Customer Name
Customer Address
Customer Number
P.O. Number
Date Shipped
Shipped Via
Required Date
Terms
Quantity
Item ID
Item Name
Unit Price
Amount
Subtotal
Sales Tax
Shipping & Handling
Total Due
The behaviors of the order form in Figure 1-1 are as follows:
Enter order information
Modify order information
Delete order
Process order
Look up order
These are common objects that inherit a Person object:
Student
Instructor
Dean
President
Board of Trustees
Security Manager
Security Guard
Bookstore Manager
Sales Assistant
Department Chair
Bursar
Registrar
Maintenance Manager
Maintenance Worker
Secretary
See Figure B-1.
Figure B-1: The relationship between the Person object and objects that are persons