PrepAway - Latest Free Exam Questions & Answers

What object-oriented programming term, or concept, is illustrated in the graphic that follows?

What object-oriented programming term, or concept, is illustrated in the graphic that follows?

PrepAway - Latest Free Exam Questions & Answers

A.
Methods

B.
Messages

C.
Abstraction

D.
Data hiding

Explanation:
B: In object-oriented programming objects need to be able to communicate with each other and this happens by using messages that are sent to the receiving object’s application
program interface (API). For example, if object A needs to tell object B that a user’s checking account must be reduced by $40, it sends object B a message. The message is made up
of the destination, the method that needs to be performed, and the corresponding arguments. This graphic illustrates object communication through the use of their messaging
functionality.
A is incorrect because a method is the functionality or procedure an object can carry out, not the way objects communicate with each other. An object, for example, may be
constructed to accept data from a user and to reformat the request so that a back-end server can understand and process it. These functions are the methods that can be carried out
by the specific objectsbasically what the object can do. Another object may perform a method that extracts data from a database and populates a Web page with the necessary
information. These are just some examples of the various methods objects may carry out.
C is incorrect because abstraction is the capability to suppress unnecessary details so the important, inherent properties can be examined and reviewed. Abstraction enables the
separation of conceptual aspects of a system. For example, if a software architect needs to understand how data flows through the program, she would want to understand the big
pieces of the program and trace the steps the data takes from first being input into the program all the way until it exits the program as output. Abstraction can be provided by OOP, but
this is not what is being shown in the graphic.
D is incorrect because data hiding refers to the concept that data and operations internal to objects are hidden from other objects. Each object encapsulates its data and processes.
Data hiding protects an object’s private data from outside access. No object should be allowed to, or have the need to, access another object’s internal data or processes. Data hiding
is basically keeping what is supposed to be secret, secret.

One Comment on “What object-oriented programming term, or concept, is illustrated in the graphic that follows?

  1. joe says:

    In OO programming objects need to be able to communicate with each other and this happens by using messages that are sent to the receiving object’s application
    program interface (API).

    Method is the functionality or procedure an object can carry out

    Abstraction enables the separation of conceptual aspects of a system




    0



    0

Leave a Reply