Exam 10: Classes and Data Abstraction

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

To guarantee that the member variables of a class are initialized, you use ____.

(Multiple Choice)
4.8/5
(36)

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

(Short Answer)
4.8/5
(39)

The header file is also known as the ____________________.

(Short Answer)
4.8/5
(42)

What does ADT stand for?

(Multiple Choice)
5.0/5
(42)

To create the object code file for any source code file, the command line option ____________________ is used on the system command line.

(Short Answer)
4.8/5
(40)

A constructor with no parameters is called the ____________________ constructor.

(Short Answer)
4.9/5
(36)

  -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.8/5
(41)

A(n) ____________________ contains the definitions of the functions to implement the operations of an object.

(Short Answer)
5.0/5
(39)

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
(31)

A class and its members can be described graphically using a notation known as the ____ notation.

(Multiple Choice)
4.7/5
(40)

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.9/5
(32)

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

(True/False)
5.0/5
(41)

class rectangleType { public: void setLengthWidth(double x, double y); //Postcondition: length = x; width = y; void print() const; //Output length and width; double area(); //Calculate and return the area of the rectangle; double perimeter(); //Calculate and return the parameter; rectangleType(); //Postcondition: length = 0; width = 0; rectangleType(double x, double y); //Postcondition: length = x; width = y; private: double length; double width; }; -Consider the accompanying class definition in Figure 2. Which of the following variable declarations is correct?

(Multiple Choice)
4.9/5
(42)

class rectangleType { public: void setLengthWidth(double x, double y); //Postcondition: length = x; width = y; void print() const; //Output length and width; double area(); //Calculate and return the area of the rectangle; double perimeter(); //Calculate and return the parameter; rectangleType(); //Postcondition: length = 0; width = 0; rectangleType(double x, double y); //Postcondition: length = x; width = y; private: double length; double width; }; -Consider the accompanying class definition, and the declaration: rectangleType bigRect; Which of the following statements is correct?

(Multiple Choice)
4.8/5
(30)

  -Consider the UML class diagram shown in the accompanying figure. According to the UML class diagram, how many private members are in the class? -Consider the UML class diagram shown in the accompanying figure. According to the UML class diagram, how many private members are in the class?

(Multiple Choice)
4.8/5
(44)

Classes were specifically designed in C++ to handle ____________________.

(Short Answer)
4.9/5
(34)

Which of the following class definitions is correct in C++?

(Multiple Choice)
4.8/5
(39)

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

(Multiple Choice)
4.9/5
(36)

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.9/5
(35)

A C++ implementation file has the extension ____________________.

(Short Answer)
4.8/5
(29)
Showing 21 - 40 of 49
close modal

Filters

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