Question 1. 1. (TCO 1) A class is a _____, which encapsulates _____ and _____. (
ID: 3556895 • Letter: Q
Question
Question 1.1. (TCO 1) A class is a _____, which encapsulates _____ and _____. (Points : 2) programming language construct; attributes; behaviorfield; objects; members
template; methods; behavior
All of the above
None of the above Question 2.2. (TCO 1) Which of the following would be a more appropriate choice for a method in a Dish class? (Points : 2) Size()
Break()
Color()
Eat() Question 3.3. (TCO 1) Which of the following statements is/are true? (Points : 2) A. Objects communicate through message passing.
B. An object is necessary to be defined before you can create a class.
C. The state of an object should not be hidden.
D. Implementation details should be visible through the interface of a class.
A and C
All are true
None are true Question 4.4. (TCO 1) Which of the following would be a more appropriate choice for a data member in a TextBox class? (Points : 2) resize
show
fontColor
write Question 5.5. (TCO 1) The property of _____ describes the packaging of state and behavior together in an object. (Points : 2) data hiding
abstraction
encapsulation
All of the above
None of the above Question 6.6. (TCO 8) Most professional coding standards use _____ for class and method names. (Points : 2) underscores along with all upper case words
Method Class case
no specific naming convention
Pascal case Question 7.7. (TCO 1) (TCO 1) Examine the class definition. How many members (data members and member functions) does it contain?
class clockType
{
public:
void setTime(int, int, int);
void getTime(int&, int&, int&) const;
void printTime() const;
void icrementSeconds();
void incrementMinutes();
void incrementHours();
bool equalTime(const clockType&) const;
private:
int hr;
int min;
int sec;
}; (Points : 2) 7
3
10
2
An average of 5 because (7 + 3) / 2 = 5 Question 8.8. (TCO 1) All objects of the same class _____ copy of the attributes and methods. (Points : 2) always share a
have their own
don't receive a
pass other objects a Question 9.9. (TCO 1) Code reuse and the building of more complex systems are facilitated both through _____ and _____. (Points : 2) data hiding; implementation
composition; inheritance
inheritance; messaging
None of the above Question 10.10. (TCO 1) Which of the following is a valid statement for a class definition in C++? (Points : 2) class Animal { //code goes here }
Class Animal { //code goes here }
class Animal ( //code goes here )
Class Animal ( //code goes here ) Question 1.1. (TCO 1) A class is a _____, which encapsulates _____ and _____. (Points : 2) programming language construct; attributes; behavior
field; objects; members
template; methods; behavior
All of the above
None of the above
Explanation / Answer
1.1 All of the above
2.2 Eat()
4.4 fontColor
5.5 encapsulation
6.6 Pascal case
7.7 10
8.8 have their own
10.10 class Animal { //code goes here }
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.