In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
What this article shares with you is about the basic characteristics of what does not belong to the object in the object-oriented method. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it with the editor.
In the object-oriented method, what does not belong to the basic characteristic of the object is consistency. The basic characteristics of the object are: 1, object uniqueness; 2, classification; 3, inheritance; 4, polymorphism. Throughout the lifetime of an object, its identity does not change, and different objects cannot have the same identity.
In the object-oriented method, what does not belong to the basic characteristic of the object is consistency.
Related introduction:
1. Object uniqueness
Each object has its own unique identity, through which the corresponding object can be found. Throughout the lifetime of an object, its identity does not change, and different objects cannot have the same identity.
2. Taxonomy
Taxonomy refers to abstracting objects with consistent data structures (attributes) and behaviors (operations) into classes. A class is such an abstraction that reflects important properties related to the application while ignoring other irrelevant content. The division of any class is subjective, but it must be related to the specific application.
3. Inheritance
Inheritance is a mechanism by which subclasses automatically share parent data structures and methods, which is a relationship between classes. When defining and implementing a class, it can be done on the basis of an existing class, taking the content defined by the existing class as its own content, and adding some new content.
Inheritance is the most important feature that object-oriented programming languages are different from other languages, which other languages do not have.
At the class level, a subclass inherits only the data structures and methods of one parent class, which is called single inheritance.
In the class level, a subclass inherits the data structures and methods of multiple parent classes, which is called multiple inheritance.
In software development, the inheritance of classes makes the established software open and expandable, which is an effective method for information organization and classification, which simplifies the workload of creating objects and classes and increases the reproducibility of the code.
Using inheritance, the standard hierarchical structure of the class is provided. Through the inheritance relationship of classes, the common features can be shared and the reusability of the software is improved.
4. Polymorphism
Polymorphism means that the same operation or function or process can act on many types of objects and obtain different results. Different objects can produce different results when they receive the same message. This phenomenon is called polymorphism.
Polymorphism allows each object to respond to a common message in a way that suits it.
Polymorphism enhances the flexibility and reusability of the software.
These are the basic characteristics of what does not belong to the object in the object-oriented method. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.