Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1 2 pts (TCO 2) Which of the following statements is true? Method names

ID: 3859080 • Letter: Q

Question

Question 1
2 pts
(TCO 2) Which of the following statements is true?

Method names are listed in the bottom section of a UML diagram.

Attribute names are listed in the bottom section of a UML diagram.

Class names are listed in the bottom section of a UML diagram.

Object names are listed in the bottom section of a UML diagram.

None of the above



Question 2
2 pts
(TCO 2) Java, C# and C++ all allow for the use of comments. Which of the following statements is/are true regarding comments?

Comments must span more than one line.

Comments may span only one line.

Comments may span one or more lines.

None of the above



Question 3
2 pts
(TCO 2) Attributes of a class can be declared as which of the following?

public

All of the above

protected

private



Question 4
2 pts
(TCO 2) If a programmer does not explicitly define a _____, a default version will be provided by the compiler.

method

attribute

destructor

All of the above

constructor



Question 5
2 pts
(TCO 2) Benefits of encapsulation include which of the following?

Decrease in implementation time

Reduced data dependencies

All of the above

Universal data access

Stable communication between applications



Question 6
2 pts
(TCO 2) Accessors such as ‘+’ and ‘-‘ can be used to dictate how external programs, objects, and entities interact with _____.

attributes of a class only

an entire class only

None of the above

all attributes and methods in a class

methods of a class only



Question 7
2 pts
(TCO 2) Object-oriented classes should be designed with the concept of a black box in mind. This means that users of the class should only need to know what _____ and _____ are associated with the class. The actual implementation details need not be known.

interface; implementation

inputs; outputs

objects; accessors

relationships; interfaces



Question 8
2 pts
(TCO 2) Which of the following statements is true about encapsulation?

Encapsulation assists with the creation of code that is reusable.

Encapsulation assists with messaging between objects because it allows full access of all attributes to outside entities

Encapsulation assists in combining more than one class together in a single, cohesive entity.

Encapsulation is another term for object-oriented design.



Question 9
2 pts
(TCO 2) Which of the following is a proper implementation for a getter?

public: int getAge() { return age;}

public: void getAge() {return age;}

public: void getAge() {return age;}

public: int getAge(int newAge) {this->age = newAge;}



Question 10
2 pts
(TCO 2) Identify the attribute declaration(s) below that most likely adhere(s) to the concept of information/data hiding.

string name;

private: string name;

string private name;

private: name;

None of the above

Explanation / Answer

Question 1
Answer: Method names are listed in the bottom section of a UML diagram.

Question 2
Answer:
Comments may span only one line.

Comments may span one or more lines.

Question 3
Answer:
All of the above

Question 4
Answer:
constructor

Question 5
Answer:
All of the above

Question 6
Answer:
all attributes and methods in a class

Question 7
Answer:
objects; accessors

Question 8
Answer:
Encapsulation is another term for object-oriented design.

Question 9
Answer:
public: int getAge() { return age;}

Question 10
Answer:
private: string name;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote