Object-oriented concepts

Source: Internet
Author: User

1. All objects)
2. The object has status and Behavior
3. All objects are unique.
4. A class is a set of objects with the same features and behaviors.
5. Each object is an instance of a class)
6. There is a one-to-one ing between the elements in the Problem Space and objects in the solution space.
7. Call between objects by sending messages
8. The type determines the interface of the object)
9. The interface defines the message that can be sent to the object.
10. The type not only describes the constraints acting on an object set, but also the relationship with other types.
11. The "has-a" (ownership) Relationship between types, that is, using the existing class combination (composition) to form a new class
12. The relationship between "is-a" and "is-like-a" (similarity) between types, that is, the export class (subclass) through class inheritance) has the same interface as the base class (parent class)
13. During inheritance, only the method of the base class is overloaded (no method is added). That is, the export class has the same interface as the base class, and the export class can replace the base class, this is "is-"
14. During inheritance, a new method is added to the export class, that is, the new class extends the interface. Although the export class can replace the base class, the base class cannot access the new method, therefore, the replacement is not perfect. This is "is-like-"
15. polymorphism makes it possible to send a message to an object even if it involves an upward Transformation (upcasting-regards the export class as its base class ), this object also knows what kind of correct behavior to execute

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.