Exam 3: Using Methods Classes and Objects

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

Describe instantiation and how it relates to 'is-a relationships.'

(Essay)
4.7/5
(43)

Describe how you can use multiple arguments in a method. Provide an example.

(Essay)
4.8/5
(38)

A(n) ____ variable is known only within the boundaries of the method.

(Multiple Choice)
4.8/5
(41)

A(n) ____ causes a value to be sent from a called method back to the calling method.

(Multiple Choice)
4.9/5
(40)

When a variable ceases to exist at the end of a method, programmers say the variable ____.

(Multiple Choice)
4.7/5
(25)

Application classes frequently instantiate objects that use the objects of other classes.

(True/False)
5.0/5
(44)

  In the above code, what would happen if the arguments passed to the method were passed in the wrong order? In the above code, what would happen if the arguments passed to the method were passed in the wrong order?

(Essay)
4.9/5
(36)

You can write your own constructor methods; but when you don't write a constructor method for a class object, Java writes one for you.

(True/False)
4.8/5
(38)

____ parameters are variables in a method declaration that accept the values from the actual parameters.

(Multiple Choice)
4.7/5
(45)

Assigning ____ to a field means that no other classes can access the field's values.

(Multiple Choice)
4.9/5
(28)

A method header is also called a(n) _____.

(Multiple Choice)
4.8/5
(38)

A(n) ____ constructor is one that requires no arguments.

(Multiple Choice)
4.8/5
(33)

Every object is a _____ of a more general class.

(Multiple Choice)
4.9/5
(31)

   Fill in the blank line in the above code to add a statement that calls a method named practiceWithCalls that passes a parameter named testing of type double. Fill in the blank line in the above code to add a statement that calls a method named practiceWithCalls that passes a parameter named testing of type double.

(Essay)
4.8/5
(41)

Write a valid class header with public access. Assign a valid identifier of your choice. Then write the body of the class that contains one data field named myPractice with a data type of double . Be sure to include any necessary curly braces and semicolons.

(Essay)
4.9/5
(39)

Methods used with object instantiations are called ____ methods.

(Multiple Choice)
4.8/5
(33)

To execute a method, you ____________________ it from another method.

(Short Answer)
4.8/5
(45)

What are the four components of a method header?

(Essay)
4.8/5
(39)

A(n) ____ method is a method that creates and initializes class objects.

(Multiple Choice)
4.8/5
(35)

For ease in locating class methods, many programmers store them in ____ order.

(Multiple Choice)
4.9/5
(44)
Showing 41 - 60 of 66
close modal

Filters

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