thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

DevOps & Automation · Intermediate

Object-Oriented Programming (OOP)

A programming paradigm that organizes code into classes and objects combining data (attributes) and behavior (methods).

Definition

Key principles are encapsulation, inheritance, polymorphism, and abstraction. In Python, classes define __init__ constructors and methods that take self; inheritance enables reuse such as a base Device class with vendor subclasses.

Example

class Switch(Device): def get_vlans(self): ...

Exam tip

Know the four pillars and that self refers to the instance in Python methods.

Related terms