How to explain an object?

后端 未结 27 1596
广开言路
广开言路 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:48

    From my own experience, I think the idea of an object or class merely being an instance of a thing or a description of a thing can be quite adequate for an initial abstraction. What the thing has, i.e. members and/or properties, and can do, i.e. methods, are the next level of things to add. Then comes the inheritance, abstraction, encapsulation and polymorphism ideas as ways to round out the initial take of modelling that OOP tries to do. I came to OOP from a procedural coding background so the idea of customizable variable types does create a lot of different ideas that can be explored.

提交回复
热议问题