PrepAway - Latest Free Exam Questions & Answers

Which of the following describes object-oriented programming deferred commitment?

Which of the following describes object-oriented programming deferred commitment?

PrepAway - Latest Free Exam Questions & Answers

A.
Autonomous objects, with cooperate through exchanges of messages

B.
The internal components of an object can be refined without changing other parts of the system

C.
Object-oriented analysis, design, and modeling maps to business needs and solutions

D.
Other programs using same objects

Explanation:
B: Deferred commitment means that the internal components of an object can be refined without changing other parts of the system. Non-object-oriented programming applications
are written as monolithic entities. This means an application is just one big pile of code. If you need to change something in this pile, you would need to go through the whole program’s
logic functions to figure out what your one change is going to break. If you choose to write your program in an object-oriented language, you don’t have one monolithic application, but
an application that is made up of smaller components (objects). If you need to make changes or updates to some functionality in your application, you can just change the code within
the class that creates the object carrying out that functionality and not worry about everything else the program actually carries out.
A is incorrect because autonomous objects, which cooperate through exchanges of messages, refer to object-oriented programming’s modularity. An object is preassembled code
that is a self-contained module. 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
programming interface. 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.
C is incorrect because the description, “Object-oriented analysis, design, and modeling maps to business needs and solutions,” refers to naturalness. An object’s method should
naturally map to business objectives. A method is the functionality or procedure an object can carry out. An object may be constructed to accept data from a user and reformat the
request so that a back-end server can understand and process it. Another object may perform a method that extracts data from a database and populates a Web page with this
information. Or an object may carry out a withdrawal procedure to allow the user of an ATM to extract money from her account. These are business needs.
D is incorrect because reusability refers to different programs being able to use the same objects. Most applications have some type of functionality in common. Instead of
developing the same code to carry out the same functionality for ten different applications, using OOP allows you to just create the object once and let it be reused in other
applications. This reduces development time and saves money. The objects can be catalogued in a library, which provides an economical way for more than one application to call
upon the objects. The library provides an index and pointers to where objects actually live within the system or on another system.

One Comment on “Which of the following describes object-oriented programming deferred commitment?


Leave a Reply