In this lesson, we will learn about a key principle of object-oriented programming - Inheritance. We will use it to create new monster classes for the Monster Quest puzzle game. These new classes will inherit all the attributes and methods of the original monster class and add some new ones all their own!
Licence
This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.
When using inheritance in your object-oriented programs, you can create a new class that inherits from a class that already exists. What is the original class called?
Instance
Object
Subclass
Correct answer: Superclass
Superclass
Q2.
When you create a new class with Inheritance - what is the class that is created called?
Constructor
Instance
Correct answer: Subclass
Subclass
Superclass
Q3.
When you use inheritance what does the new class inherit?
Correct answer: Attributes and methods
Attributes and methods
Just Attributes
Just Methods
Nothing
Q4.
Which of these class declarations is using inheritance?