Back to marketplace

Unit 9 - Inheritance

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

Superclass

Back (Answer)

Class hierarchy can be developed by putting common attributes & behaviors of related classes into a single class

#2
Front (Question)

Subclasses

Back (Answer)

Extend a superclass Can draw upon existing attributes & behaviors of superclass without repeating in code

#3
Front (Question)

Extending a subclass from a superclass creates an

Back (Answer)

"is-a" relationship from subclass to superclass (Lower class) is a (Upper class)

#4
Front (Question)

Inheritance

Back (Answer)

Parent classes have attributes & behaviors that can be inherited by child classes

#5
Front (Question)

Why use inheritance

Back (Answer)

Code reusability Prevents repeating code Readability & organization Ease of maintenance

#6
Front (Question)

Each subclass can only have

Back (Answer)

one superclass

#7
Front (Question)

All subclasses inherit

Back (Answer)

attributes and methods of their superclasses

#8
Front (Question)

A superclass can’t

Back (Answer)

inherit attributes and methods of subclass implicitly

#9
Front (Question)

keyword extend

Back (Answer)

Used to establish an inheritance relationship between subclass and a superclass Can only extend one superclass

#10
Front (Question)

Constructors are

Back (Answer)

NOT inherited

#11
Front (Question)

When a subclass’s constructor does not explicitly call a superclass’s constructor using super,

Back (Answer)

Java inserts a call to superclass’s no-argument constructor

#12
Front (Question)

Superclass constructor can be called from first line of subclass constructor by using

Back (Answer)

keyword super and passing appropriate parameters

#13
Front (Question)

Actual parameters passed in call to superclass constructor provides

Back (Answer)

values that constructor can use to intialize the object’s instance variabes

#14
Front (Question)

Using super will call

Back (Answer)

No-argument constructor of superclass MUST be the first line of body of constructor

#15
Front (Question)

Whether superclass constructor is called implicitly or explicitly, process of calling superclass constructors continue up

Back (Answer)

inheritance hierarchy with each constructor calling constructor of superclass until Object constructor is called

#16
Front (Question)

Method overriding occurs when

Back (Answer)

a public method in a subclass has the same method signature as a public method the superclass

#17
Front (Question)

Any method that is called must be defined withint tis

Back (Answer)

own class or superclass

#18
Front (Question)

Subclass is usually designed to have

Back (Answer)

modified or additional methods or instance variables

#19
Front (Question)

Subclass inherit all

Back (Answer)

public methods of superclass and will remain public in subclass

#20
Front (Question)

What are options with methods when we extend a superclass?

Back (Answer)

Inherit methods Write new methods Override methods

#21
Front (Question)

Inherit methods

Back (Answer)

Public methods in superclass become valid public methods of subclass Important to acces private instance variables

#22
Front (Question)

Write new methods

Back (Answer)

Additional methods completely independent of methods in superclass Includes overloaded methods and treated as independent methods

#23
Front (Question)

Override methods

Back (Answer)

Write a new or different implementation of a method that already exists in superclass

#24
Front (Question)

keyword super

Back (Answer)

Can be used to call superclass’s constructors and methods