Exam 10: Classes and Data Abstraction

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

A ____ sign in front of a member name on a UML diagram indicates that this member is a public member.

(Multiple Choice)
4.8/5
(80)

In C++, the ____ is called the member access operator.

(Multiple Choice)
4.7/5
(74)

A class object can be ____. That is, it can be created once, when the control reaches its declaration, and destroyed when the program terminates.

(Multiple Choice)
4.8/5
(78)

A(n) ____________________ function of a class changes the values of the member variable(s) of the class.

(Short Answer)
4.8/5
(89)

With ____________________ functions, the definitions of the member functions are placed in the implementations file.

(Short Answer)
4.9/5
(83)

  -Consider the UML class diagram shown in the accompanying figure. Which of the following is the name of the class? -Consider the UML class diagram shown in the accompanying figure. Which of the following is the name of the class?

(Multiple Choice)
4.9/5
(65)

Given this declaration: class myClass { public: void print(); //Output the value of x; MyClass(); private: int x; }; myClass myObject; The following statement is legal. myObject.x = 10;

(True/False)
4.9/5
(82)

In C++, you can pass a variable by reference and still prevent the function from changing its value by using the keyword ____ in the formal parameter declaration.

(Multiple Choice)
4.8/5
(81)

In C++ terminology, a class object is the same as a class instance.

(True/False)
4.9/5
(62)

Which of the following is true about classes and structs?

(Multiple Choice)
4.7/5
(86)

A program or software that uses and manipulates the objects of a class is called a(n) ____________________ of that class.

(Short Answer)
4.8/5
(82)

A ____ sign in front of a member name on a UML diagram indicates that this member is a protected member.

(Multiple Choice)
4.9/5
(74)

  -Consider the accompanying class definition. Which of the following variable declarations is correct? -Consider the accompanying class definition. Which of the following variable declarations is correct?

(Multiple Choice)
4.8/5
(81)

A member function of a class that only accesses the value(s) of the data member(s) is called a(n) ____ function.

(Multiple Choice)
4.8/5
(94)

If a member of a class is ____, you cannot access it outside the class.

(Multiple Choice)
4.8/5
(65)

If a function of a class is static, it is declared in the class definition using the keyword static in its ____.

(Multiple Choice)
4.8/5
(81)

If a class object is passed by ____________________, the contents of the member variables of the actual parameter are copied into the corresponding member variables of the formal parameter.

(Short Answer)
4.9/5
(99)

The header file is also known as the ____________________.

(Short Answer)
5.0/5
(71)

If an object is created in a user program, then the object can access both the public and private members of the class.

(True/False)
4.8/5
(71)

  -Consider the accompanying class definition, and the object declaration: rectangleType bigRect(14,10); Which of the following statements is correct? -Consider the accompanying class definition, and the object declaration: rectangleType bigRect(14,10); Which of the following statements is correct?

(Multiple Choice)
4.9/5
(92)
Showing 21 - 40 of 43
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)