Prac-Theory Flashcards

1
Q

Define static

A

indicates that a particular member is not an instance, but rather part of a type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define parallel arrays

A

More than one array with the same number of elements where the elements of all the arrays with the same index, are related.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an access modifier

A

Defines who can use a method or variable in a class.

private: Only the same class can use it.
public: Anyone can use it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Accessor

A

A method that lets you read the value of a private variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Attribute

A

The data or properties that belong to an object (also called fields or properties).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Class

A

A template used to create objects. It defines the data (attributes) and actions (methods) the object will have.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Constructor

A

A special method that creates an object and sets its starting values. It has the same name as the class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Encapsulation

A

Keeping data (fields) and related actions (methods) together in one class, and hiding the details from other parts of the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Helper Method

A

A private method used inside a class to do small tasks like calculations. It’s not meant to be used outside the class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Information Hiding

A

Keeping an object’s data private and only allowing access through specific methods like get and set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Inheritance

A

When a class (child) gets methods and attributes from another class (parent), so you can reuse code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Instantiation

A

The process of creating an object from a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Methods

A

Actions or behaviors that objects can perform. For example, an object might have a method to calculate something or display a value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Mutator

A

A method (like a set method) that changes the value of a private variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Non-Static Method

A

A method that can only be used when you have created an object of the class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Object

A

An instance of a class that you create to represent something in your program, with its own data and behaviors.

17
Q

OOP Design

A

A way of designing software by breaking it into objects that interact to solve problems.

18
Q

Overloading

A

Having multiple methods with the same name in a class, but with different input parameters (types or number).

19
Q

Overriding

A

When a child class provides a new version of a method from its parent class. The child’s version is used instead.

20
Q

Parameters

A

Data or variables that you pass to a method so it can use them

21
Q

Polymorphism

A

The ability to use the same method name in different ways, like with overloading or overriding.

22
Q

Properties

A

The characteristics or data of an object (same as attributes or fields).

23
Q

Static Method

A

A method you can use without creating an object of the class.

24
Q

toString Method

A

A method that returns a text description of an object.

25
Q

Typed Method

A

A method that gives back a value (like a number or string). For example, get methods are typed methods.

26
Q

Void Method

A

A method that does something but doesn’t return a value, like a set method.