Classes | Knowt

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:44 AM on 4/11/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

What is the fundamental blueprint for creating objects in programming?

A Class

2
New cards

The process of creating an instance of a class is known as __.

Instantiation

3
New cards

What term refers to the data component stored within a class?

Attribute or Field

4
New cards

What term refers to the functions or actions defined within a class?

Methods

5
New cards

In Python, which keyword is used to define a new class?

class\text{class}

6
New cards

The special method used to initialize a new object is called the __.

Constructor\text{Constructor}

7
New cards

In Python, what is the specific name for the constructor method?

\text{__init__()}

8
New cards

What does the parameter self\text{self} represent in a class method?

It refers to the specific instance of the object being operated on.

9
New cards

The principle of hiding internal details and showing only necessary features is __.

Encapsulation

10
New cards

Which concept allows a class to acquire the properties and methods of another class?

Inheritance

11
New cards

In the hierarchy of inheritance, the existing class is called the __.

Superclass (or Parent Class)

12
New cards

In the hierarchy of inheritance, the new class that derives from another is the __.

Subclass (or Child Class)

13
New cards

What is the ability of different objects to respond to the same method call in their own way?

Polymorphism

14
New cards

An object's state is primarily determined by its __.

Attributes

15
New cards

To access a method of an object, we typically use __ notation.

Dot notation (e.g., object.method()\text{object.method()})

16
New cards

A variable that is shared by all instances of a class is a __.

Class Variable

17
New cards

A variable that is unique to each individual object is an __.

Instance Variable

18
New cards

The process of restricting direct access to some of an object's components is part of __.

Data Hiding

19
New cards

What is the term for a method that retrieves the value of a private attribute?

Getter

20
New cards

What is the term for a method that modifies the value of a private attribute?

Setter

21
New cards

In Python, all classes inherit from a base class called __.

object\text{object}

22
New cards

What is the term for replacing a parent class's method with a new implementation in the child class?

Method Overriding

23
New cards

A concrete representation of a class in memory is called an __.

Instance

24
New cards

What defines the interface through which an object interacts with the rest of the program?

Public Methods

25
New cards

What is the main benefit of using classes in software development?

Code Reusability and Organization