CIS247C Quiz Week 3

$5.00

CIS247C Quiz Week 3
CIS 247C (TCO 2) Java, C#, and C++ all allow for the use of comments. Which of the…

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

Description

CIS247C Quiz Week 3

CIS247C Quiz Week 3

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

The compiler will ignore all comments if they are properly formatted.

The compiler will ignore all comments if they are properly formatted.

The output console will ignore all comments if they are properly formatted.

All of the above

None of the above

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

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

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

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

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

None of the above

(TCO 2) A(n) _____ has the same name as the class it is declared in, it is used to initialize attributes and accepts zero arguments.

Default destructor

Default constructor

Initializing method

Instantiation

None of the above

(TCO 2) _____ attributes are hidden from outside classes, which is also known as information hiding.

Static

Private

Public

All of the above

(TCO 2) Encapsulation _____ and provides _____ for program components.

Protects an object’s data from unwanted modifications; independence

Protects an object’s methods from unwanted modifications; independence

Provides universal access to an object’s attributes; a stable implementation

Provides universal access to an object’s methods; a stable implementation

None of the above

(TCO 2) Which of the following symbols indicate level of access for both attributes and methods in a class?

&&

/

II

All of the above

(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

(TCO 2) Which of the following statements is false about encapsulation?

Encapsulation assists in creating reliable code.

Encapsulation assists in creating reliable code.

Encapsulation assists in creating reliable code.

None of the above

(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: void getAge() {return age;}

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

private: string getName(){return name;}

public: string getName(){return name;}

private: void getName(){return name;}

public: void getName(){return name;}

None of the above