Exam 11: Advanced Inheritance Concepts

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

Match each term with the correct statement below. -The javac command to specify a directory

(Multiple Choice)
5.0/5
(43)

Classes, such as the String class, have their own equals() methods that overload the ____ class method.

(Multiple Choice)
4.9/5
(32)

____ provides a calculated hexadecimal number that is used to identify an object.

(Multiple Choice)
4.9/5
(40)

Which of the following is NOT true regarding abstract methods?

(Multiple Choice)
4.9/5
(40)

public class Animal { } public class Animal extends Object { } The two class declarations above have identical outcomes. Explains why this is the case.

(Essay)
4.9/5
(36)

public class CarReference { public static void main(String[] args) { Car carRef; ____ carRef.color(); } } Suppose you have created a Car class and Honda and Ford subclasses. Using the above code, complete the highlighted statement to create a new Honda object that is assigned to the Car reference.

(Short Answer)
5.0/5
(34)

The capability to inherit from more than one class is called ____.

(Multiple Choice)
4.8/5
(39)

Match each term with the correct statement below. -Data fields in an interface

(Multiple Choice)
4.8/5
(25)

A(n) ____ is not an object, but it points to a memory address.

(Multiple Choice)
4.8/5
(45)

When you create a useful, extendable superclass, you and other future programmers gain what advantages?

(Essay)
4.8/5
(46)

Nonabstract classes from which objects can be instantiated are called constant classes.

(True/False)
4.7/5
(36)

If you attempt to instantiate an object from an abstract class, you receive an error message from the compiler that you have committed a(n) ____.

(Multiple Choice)
4.8/5
(32)

An application's ability to select the correct subclass method is known as ____.

(Multiple Choice)
4.7/5
(33)

If you do not specify a package for a class, it is placed in an unnamed ____ package.

(Multiple Choice)
4.9/5
(36)

How is the Object class equals() method implemented?

(Essay)
4.8/5
(40)

public abstract class Shape { private int length; private int width; private int height; ____ } Using the above code, create the statement in the shaded line that will create an abstract calculateArea() method in the abstract Shape class.

(Short Answer)
4.8/5
(34)

Describe the two method types programmers of an abstract class can include.

(Essay)
4.9/5
(40)

When you create a class and use the implements clause to implement an interface but fail to code one of the interface's methods, the compiler error generated indicates that you must declare your class to be ____.

(Multiple Choice)
4.9/5
(44)

A class that will be placed in a nondefault package for others to use must be private.

(True/False)
4.9/5
(41)

If you provide an empty method within an abstract class, the method is an abstract method even if you do not explicitly use the keyword ____________________ when defining the method.

(Short Answer)
4.9/5
(37)
Showing 41 - 60 of 70
close modal

Filters

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