Voltage() Manufacturer() Current() Charge() A. separating the interface from the
ID: 3541076 • Letter: V
Question
Voltage()
Manufacturer()
Current()
Charge()
A. separating the interface from the implementation
B. client side access to implementation details
C. information hiding
D. ease of program modifiability
All of the above
None of the above
Only A, C, and D
Properties
Accessor/mutator methods
Private member methods
Destructors
None of the above
A. There are three types of attributes: local, object, and class attributes.
B. A common use of information hiding is to hide the physical storage layout of data.
C. A static method of a class cannot access non-static members of the class directly.
All of the above
Only A and B
A. public void Bake() ; public int Bake(int x)
B. public int Mix(int x, int y) ; public int Mix(int y, int x)
C. public int Shake(int x, int y) ; public int Shake(int x, int y, int z)
All of the above
Only A and C
The method is the center of the object-oriented paradigm.
The class is a description of one or more entities with a uniform set of attributes (data members) and behaviors (member methods).
Abstraction is the process of ignoring the unimportant details about a category entity or activity, while concentrating on the high level information.
None of the above
Declare as many class attributes public as you can, creating accessor/mutators for each one.
Package attributes and behaviors specific to an Automobile together.
Make sure to include a specific implementation for a drive method that all subclasses can inherit.
Declare the class as private.
All of the above
abstract class; abstract methods
object-oriented instance; method implementations
black box system; interface
interface; inheritance hierarchy
A. int setAttributeOne(int newAttributeOne)
{
return attributeOne
}
B. void setAttributeOne(int newAttributeOne)
{
attributeOne = newAttributeOne
}
C. string setAttributeTwo (int newAttributeTwo)
{
attributeTwo = newAttributeTwo
}
D. void setAttributeTwo ()
{
attributeTwo =
1. (TCO 1) Which of the following would be the most appropriate choice for a method in a PhoneCharger class? (Points : 5)
Explanation / Answer
1. (TCO 1) Which of the following would be the most appropriate choice for a method in a PhoneCharger class? (Points : 5)
Charge()
2. (TCO 1) Object-oriented programming generally does NOT focus on _____. (Points : 5)
A. separating the interface from the implementation
B. client side access to implementation details
C. information hiding
D. ease of program modifiability
Only A, C, and D
3. (TCO 2) Which of the following components of a class definition do not have a return type? (Points : 5)
Destructors
4. (TCO 2) Which of the following statements is/are true? (Points : 5)
A. There are three types of attributes: local, object, and class attributes.
B. A common use of information hiding is to hide the physical storage layout of data.
C. A static method of a class cannot access non-static members of the class directly.
All of the above
5. (TCO 5) Which of the following method pairs are examples of method overloading? (Points : 5)
A. public void Bake() ; public int Bake(int x)
C. public int Shake(int x, int y) ; public int Shake(int x, int y, int z)
All of the above
Only A and C
6. (TCO 1) Which of the following statements is/are false? (Points : 5)
The method is the center of the object-oriented paradigm.
7. (TCO 2) You have been tasked to create an Automobile class and your boss wants you to consider the concept of encapsulation
as you design your class. Which of the following actions will you take? (Points : 5)
Make sure to include a specific implementation for a drive method that all subclasses can inherit.
8. (TCO 2) You need to utilize an Item class in your own object-oriented class using composition.
Luckily, one of your fellow students just finished writing their own version of an Item class.
If the Item class was properly designed as a(n) _____,
you do not need to know the specific details of how the class was implemented.
Instead, you only need to become familiar with its _____. (Points : 5)
abstract class; abstract methods
9. (TCO 2) A class is designed with two public attributes: attributeOne and attributeTwo.
attributeOne is an integer data type while attributeTwo is a string data type. Which pseudocode representation(s)
of setters would be appropriate for this class? (Points : 5)
B. void setAttributeOne(int newAttributeOne)
{
attributeOne = newAttributeOne
}
10. (TCO 7) Which of the following statements is true? (Points : 5)
Interfaces contain a list of method signatures.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.