The idea of object-oriented programming

Source: Internet
Author: User
In the interview process, you will always be asked what is the object-oriented understanding? Feel that you are aware of the concept of encapsulating what is polymorphic, but do not know how to answer it. So I want to ask you to understand the idea of object-oriented programming, What is the essence of the code?is really the idea of object-oriented programming (is it the form of all things written in a class?). Of course, you can also directly say that you are asked to answer the question, first thank you for your doubts

Reply content:

In the interview process, you will always be asked what is the object-oriented understanding? Feel that you are aware of the concept of encapsulating what is polymorphic, but do not know how to answer it. So I want to ask you about the idea of object-oriented programming, in the code to notice what the real thing is really embodied in the idea of object-oriented programming (is all things written in the form of a class?). Of course, you can also directly say that you are asked to answer the question, first thank you for your doubts

Object-oriented, my understanding is to put data and operations together, and they have their own life cycle. For abstraction and polymorphism, it is the virtual programming, that is, the interface or abstract class. The changes are abstracted, and the corresponding changes are polymorphic. Polymorphism has a classic word: The parent class reference points to the subclass object.

encapsulation, inheritance/combination, polymorphism.
Encapsulates a hidden implementation.
Inheritance reuse, avoid inheriting too many levels with combinations.
Polymorphism can implement different behaviors of different subclasses based on interfaces

Too novice this question, do not know how to answer upstairs are positive solution, answer up should not deduct points.
I interview people never ask these virtual, very simple truth, if you can correctly understand the concept of object-oriented and can be practical use, then you have an object-oriented thinking program is very important. But unfortunately, to a novice, can he answer these questions? If you can answer right, people will not come here.
The landlord teaches you a small interview skills, if the interview problem has a you do not know how to answer the time, before the end of the interview, the interviewer will certainly ask, you have any questions to ask him, this time you turn to ask him, if he is a candidate, he will answer this question.
Interview people, but also to interview others, in general, you have to yourself will, not you say you will.

Object-oriented development is a future oriented, maintainable, extensible development, and the object is the way to realize this idea.

Design: encapsulation, inheritance, polymorphism, abstraction and other design patterns.
Performance: stability, reusability, maintainability, extensibility.

Recommend you to see "Java programming thought" here also say do not understand!

Is all things written in the form of a class?

Prototype-based object-oriented has no class.

Object-oriented, most notably message delivery.

You can try to simulate an object-oriented system without class and traits in PHP, and you should have a better understanding.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.