官术网_书友最值得收藏!

Introduction

During your career as a creator of software, you will hear the term OOP many times. This design philosophy allows for objects to exist independently and can be reused by different sections of code. This is all made possible by what we refer to as the four pillars of OOP: inheritance, encapsulation, abstraction, and polymorphism.

In order to grasp this, you need to start thinking of objects (which are basically instantiated classes) that perform a specific task. Classes need to adhere to the SOLID design principle. This principle is explained here:

  • Single responsibility principle (SRP)
  • Open/closed principle
  • Liskov substitution principle (LSP)
  • Interface segregation principle
  • Dependency inversion principle

Let's start off with an explanation of the four pillars of OOP, after which we will take a look at the SOLID principle in more detail.

主站蜘蛛池模板: 永兴县| 平利县| 科技| 鲜城| 郯城县| 灯塔市| 浦北县| 久治县| 苍南县| 龙州县| 河西区| 甘谷县| 东乌| 和顺县| 安平县| 临湘市| 龙川县| 永昌县| 新绛县| 温宿县| 贡觉县| 荔波县| 惠水县| 隆回县| 五原县| 通海县| 当阳市| 乳山市| 房产| 乐都县| 秭归县| 轮台县| 泸水县| 普陀区| 兴海县| 抚顺县| 炉霍县| 广元市| 紫云| 河南省| 通海县|