Asked by
Devon Clarke
on Oct 26, 2024Verified
If Shape is a class and you create a new class Rectangle that extends Shape, then Shape is a(n) ____ and Rectangle is a(n) ____.Which word goes in the first blank in the sentence above?
A) subclass
B) superclass
C) inherited class
D) package
Shape
In programming, it typically refers to a geometric object that can be drawn, filled, or used to interact with graphical elements.
Rectangle
In graphical programming, a shape object that represents a rectangular area, often with properties such as width and height.
Superclass
In object-oriented programming, a class from which other classes inherit properties and methods.
- Understand the principle of inheritance and the connection between superclass and subclass in Java.
Verified Answer
CA
Learning Objectives
- Understand the principle of inheritance and the connection between superclass and subclass in Java.