1. Abstract process
11,000 things are objects: Any conceptual component (dog, building, service, etc.) in a program can be represented as an object
1.2 Programs are collections of objects that call each other by sending information to each other
1.3 Each object has storage made up of other objects
1.4 Each object has its type
1.5 All objects of a particular type can receive (receive) the same message
3 main features of the object: state, behavior (behaviour), identity.
2. Objects
2.1 Each object has an interface
2.2 Each object is serving (improves the cohesion of the object)
What kind of services can the object provide to me to solve the problem? High cohesion is one of the basic quality requirements of software design: This means that a software artifact (such as an object)
All aspects of the "combination" is very good. One of the problems in designing objects is to fill in the object with too much functionality, and you can decompose an object into multiple objects and
The implementation of the energy can be assigned to different objects. The functionality of other objects is then eventually called by an object. So each object has a high cohesion collection of services it can provide.
2.3 Multiplexing specific implementations (code reuse)
Code reuse is one of the greatest advantages that OOP offers. The simplest way to reuse a class is to use an object of that class directly
We call it "create a member object" and use an existing class to synthesize a new class called "Combination" (composition) if the combined dynamic
It is commonly referred to as "aggregation" (aggregation). A combination is often seen as a "has-a" relationship, just as a car has an engine.
Sometimes "combination" is better than "inherit".
2.4 Inheritance
There are two ways to make a difference between a base class and an exported class: 1. Add a new method. 2. Method overloading overrides a method of the parent class
Think in Java-notes