nerdexam
Oracle

1Z0-803 · Question #188

Given: Which two classes use the shape class correctly?

The correct answer is B. Option B E. Option E. When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class (E). However, if it does not, then the subclass must also be declared abstract (B). Note: An abstract class is a class that is declared abstract

Working with Inheritance

Question

Given:

Which two classes use the shape class correctly?

Exhibits

1Z0-803 question #188 exhibit 1
1Z0-803 question #188 exhibit 2

Options

  • AOption A
  • BOption B
  • COption C
  • DOption D
  • EOption E
  • FOption F

How the community answered

(27 responses)
  • B
    74% (20)
  • C
    15% (4)
  • D
    7% (2)
  • F
    4% (1)

Explanation

When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class (E). However, if it does not, then the subclass must also be declared abstract (B). Note: An abstract class is a class that is declared abstract--it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.

Topics

#inheritance#abstract classes#method overriding#polymorphism

Community Discussion

No community discussion yet for this question.

Full 1Z0-803 Practice