Which of the following would be the most appropriate choice for a method in a

Question 1.1. (TCO 1) Which of the following would be the most appropriate choice for a method in a PhoneCharger class? (Points : 5)
Voltage()
Manufacturer()
Current()
Charge()
Question 2.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
All of the above
None of the above
Only A, C, and D
Question 3.3. (TCO 2) Which of the following components of a class definition cannot be overloaded? (Points : 5)
Public member methods
Destructors
Constructors
Private member methods
All of the above
Question 4.4. (TCO 2) Which of the following statements is/are true? (Points : 5)
A. A default constructor is automatically created for you if you do not define one.
B. A static method of a class can access non-static members of the class directly.
C. An important consideration when designing a class is identifying the audience, or users, of the class.
None of the above
Only A and C
Question 5.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)
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
Question 6.6. (TCO 1) Which of the following statements is/are false? (Points : 5)
Abstraction is the process of ignoring the high level information about a category entity or activity, while concentrating on the “unimportant” details.
The object oriented paradigm permits the modeling of a software system in a more natural way compared to the procedural paradigm.
In object-oriented programming we design the program as a set of cooperating objects.
None of the above
Question 7.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)
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
Question 8.8. (TCO 2) You are given an Animal class that was designed with the concept of a black box in mind. You need to integrate the Animal class into your own code. The first thing you need to figure out is a list of _____ and _____ that are associated with the class. The actual implementation details need not be known. (Points : 5)
interfaces; the detailed implementations
inputs; outputs
private methods; accessors
relationships; UML diagrams
Question 9.9. (TCO 2) Given a private attribute called hairColor, which of the following are proper pseudocode implementations for a getter and a setter? (Points : 5)
string getHairColor(){return hairColor}
int setHairColor(string newHairColor){return hairColor}
void getHairColor(){return hairColor}
void setHairColor (int newHairColor){hairColor = newHairColor}
string getHairColor(){return hairColor}
void setHairColor (string newHairColor){hairColor = newHairColor}
string getHairColor (){hairColor = newHairColor}
void setHairColor (string newHairColor){hairColor = newHairColor}
Question 10.10. (TCO 7) Which of the following statements is true? (Points : 5)
Interfaces can be written across multiple files or within abstract classes, unlike classes.
The name of an interface often begins with the prefix “interface” such as interfaceShape.
Interfaces allow object-oriented languages to implement multiple composition.
Interfaces can not be instantiated like a class.
Question 11.11. (TCO 7) Abstract classes may contain which of the following? (Points : 5)
A. Abstract methods
B. Non-abstract methods
C. Virtual methods
A and B
A and C
B and C
A, B, and C

AFTER PAYMENT ENTER PASSWORD : "shiv" TO UNLOCK THE SOLUTION



Comments

Popular posts from this blog

You are given a choice of taking the simple interest on 100,000 invested for 2 years

Complete the spreadsheet template following Steps 1–10, building a comprehensive workbook of data and analyses that will inform your conclusions