Object-oriented programming language five basic characteristics
1. Everything is an Object. Think of an Object As a Fancy Variable
2. a program is a bunch of objects telling each other what to do by sending message.
3. Each Object Has ITS OWN MEMORY MADE UP OF Other Objects.
4. Every Object Has A Type.
5. All Objects of a Particular Type Can Receive The Same Messages.
An Object Has An Interface
"Type" and "Interface" equivalence or correspondence is the basis for object-oriented programming
The Hidden Implementation (Public, Private, Protected, Friendly)
There are two reasons to control our access to members.
The first reason is to prevent programmers from touching things they should not touch - is usually the design idea of internal data types.
The second reason is to allow library designers to modify internal structures. Don't worry about what impact on customer programmers (so this is required to design better)
Inheritance and composition
(The original intention is abstract, not code reuse)
When should I use inheritance? Use only in an abstract class, other cases, if we use oo's polymorphism, use inheritance
Abstract Interface
Where is the object? How to create?
Dynamically create objects in a memory pool, which is also called "heap" or "memory stack"
How does the object destroy?
Garbage collector
Collection object collection
Iterator provides a certain abstract level that separates the container in accordance with the program, and the program for accessing the container.
Analysis and design
1 What is established (WHO What How and Possible Problems) USE Case Diagrams is simple (schedule)
2 How to establish (UML)
3 to create a core (establish a framework)
4 a module completion
5 maintenance
XP (Extreme Programming)
1 test
2 partner design