Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 (TCO 1) A class is a _____, which encapsulates _____ and _____. template; methods; behavior None of the above programming language construct; attributes;

Question 1

(TCO 1) A class is a _____, which encapsulates _____ and _____.

template; methods; behavior
None of the above
programming language construct; attributes; behavior
All of the above
field; objects; members

Question 2

(TCO 1) Which of the following would be a more appropriate choice for a method in a Dish class?

Break()
Eat()
Color()
Size()

Question 3

(TCO 1) Which of the following statements is/are true?

C. An interface of a class defines what messages an object can respond to.
B. The specific values of the attributes of an object represent the state of the object.
Only A, B, and D are true
A. A class is necessary to be defined before you can create an object.
D. Objects communicate through message passing.
None are true
All are true

Question 4

(TCO 1) Which of the following would be a more appropriate choice for a data member in a Button class?

click
show
resize
width

Question 5

(TCO 1) The property of _____ describes the packaging of state and behavior together in an object.

None of the above
encapsulation
abstraction
data hiding
All of the above

Question 6

(TCO 8) Most professional coding standards use _____ for class and method names.

Abstraction case
no specific naming convention
Camel case
Pascal case

Question 7

(TCO 1) Examine the ClockType class definition. How many class members does it contain? class ClockType { public : void setTime(int, int, int); int getTime(); void printTime(); private: int hr; int min; int sec; }

9
2
6
An average of 5 because (7 + 3) / 2 = 5
3

Question 8

(TCO 1) Assume we have two objects of a class. How many copies of the class's attributes and methods exist in the instantiated objects?

Two copies, each object has its own copy
Zero, the objects do not have attributes and methods
Only one copy, both objects always share it
Three copies

Question 9

(TCO 1) Both _____ and _____ allow for code reuse and the building of more complex systems.

messaging; object behaviors
inheritance; composition
UML diagrams; serialization
None of the above

Question 10

(TCO 1) By default, all members of a class are _____.

public
unfriendly
protected
internal
private

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Analyse the process of new product of development.

Answered: 1 week ago

Question

Define Trade Mark.

Answered: 1 week ago