I can't see the book, and the sure is put on the study notes since this time. All of this is theoretical, the specific practice is not very mighty, oh, theory is a bit boring, but you still have to learn. Just like mathematics.
TDD and mode note, TDD's book is finished, but there is no deep look, wait until the summer vacation is said. The mode is still looking at it. This book is too thick. One chapter looks down and tired to die. No way, insist, it is victory.
One requirement of the numerical object is that once its instance variable value is specified in the constructor, then it is not allowed to change, so all the operations of the numerical object must return a new object, and equals () and havehcode must be implemented. () Method.
When it is necessary to explicitly determine which type of type can be used to work next to work, use polymorphism instead of the conditional judgment statement. This is also a refactoring principle.
Open and closing principle open-closed PrinciPle OCP
Software Entities SHOULD BE Open for Extension, Butclosed for Modification.
Software entities should be open to the extension and turn it off for modification.
This should be such that if the function of the software is expanded, then the existing code should not be changed, but to achieve some new content.
Rivien replacement principle
Where any base class can appear, the subclass can appear.
Subclass is from the base class, "Qing is out of blue and blue." This, can I explain this? ? ? I feel like I have a problem.
Relying on the reversal principle (I thought it was flipped by the beginning.)
To rely on abstraction, don't rely on implementation.
Abstractions Should Not Deprond UpAils. Details Should Depend Upon Abstractions. Program to an interface, Not an Implement.
This is the "programming of interface".
Synthesis / polymerization
Try to use synthetic / aggregation, not inheritance relationships to reach multiplexed.
Inheritance is a binding, in Java, only allowing single inheritance, can not inherit it without inheritance to achieve other purposes.
Dimit Block
A software entity should interact with other entities as possible.
Interface isolation principle
Provide the client to provide as little separate interface, not to provide large interface
Is Dimit France and the principle of interface isolation? ?
interface
Java interface: A structure in a Java language that has specific syntax and structure.
Ordinary interface: A collection of features of a class, a logically abstraction.
One method is characterized by only the name, number of parameters of the method, and does not include the return type, the name of the parameter, and an exception thrown.
? A program written today, subclasses inherited a parent class, an abstract method did not point out an abnormality in the parent class, and I wrote THROWS in the subclass, and the result was not compiled. ? ?
In a hierarchical structure formed in a inheritance relationship, the leaves nodes should be specific class, and the branches should be an abstract class / java interface. That is to say, don't inherit a concrete class.
Abstract classes should have as much code as possible while having as little data as possible.
Programming for interfaces, for abstract programming.