Inheritance Lab

Infosec Learning
Virtual Lab

Python, like most object oriented programming languages, supports inheritance. Inheritance is the transfer of characteristics of a class to other classes. Similar to biological inheritance where the child has characteristics of their parents. In this lab we will demonstrate inheritance and how it is used to neatly organize code. In this lab we will...

Time
1 hour 30 minutes
Difficulty
Beginner
Share
NEED TO TRAIN YOUR TEAM? LEARN MORE
Join over 3 million cybersecurity professionals advancing their career
Sign up with
or

Already have an account? Sign In »

Overview

Python, like most object oriented programming languages, supports inheritance. Inheritance is the transfer of characteristics of a class to other classes. Similar to biological inheritance where the child has characteristics of their parents. In this lab we will demonstrate inheritance and how it is used to neatly organize code. In this lab we will build off the pingscanner class (defined in the Creating a Ping Scanner lab) and illustrate a new child class called portscanner to demonstrate inheritance. We will use a script called portscanTest.py to import the portscanner module and demonstrate how methods are inherited from the parent class (pingscanner).