How to explain an object?

后端 未结 27 1690
广开言路
广开言路 2020-12-23 23:16

It\'s been years since I thought of this, but I am training some real juniors soon and need to explain what an object is to someone who doesn\'t know what it is.

B

27条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-23 23:37

    I would go from Access Levels and Encapsulation and move out from there. Encapsulation is a reasonably simple concept to grasp and has some clear benefits. From there you can talk about abstraction, inheritance and polymorphism quite easily.

    As an undergraduate I found Encapsulation to be an good anchoring concept in a quite abstract area.

提交回复
热议问题