Exam 10: Classes and Data Abstraction

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

The components of a class are called the ____ of the class.

(Multiple Choice)
4.8/5
(26)

A(n)____________________ is a statement specifying the condition(s)that must be true before the function is called.

(Short Answer)
4.9/5
(30)

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

You can use arithmetic operators to perform arithmetic operations on class objects.

(True/False)
4.7/5
(37)

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

If the heading of a member function of a class ends with the word const,then the function member cannot modify the private member variables,but it can modify the public member variables.

(True/False)
4.8/5
(35)

Figure 2: class rectangleType { public: \quad void setLengthWidth(double x, double y); \quad\quad //Postcondition: length = x; width = y; \quad void print() const; \quad\quad //Output length and width; \quad double area(); \quad\quad //Calculate and return the area of the rectangle; \quad double perimeter(); \quad\quad //Calculate and return the parameter; \quad\quad rectangleType(); \quad\quad //Postcondition: length = 0; width = 0; \quad rectangleType(double x, double y); \quad\quad //Postcondition: length = x; width = y; private: \quad double length; \quad double width; }; -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
(47)

      -Consider the accompanying class and member functions definitions in Figure 3.How many constructors are present in the class definition above?       -Consider the accompanying class and member functions definitions in Figure 3.How many constructors are present in the class definition above? -Consider the accompanying class and member functions definitions in Figure 3.How many constructors are present in the class definition above?

(Multiple Choice)
4.8/5
(32)

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

(Multiple Choice)
4.9/5
(36)

Figure 1: Figure 1:    -The word ____ at the end of the member functions in the accompanying class clockType in Figure 1 specifies that these functions cannot modify the member variables of a clockType object. -The word ____ at the end of the member functions in the accompanying class clockType in Figure 1 specifies that these functions cannot modify the member variables of a clockType object.

(Multiple Choice)
4.8/5
(31)
Showing 41 - 50 of 50
close modal

Filters

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