Real questions for software designers, special object-oriented exercises (4)

encapsulation

One class is (38). The purpose of declaring properties as private when defining a class is (39). (Second half of 2011)
(38) A. Encapsulation of a group of objects B. Representing the hierarchical relationship of a group of objects
C. Instances of a group of objectsD. —Abstract definition of group object
(39) A. Implement data hiding to avoid accidental changesB. Operator overloading
C. Implementation attribute value cannot be changed D. Implementation attribute value is shared by all objects of the class

Insert image description here

In object-oriented software development, encapsulation is a (42) technology whose purpose is to separate the users and producers of objects. (Second half of 2011)
(42) A. Interface managementB. Information hidingC. Polymorphism D. Aggregation

Insert image description here

The following statement about the role of encapsulation in software reuse is correct (38). (First half of 2012)
(38)A. Encapsulation eliminates the need for other developers to know how a software component works internally
B. Encapsulation makes software components work more efficiently
C. Encapsulation makes software developers do not need to prepare development documents
D. Encapsulation makes software component development easier

Insert image description here

Objects, classes, inheritance and message passing are the four core concepts of object-oriented. where the object is the whole encapsulated (37). (First half of 2015)
(37) A. Namespace B. To complete the task C. A set of dataD. Data and Behavior

Insert image description here

In the object-oriented method, binding logically related data and behaviors together to hide information from users is called (37). When a property or method in a class is designed to be private, (38) can access it. (Second half of 2017)
(37) A. Abstraction B. InheritanceC. EncapsulationD. Polymorphism
(38) A. All methods in the applicationB. Only methods defined in this class
C. Only public methods defined in this class D. Methods defined in classes in the same package

Insert image description here

In a class, member variables and member functions can sometimes be called (37) respectively. (Second half of 2019)
(37) A. Properties and activities B. Values ​​and methods C. Data and activitiesD. Properties and methods

Insert image description here

In object-oriented programming languages ​​C++ and JAVA, the keyword (37) can be used to distinguish object properties and local variable names with the same name. (Second half of 2020)
(37) A. private B. protected C. publicD. this

Guess you like

Origin blog.csdn.net/weixin_50843918/article/details/135437727