Exam 4: More Object Concepts

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags
Match each term with the correct statement below.
Premises:
Starts with the second opening curly brace and ends with the first closing
curly brace
Responses:
scope level
package
comes into scope
Correct Answer:
Verified
Premises:
Responses:
Starts with the second opening curly brace and ends with the first closing
curly brace
scope level
(Matching)
4.8/5
(39)

The reference to an object that is passed to any object's nonstatic class method is called the ____.

(Multiple Choice)
4.8/5
(30)
Match each term with the correct statement below.
Premises:
Defines mathematical constants such as PI
Responses:
NaN
shadowing
enumeration
Correct Answer:
Verified
Premises:
Responses:
Defines mathematical constants such as PI
NaN
(Matching)
4.8/5
(30)

The methods of LocalDate include getMonth() and getDayOfWeek() . Each of these methods returns a(n) ____, which is a data type that consists of a list of values.

(Multiple Choice)
5.0/5
(34)

A disadvantage of Java is the large memory requirements to store a separate copy of each variable and method for each instantiation of a class.

(True/False)
4.9/5
(45)
Match each term with the correct statement below.
Premises:
Useful when working with dates and times
Responses:
enumeration
composition
Java.time
Correct Answer:
Verified
Premises:
Responses:
Useful when working with dates and times
enumeration
(Matching)
4.9/5
(42)

Due to automatic type promotion, when a method with a double parameter is passed an integer, the integer will be promoted to a(n) ____.

(Multiple Choice)
4.8/5
(34)

What is overloading a method? What conditions must be satisfied in the parameter lists of an overloaded method?

(Essay)
4.8/5
(36)

Describe a block and define an outer block and an inner block.

(Essay)
4.7/5
(33)

List the three things you can do that allow you to use prewritten classes.

(Essay)
4.8/5
(43)

  In the above code, if the simpleMethod() method received a double or integer value, the resulting output is Method receives double parameter. Explain how Java can promote one data type to another when a parameter is passed to a method. In the above code, if the simpleMethod() method received a double or integer value, the resulting output is "Method receives double parameter". Explain how Java can promote one data type to another when a parameter is passed to a method.

(Essay)
4.8/5
(37)

____ variables are variables that are shared by every instantiation of a class.

(Multiple Choice)
5.0/5
(35)

Object-oriented programmers use the term ____ when a child class contains a field or method that has the same name as one in the parent class.

(Multiple Choice)
5.0/5
(34)
Match each term with the correct statement below.
Premises:
Using one term to indicate diverse meanings
Responses:
enumeration
NaN
inner block
Correct Answer:
Verified
Premises:
Responses:
Using one term to indicate diverse meanings
enumeration
(Matching)
4.8/5
(48)

A Java variable's scope level is its ____.

(Multiple Choice)
4.9/5
(33)
Match each term with the correct statement below.
Premises:
Created using the keyword final
Responses:
shadowing
Java.time
composition
Correct Answer:
Verified
Premises:
Responses:
Created using the keyword final
shadowing
(Matching)
4.8/5
(37)

Describe the impact that blocks and methods have on variables with the same name.

(Essay)
4.9/5
(41)

A locally declared variable always ____ another variable with the same name elsewhere in the class.

(Multiple Choice)
4.8/5
(42)

List and describe the four types of nested classes.

(Essay)
4.8/5
(32)

  The Student class above will allow Student information to be constructed in various ways, but is repetitive. How could you use the this reference to reduce the amount of repetitious code and make it less error-prone? The Student class above will allow Student information to be constructed in various ways, but is repetitive. How could you use the this reference to reduce the amount of repetitious code and make it less error-prone?

(Essay)
4.7/5
(39)
Showing 61 - 80 of 84
close modal

Filters

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