IMSA OOP Final Review Questions And Correct
Answers 100% Verified
______ models software in terms similar to those that people use to describe real-world
objects. - ANSWER Object-oriented design
Which of the following is true?
a. A method is required to carry out a task in a Java program.
b. A method contains the program statements that carry out its tasks.
c. The method hides its statements from its user, just as the accelerator pedal of a car
hides from the driver the mechanisms of making the car go faster.
d All of the above. - ANSWER d. All of the above
Which of the following is not true?
a. Classes are reusable software components.
b. A class is to an object as a blueprint is to a house.
c. To carry out some task in a program, a method is used.
d. A class is an instance of its object. - ANSWER d. A class is an instance of its object.
Which of the following statements is incorrect?
a. Many objects can be built using one class only once.
b. Reuse helps you build more reliable and effective systems, because existing classes
and components often have undergone extensive testing, debugging and performance
tuning.
c. Just as the notion of interchangeable parts was crucial to the Industrial Revolution,
reusable classes are crucial to the software revolution that has been spurred by object
technology.
d. Do not reinvent the wheel—use existing high-quality pieces whenever possible. This
, software reuse is a key benefit of object-oriented programming. - ANSWER a. Each
class can be used only once to build many objects.
Which of the following is true?
a. When you drive a car, pressing its gas pedal sends a message to the car to perform a
task—that is, to go faster.
b. You send messages to an object; each message is implemented as a method call that
tells a method of the object to perform its task.
c. A program might call a bank-account object's deposit method to increase the
account's balance.
d. All of the above statements are true. - ANSWER d. All of the above statements are
true.
Which one of the following statements is not valid?
a. The attributes of an object are defined in the object's class. b. A bank-account object
would probably have a balance attribute that reflects how much money is in the
account. c. Each bank-account object knows the balance in the account it represents,
but not the balances of the other accounts in the bank.
d. Attributes are specified by the class's methods.
ANSWER d. Attributes are specified by the class's methods.
Which one of the following statements is not true?
a. Classes (and their objects) encapsulate, i.e., encase, their attributes and methods.
b. A class's (and its object's) attributes and methods are intimately related.
c. For objects to communicate effectively with each other, each must know how the
other object is implemented.
d. Information hiding is essential to good software engineering. - ANSWER c. For objects
to interact properly with each other, each needs to know how the other object is
implemented. Actually, Objects are normally not allowed to know how other objects are
implemented—implementation details are hidden within the objects themselves.
Java was originally developed for:
Answers 100% Verified
______ models software in terms similar to those that people use to describe real-world
objects. - ANSWER Object-oriented design
Which of the following is true?
a. A method is required to carry out a task in a Java program.
b. A method contains the program statements that carry out its tasks.
c. The method hides its statements from its user, just as the accelerator pedal of a car
hides from the driver the mechanisms of making the car go faster.
d All of the above. - ANSWER d. All of the above
Which of the following is not true?
a. Classes are reusable software components.
b. A class is to an object as a blueprint is to a house.
c. To carry out some task in a program, a method is used.
d. A class is an instance of its object. - ANSWER d. A class is an instance of its object.
Which of the following statements is incorrect?
a. Many objects can be built using one class only once.
b. Reuse helps you build more reliable and effective systems, because existing classes
and components often have undergone extensive testing, debugging and performance
tuning.
c. Just as the notion of interchangeable parts was crucial to the Industrial Revolution,
reusable classes are crucial to the software revolution that has been spurred by object
technology.
d. Do not reinvent the wheel—use existing high-quality pieces whenever possible. This
, software reuse is a key benefit of object-oriented programming. - ANSWER a. Each
class can be used only once to build many objects.
Which of the following is true?
a. When you drive a car, pressing its gas pedal sends a message to the car to perform a
task—that is, to go faster.
b. You send messages to an object; each message is implemented as a method call that
tells a method of the object to perform its task.
c. A program might call a bank-account object's deposit method to increase the
account's balance.
d. All of the above statements are true. - ANSWER d. All of the above statements are
true.
Which one of the following statements is not valid?
a. The attributes of an object are defined in the object's class. b. A bank-account object
would probably have a balance attribute that reflects how much money is in the
account. c. Each bank-account object knows the balance in the account it represents,
but not the balances of the other accounts in the bank.
d. Attributes are specified by the class's methods.
ANSWER d. Attributes are specified by the class's methods.
Which one of the following statements is not true?
a. Classes (and their objects) encapsulate, i.e., encase, their attributes and methods.
b. A class's (and its object's) attributes and methods are intimately related.
c. For objects to communicate effectively with each other, each must know how the
other object is implemented.
d. Information hiding is essential to good software engineering. - ANSWER c. For objects
to interact properly with each other, each needs to know how the other object is
implemented. Actually, Objects are normally not allowed to know how other objects are
implemented—implementation details are hidden within the objects themselves.
Java was originally developed for: