Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
4th Edition
ISBN: 9780134444321
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 11, Problem 1MC

In an inheritance relationship, the ___________ is the general class.

a. subclass

b. superclass

c. slave class

d. child class

Expert Solution & Answer
Check Mark
Program Description Answer

 In an inheritance relationship, the superclass is referred as “General class”.

Hence, the correct answer is option is “B”.

Explanation of Solution

Inheritance:

In python, it is possible to construct a new class that inherits the members of an existing class, which is referred as “inheritance”.

 “is a” relationship in inheritance:

In python, if one object is a specialized kind of another object, then there should be an “is a” relationship between those objects. This is used to create the “is a” relationship among several classes.

For example:

  • A truck is a vehicle.
  • A circle is a shape.

Super class and sub class:

In python, the inheritance concept involves two classes. They are superclass and subclass.

  • A superclass is also referred as “general class” or “base class” and a subclass is referred as “specialized class” or “derived class”.
  • The sub class is an extended kind of the superclass. This means a subclass can inherit the attributes and class member functions from the superclass without rewriting them in the subclass.
  • Extra methods can be added in the subclass, which implies the specialized kind of the superclass.

Explanation for the incorrect options:

In inheritance, a subclass is referred as “specialized class” or “derived class”.

Hence, option “A” is wrong.

In inheritance, slave class is not present.

Hence, option “C” is wrong.

In inheritance, a subclass is referred as “specialized class” or “derived class” or child class.

Hence, option “D” is wrong.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
01:38
Students have asked these similar questions
In an inheritance relationship, the __________ is the general class. a. derived class b. base class c. dependent class d. child class
In an inheritance relationship, the __________ is the specialized class. a. base class b. master class c. derived class d. parent class
A class that represents a more specific entity in an inheritance hierarchy is called a/an _____. Please explain.     Default class     Superclass     Subclass     Inheritance class

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Introduction to Classes and Objects - Part 1 (Data Structures & Algorithms #3); Author: CS Dojo;https://www.youtube.com/watch?v=8yjkWGRlUmY;License: Standard YouTube License, CC-BY