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

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.

主站蜘蛛池模板: 青州市| 高平市| 兴隆县| 皋兰县| 武山县| 乡城县| 沅江市| 南召县| 荃湾区| 乐清市| 西昌市| 华阴市| 康平县| 澄迈县| 宁陵县| 达拉特旗| 平湖市| 涪陵区| 萨嘎县| 富民县| 常州市| 吉水县| 冷水江市| 康定县| 犍为县| 江门市| 沁阳市| 惠东县| 忻城县| 南郑县| 鄂州市| 郑州市| 望城县| 余江县| 光泽县| 宜兰县| 黔江区| 哈尔滨市| 广灵县| 武定县| 彰武县|