1. Principle of single responsibility : One kind only does what it should do .

2. Richter's principle of substitution : Subclasses must be able to replace base classes ( Parent class ), Otherwise, it should not be designed as a subclass of .

3. Rely on the principle of switching : Design depends on abstraction rather than concretization .

4. Interface isolation principle : The interface should be small and specialized , It can't be big and complete .

5. Opening and closing principle : A software entity such as class 、 Modules and functions should be open to extension , Turn off for changes .

6. Combine / Principle of aggregation and reuse : Try to use combination and aggregation , Use less inheritance to achieve reuse .

7. Dimitar's law : Low coupling , High cohesion .

java More articles on six principles and one rule of object oriented

  1. Design pattern summary & Six principles and one principle

    Reference article http://blog.csdn.net/sinat_26342009/article/details/46419873 Inherit vs Combine :http://www.cnblogs.com/feic ...

  2. Java Basic learning summary (84)——Java Six principles and design patterns of object-oriented

    Six principles of object orientation Before that , One thing we need to know , Being familiar with these principles doesn't mean that the program you write is flexible . Clear , It's just a hurdle for your excellent code , Guided by these principles , You can avoid getting bogged down in some common code quagmire , So you can write ...

  3. Java Six principles of design pattern and 23 Design patterns commonly used in design

    One . Classification of design patterns Generally speaking, design patterns are divided into three categories : Create pattern , Five kinds in total : Factory method model . Abstract factory pattern . The singleton pattern . Builder pattern . Archetypal model . Structural mode , There are seven kinds of : Adapter pattern . Decorator mode . The proxy pattern . Appearance mode . The bridge ...

  4. Java Six principles of object orientation

    Quoted from Baidu know : —— Quickly memorize by initials SOLID( solid , Strong ), Please refer to here for details 1) Open-Close Principle(OCP), open - Closed principle , It's about design to have good support for extension , We should be strict with the revision ...

  5. java Object oriented design principles

    principle 1:DRY(Don't repeat yourself) That is, don't write duplicate code , It's about using "abstraction" Class to abstract public things . If you need to use a hard coded value many times , Then it can be set as public ...

  6. JAVA object-oriented -----java Six principles of object-oriented

    Now the mainstream programming languages are basically object-oriented . Such as C#,C++,JAVA. When we use , Classes have been constructed one by one . But often because we have a kind of design inside or outside the class Seed problem , It's an object-oriented language , It's process oriented logic ...

  7. Java What programmers should know 10 Object oriented design principles

    Object oriented design principles : yes OOPS(Object-Oriented Programming System, Object oriented programming system ) The core of programming , But most Java Programmers are chasing things like Singleton.Decorat ...

  8. ( turn )Java What programmers should know 10 Object oriented design principles

    The principle of object-oriented design is OOPS(Object-Oriented Programming System, Object oriented programming system ) The core of programming , But most Java Programmers are chasing things like Singleton.Decorator ...

  9. Java What programmers should know 10 Object oriented design principles

    The principle of object-oriented design is OOPS The core of programming , But most of the things I've seen Java Programmers are enthusiastic about things like Singleton ( Single case ) . Decorator( Decorator ).Observer( The observer ) And so on , And not enough bets ...

Random recommendation

  1. React Summary of learning resources ( The most comprehensive React Learning materials )

    http://www.360doc.com/content/16/1108/10/17722897_604827790.shtml

  2. 【leetcode】Remove Linked List Elements(easy)

    Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --& ...

  3. Java Collection classes : Set、List、Map、Queue Use scenarios to sort out

    This article focuses on Java Various collection classes involved in programming , And their usage scenarios Related learning materials http://files.cnblogs.com/LittleHann/java%E9%9B%86%E5%90%88%E ...

  4. VS2008 In the development of intelligent device program some summary

    Link to the original text :http://blog.csdn.net/citybug_nj/article/details/2598705 There are four parts in the program : The system configuration This part is used to configure the relevant parameters in the system , Parameters include data ...

  5. zoj 2387

    forehead   A greedy   It's hard to think of ...... #include <cstring> #include <cstdio> #include <algorithm> #in ...

  6. Document generation tool doxygen+ Image generation tool GraphViz

    Document generation tool doxygen+ Image generation tool GraphViz although jdk Self contained javadoc Also useful , But the use of doxygen+GraphViz The combination of can generate many powerful graphs ( Class diagram . Collaboration map . File contains / Included graph ...

  7. ●BZOJ 4361 isn

    Question chain : http://www.lydsy.com/JudgeOnline/problem.php?id=4361 Answer key : A class ,DP, Tree array Pay attention to the meaning of the question : Once it becomes a non descending sequence , Stop the operation . That is to say, to the non descending order ...

  8. bcrypt The installation was not successful. Solution

    The same project , Company and family node.js Different versions of , Causes the project to install dependent packages  bcrypt Installation did not succeed . The home version is :8.11.3 The company version is :10.14.2 After executing the following two commands in the current project , Report errors ...

  9. SpringCloud Study ( Two ): Micro service entry practical project construction

    One . Start using Spring Cloud Practical microservice 1.SpringCloud What is it? ? Cloud computing solutions ? No SpringCloud It's a SpringBoot It's a tool to build distributed system quickly ...

  10. Store the beginning and end with begin tran,rollback tran effect ?

    BEGIN TRAN You see it as a reduction point , Generally used in INSERT.UPDATE.DELETE Etc. can change the setting before data operation , If it is found that the result of execution is not the same as expected after operation , Just ROLLBACK, And vice versa COMMIT Submit