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

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.

主站蜘蛛池模板: 吉水县| 盐津县| 邹平县| 陇川县| 庄河市| 房山区| 海林市| 陇西县| 高阳县| 临洮县| 龙岩市| 林西县| 耿马| 潢川县| 搜索| 井研县| 进贤县| 昭平县| 焉耆| 南岸区| 漳浦县| 岑巩县| 浑源县| 内丘县| 阆中市| 玉树县| 珠海市| 龙江县| 格尔木市| 铅山县| 宜宾市| 抚顺市| 浏阳市| 佳木斯市| 台山市| 广河县| 刚察县| 新源县| 舒兰市| 陈巴尔虎旗| 锡林郭勒盟|