Exam 3 CS121

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

1/15

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.

16 Terms

1
New cards

Class

A blueprint for creating objects, defining fields (attributes) and methods (behavior).

2
New cards

Object

An instance of a class that holds actual values for fields and can use the class’s methods.

3
New cards

Encapsulation

Hiding internal details and exposing only what's necessary; achieved using private fields with public getters/setters.

4
New cards

Abstraction

Hiding complex logic behind a simple interface, often using abstract classes or interfaces.

5
New cards

Inheritance

Reusing code by creating new classes from existing ones, following the IS-A relationship.

6
New cards

Polymorphism

The ability for one name to have many forms depending on context, achieved through method overriding or overloading.

7
New cards

Method Overriding

Redefining a method in a subclass, requiring the use of @Override for safety and clarity.

8
New cards

Method Overloading

Defining multiple methods with the same name but different parameters, no annotation required.

9
New cards

Compile-Time Polymorphism

Occurs when the method to call is known at compile time, such as with method overloading.

10
New cards

Run-Time Polymorphism

Occurs when the method to call is determined at runtime based on the object’s type.

11
New cards

Access Modifiers

Keywords used to set the accessibility of classes, methods, and other members. Types include public, private, protected, and default.

12
New cards

Abstract Class

A class that can have fields and methods, used when classes share common behavior.

13
New cards

Interface

A contract that can only have constants and abstract methods, used when unrelated classes share a contract.

14
New cards

Packages

Used to group related classes together and avoid name conflicts, declared at the top of a file.

15
New cards

Fields

Attributes or properties of a class.

16
New cards

Methods

Actions that can be performed by an object of a class.