CIS247C Quiz Week 1

$5.00

CIS247C Quiz Week 1
(TCO 1) Which of the following would be a more appropriate choice for a method in a Fork class?
Color()
Bend()
Eat…

SKU: CIS247C Quiz Week 1 Categories: , Tags: , , , ,

Description

CIS247C Quiz Week 1

CIS247C Quiz Week 1

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

Color()

Bend()

Eat()

Material()

(TCO 1) By default, a class does not have the property of _____.

Encapsulating data

Information hiding

Containing both data members and member methods

Knowing how other classes are implemented

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

  1. A class is necessary to be defined before you can create an object.
  2. The specific values of the attributes of an object represent the state of the object.
  3. An interface of a class defines what messages an object can respond to.
  4. Objects communicate through message passing.

All are true

Only A, B, and D are true

None are true

(TCO 1) _____ is the process of identifying important attributes and behaviors of an object.

Class

Abstraction

Coding

All of the above

None of the above

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

Resize

Show

Font Color

Write

(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();
void icrementSeconds();
private:
int hr;
int min;
int sec;
}

7

3

10

4

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

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

Underscores along with all upper case words

Method Class case

No specific naming convention

Pascal case

(TCO 1) Inheritance is referred to as a(n) _____ relationship, while composition is referred to as a(n) _____ relationship.

Superclass-subclass; friend

Is-a; Has-a

Has-a; Is-a

None of the above

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

Two copies, one copy of the first class and one of the second; objects always share attributes and methods

Zero, the objects do not have attributes and methods

Four copies, two copies of the first class and two of the second

Eight copies

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

Public

Private

Protected

Internal

Unfriendly