Exam 7: Object-Oriented Programming, Part 2: User-Defined Classes

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

A javadoc comment ends with:

(Multiple Choice)
4.9/5
(31)

Inside the curly braces we define the data of the class, called its ___________, and the methods.

(Multiple Choice)
4.7/5
(41)

If you do not write a constructor for a class, the compiler will provide a default constructor.

(True/False)
4.7/5
(33)

A method of a class can call other methods of that same class.

(True/False)
4.9/5
(37)

Why should you provide new versions of the toString and equals methods from the Object class?

(Multiple Choice)
4.7/5
(39)

The __________ method typically returns a String representation of the object data.

(Short Answer)
4.7/5
(35)

The data type of the return value of the equals method is:

(Multiple Choice)
4.8/5
(39)

In addition to modifying the value of an instance variable, what is the other function of a mutator method?

(Short Answer)
4.9/5
(38)

Mutator methods take no parameters.

(True/False)
4.9/5
(35)

enum Colors { RED, YELLOW, BLUE }; can be used to write a statement that represents colors in various order.

(True/False)
4.8/5
(43)

Javadoc discards all whitespace characters and the * at the beginning of each line until a non-whitespace character and non * character is encountered, so starting each comment with an * makes the Javadoc stand out.

(True/False)
4.8/5
(29)

The enum functionality is built into which package?

(Multiple Choice)
4.7/5
(41)

A(n) _________ is a collection of classes that can be imported into a program.

(Short Answer)
4.8/5
(36)

The instance variables of a class hold the data for each object of that class.

(True/False)
4.8/5
(37)

The data type of the return value of the toString method is:

(Multiple Choice)
4.9/5
(35)

In the instance variable declaration private int value:

(Multiple Choice)
5.0/5
(29)

When we code the toString method of a class, we are __________ the toString method of the Object class.

(Short Answer)
4.9/5
(31)

The following is the general form of which method? Public void setInstanceVariable( dataType newValue ) { // validate newValue, then assign to the instance variable }

(Multiple Choice)
4.9/5
(36)
Showing 61 - 78 of 78
close modal

Filters

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