Starting Out with Python (3rd Edition)
Starting Out with Python (3rd Edition)
3rd Edition
ISBN: 9780133582734
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
A class that represents a more specific entity in an inheritance hierarchy is called a/an _____. Please explain.     Default class     Superclass     Subclass     Inheritance class
True or False:Unlike other members of a superclass, constructors of a superclass are not inherited by its subclasses. This means that you must define a constructor for a class or use the default constructor added by the compiler.
Question 1 O instance A class that passes its attributes and methods on to another class is referred to as a(n). subclass inheritance esc base class SAVE & CONTINUE Report an issue with this question FI F2 9.0 F3 1 2 ODD DOD F4 3 O Mark this question 4 FS 5 3..

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
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,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
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