1.OO(Object-Oriented) Basics
Abstraction
Encapsulation
Polymorphism
Inheritance
2. Design Principle 1
Identify the aspects for your application that vary and separate them from what stays the same.
Here's another way to think about this principle:
take the parts that vary and encapsulate thme,so that later you can alter or extend the parts that vary without affecting those that don't
3. Design Pinciple 2
Program to an interface,not an implementation
"Program to an interface" really means "Program to a supertype"
The point is to exploit polymorphism by programming to a supertype so that the actual runtime object isn't locked into the code,And we could rephrase "program to a supertype" as "the declared type of the variables should be a supertype,usually an abstract class or interface",so that the objects assigned to those variables can be of any concrete implementation of the supertype,which means the class declaring them doesn't have to know about the actual object types!"
4. Design Principle 3
Favor composition over inheritance
Creating system using composition gives you a lot more flexibility.Not only does it let you encapsulate a family of algorithms into their own set of classes,but it also lets you change behavior at runtime as long as the object you are composing with implements the correct behavior interface.
5.The Strategy Pattern
Defines a family of algorithms,encapsulates each one,and makes them interchangeable,Strategy lets the algorithm vary independently from clients that use it.