Exam 3: Using Methods, Classes and Objects

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

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

(True/False)
4.8/5
(39)
Match each term with the correct statement below.
Premises:
Used to return a value back to the calling method
Responses:
instance variables
dead code
class user
Correct Answer:
Verified
Premises:
Responses:
Used to return a value back to the calling method
instance variables
(Matching)
4.8/5
(36)

What are the possible results if arguments to a method are passed in the wrong order?

(Essay)
4.8/5
(29)

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

(Multiple Choice)
4.7/5
(45)

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
(32)
Match each term with the correct statement below.
Premises:
Variables you declare within a class, but outside of any method
Responses:
method's signature
header
parameter type
Correct Answer:
Verified
Premises:
Responses:
Variables you declare within a class, but outside of any method
method's signature
(Matching)
4.8/5
(38)

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
(42)
Match each term with the correct statement below.
Premises:
Classes that can be used as the basis for any other class
Responses:
dead code
header
static method
Correct Answer:
Verified
Premises:
Responses:
Classes that can be used as the basis for any other class
dead code
(Matching)
4.8/5
(35)

____ is a principle of object-oriented programming that describes the encapsulation of method details within a class.

(Multiple Choice)
4.8/5
(37)

The interface is the part of a method that the method's client does not see.

(True/False)
5.0/5
(42)

A major advantage of a method is that it is easily reusable. What does it mean to reuse a method and what are the advantages of doing so?

(Essay)
4.8/5
(29)

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

(Essay)
4.7/5
(33)

What is a method and how is one used?

(Essay)
4.9/5
(39)

When an application is run, the method that must be executed first must be named ____.

(Multiple Choice)
4.8/5
(36)
Match each term with the correct statement below.
Premises:
Are called class methods
Responses:
accessor method
data fields
instance variables
Correct Answer:
Verified
Premises:
Responses:
Are called class methods
accessor method
(Matching)
4.7/5
(36)

The arguments in a method call are often referred to as ____.

(Multiple Choice)
4.8/5
(38)

You can identify a class that is an application because it contains a public static void main() method.

(True/False)
4.9/5
(42)

A method's identifier must be more than one word, must have embedded spaces, and can be a Java keyword.

(True/False)
4.9/5
(32)

After an object has been instantiated, its methods can be accessed using the object's _____, a dot, and a method call.

(Multiple Choice)
4.8/5
(43)

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

(Multiple Choice)
4.8/5
(45)
Showing 21 - 40 of 79
close modal

Filters

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