Computer Science Class Design and Method Fundamentals

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

1/20

flashcard set

Earn XP

Description and Tags

A set of vocabulary flashcards covering Java class design, object-oriented principles, and method fundamentals based on the lecture transcript.

Last updated 6:34 AM on 4/29/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

21 Terms

1
New cards

Instance Variable

A variable defined in a class for which each instantiated object of the class has its own copy.

2
New cards

Encapsulation

The practice of keeping the internal state of an object hidden from the outside world and only exposing it through a controlled interface (methods).

3
New cards

Constructor

A special method used to initialize the state of a new object. It has the same name as the class and no return type.

4
New cards

Static (Class Variable/Method)

A keyword indicating that a member belongs to the class itself rather than to any specific instance.

5
New cards

Access Modifier

Keywords like public and private that control the visibility and accessibility of classes, variables, and methods.

6
New cards

this Keyword

A reference to the current object whose method or constructor is being called.

7
New cards

Procedural Abstraction

The concept of using a method by knowing what it does without needing to know how it is implemented.

8
New cards

Data Abstraction

Separating the logical properties of a data type from the concrete details of its implementation.

9
New cards

Return Type

The data type of the value a method sends back to the caller (e.g., intint, doubledouble, booleanboolean). Use void if no value is returned.

10
New cards

Local Variable

A variable declared inside a method or constructor that only exists within that specific block of code.

11
New cards

Object State

The state of an object is defined by the current values of its instance variables.

12
New cards

Scope

Instance variables are accessible throughout the entire class, while parameters and local variables are only accessible within their specific methods.

13
New cards

Default no-argument constructor

Provided by Java automatically if you do not write a constructor.

14
New cards

Accessor Methods (Getters)

Used to "get" or return the value of a private instance variable; they must have a return type matching the variable.

15
New cards

Mutator Methods (Setters)

Used to "set" or update the value of a private instance variable.

16
New cards

void methods

Methods that perform an action but do not return data.

17
New cards

non-void methods

Methods that must return exactly one value of the specified type.

18
New cards

Static Variables

Shared across all instances of a class; often used for counters or constants.

19
New cards

Static Methods

Methods called using the Class name (e.g., Math.sqrt()); they cannot use the thisthis keyword or access instance variables.

20
New cards

Pass-by-Value

The mechanism by which Java passes arguments; primitives pass a copy of the value, and object references pass a copy of the memory address (reference).

21
New cards

Variable Shadowing

Occurs when a parameter has the same name as an instance variable; resolved by using this.variableNamethis.variableName.