Back to marketplace

1.2.4 OOP definitions

No description yet. This curated deck is ready for daily study.

Total cards: 10•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (10)

#1
Front (Question)

what is a class?

Back (Answer)

a template for making an object

#2
Front (Question)

what is an object?

Back (Answer)

an instance of a class

#3
Front (Question)

what is a constructor method?

Back (Answer)

• __init__ • creates an instance of an object

#4
Front (Question)

what is a public attribute?

Back (Answer)

accessible anywhere in the code

#5
Front (Question)

what is a protected attribute?

Back (Answer)

only accessible inside the class or subclass

#6
Front (Question)

what is a private attribute?

Back (Answer)

only accessible inside the class

#7
Front (Question)

what is encapsulation?

Back (Answer)

data hiding, making attributes private and only accessible via the public methods

#8
Front (Question)

what are the advantages of encapsulation?

Back (Answer)

1) stops accidental overwriting of attributes 2) allows validation before modifying attributes

#9
Front (Question)

what is inheritance?

Back (Answer)

where a subclass takes on the attributes of a superclass and can have additional attributes and methods

#10
Front (Question)

what is polymorphism?

Back (Answer)

redefining a method in a subclass with new behaviour