COMP 110 QUIZ04

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/21

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

22 Terms

1
New cards

Class

A blueprint defining attributes and methods for objects.

2
New cards

Object (Instance)

Concrete creation from a class with unique attribute values.

3
New cards

__init__ (Constructor)

Special method called when creating an object to initialize attributes.

4
New cards

self Parameter

Reference to the current object instance, allowing access to its attributes.

5
New cards

Attributes

Variables owned by an object, defined in the constructor using self.attribute

6
New cards

Base Case

Condition where recursion stops, preventing further calls.

7
New cards

Recursive Case

Function calls itself with modified arguments to progress toward the base case.

8
New cards

Linked List

A recursive data structure where each Node points to the next node or None.

9
New cards

Recursive Traversal

A process where the current node is handled before recursively processing the next node.

10
New cards

Abstraction

Hiding complex implementation while exposing essential features.

11
New cards

Instantiation

Creating an object from a class, triggering the __init__ method.

12
New cards

Stack Frame

Memory space for a function call, created during recursion.

13
New cards

RecursionError

Occurs if the base case isn’t reached, indicating infinite recursion.

14
New cards

Instance Attribute

self.name (unique to each object).

15
New cards

Class Attribute

species (shared by all Dog objects).

16
New cards

Constructor

init (auto-called during instantiation).

17
New cards

Method vs. Function

Method (defined inside a class, takes self).

18
New cards

Magic Method

Defines how the object is printed (e.g., print(dog)).

19
New cards

Local Variable

total (exists only inside the method).

20
New cards

Class Method

Class method (modifies class-level attributes via cls).

21
New cards

Instantiation

my_dog = Dog() (calls init).

22
New cards

Self Parameter

self refers to the current object instance.