General

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

1/28

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 11:01 PM on 2/6/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

29 Terms

1
New cards

Comment (Java)

A line that describes code, written as // This is a comment for single-line or /* This is a multi-line comment */ for multi-line.

2
New cards

Comment (Python)

A line that describes code, written as # This is a comment for single-line or ''' This is a multi-line comment ''' for multi-line.

3
New cards

Pass by Value

In Java, a copy of the value is passed to the function, so changes do not affect the original variable.

4
New cards

Pass by Reference

In Python, when passing mutable objects, the reference to the actual memory location is passed, allowing modifications to affect the original.

5
New cards

Recursion

Occurs when a function calls itself, useful in solving problems that can be divided into smaller sub-problems.

6
New cards

Factorial (Java Example)

A method that calculates the factorial of a number using recursion.

7
New cards

Factorial (Python Example)

A function that calculates the factorial of a number using recursion.

8
New cards

Compiler (Java)

Translates the entire source code into machine code before execution, making execution faster.

9
New cards

Interpreter (Python)

Translates and executes code line-by-line, which allows easier debugging but is typically slower.

10
New cards

== in Java

Compares memory addresses, checking if two references point to the same object.

11
New cards

.equals() in Java

Compares actual values stored in the objects, determining if they are logically equivalent.

12
New cards

== in Python

Compares values to check if two objects hold the same data.

13
New cards

is in Python

Compares memory addresses, checking if two references point to the same object.

14
New cards

Object-Oriented Programming (OOP)

A programming paradigm that organizes code into objects containing data (attributes) and methods (behaviors).

15
New cards

Encapsulation

Hides the internal state of an object and requires controlled access through methods.

16
New cards

Inheritance

Allows a class to inherit properties and methods from another class.

17
New cards

Polymorphism

Enables methods to be implemented in different forms based on context.

18
New cards

Abstraction

Hides complex implementation details and exposes only the relevant functionalities.

19
New cards

Class (Definition)

A blueprint to create objects, defining properties and methods.

20
New cards

Object (Definition)

An instance of a class that possesses state and behavior.

21
New cards

Constructor (Java)

A special method to initialize an object when it is created.

22
New cards

Constructor (Python)

A special method (init) used to initialize an object when it is created.

23
New cards

Method Overriding

Allows a subclass to provide a specific implementation for a method defined in its parent class.

24
New cards

Abstract Class

A class that cannot be instantiated and may contain abstract methods that must be implemented by subclasses.

25
New cards

Interface

Defines methods that a class must implement; it contains no implementation.

26
New cards

Getters

Methods that retrieve values from an object's attributes.

27
New cards

Setters

Methods that modify values of an object's attributes, maintaining encapsulation.

28
New cards

Multiple Inheritance (Java)

Java does not support multiple inheritance directly to avoid ambiguity.

29
New cards

Multiple Inheritance (Python)

Python supports multiple inheritance, allowing a class to inherit from multiple classes.