AP CSA Unit 5: Writing Classes

studied byStudied by 0 people
0.0(0)
Get a hint
Hint

public

1 / 21

22 Terms

1

public

Allows access to data and methods from classes outside the declaring class.

New cards
2

private

Restricts access to data and methods to the declaring class.

New cards
3

Encapsulation

The process of hiding the implementation details of a class from the user

New cards
4

Accessor Methods

Methods used to access instance variable and object data. Also referred to as getter methods.

New cards
5

Mutator Methods

Methods used to change or manipulate instance variable or object data. Also referred to as setter methods.

New cards
6

alias

A variable that references an existing object. When the alias variable is manipulated, so is the original object, and vice versa.

New cards
7

“Has-a” Relationship

Objects are defined by having the attributes, or instance variables that they are assigned.

New cards
8

Preconditions

Conditions that must be true prior to execution in order for that code segment to behave as expected.

New cards
9

Postconditions

Conditions that must be true after the code segment is executed.

New cards
10

Accessor Method

A method that enables user to obtain information about an object’s instance and static variables.

New cards
11

toString Method

A specific accessor method that returns a String value with information about an object’s instance values. This overrides the object’s inherit toString method when an object is printed using System.out.print or System.out.println

New cards
12

Mutator Method

A method that enables user to change the value of an object’s instance and static variables.

New cards
13

object.instanceVariable

Instance variables can be accessed directly by using the reference variable name + . + the instance variable name. This only works within the class file if the instance variables are set to private.

New cards
14

Static Variables

Variables that can be accessed by all objects of a class. They are called using the class name, and can be used in static and non-static methods.

New cards
15

Static Methods

Methods that can be used directly by the class name. They cannot access instance variables or non-static methods.

New cards
16

Method Decomposition

The process of breaking down large problems into smaller problems, each with a method that defines a subproblem in the larger problem.

New cards
17

Shadowing

If two variables within the same scope have the same name, the variable with the more specific scope will be called.

New cards
18

Local Variable

A variable that is defined in a method or constructor. It only exists in the context of the method that it belongs to.

New cards
19

this Keyboard

Makes a call to the current object in a class file. Allows programmers to specify which objects and instance variables should be called.

New cards
20

ACM

Association for Computing Machinery: organization for computing professionals to provide guidance related to ethics and responsibilities.

New cards
21

System reliability

When all programs and code will work as intended.

New cards
22

Bias

Prejudice in favor of or against one thing, person, or group compared with another, usually in a way considered to be unfair.

New cards

Explore top notes

note Note
studied byStudied by 9 people
... ago
4.0(1)
note Note
studied byStudied by 10 people
... ago
5.0(1)
note Note
studied byStudied by 106 people
... ago
5.0(1)
note Note
studied byStudied by 12 people
... ago
4.0(1)
note Note
studied byStudied by 139 people
... ago
4.0(1)
note Note
studied byStudied by 11 people
... ago
4.0(1)
note Note
studied byStudied by 64 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (52)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (58)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (44)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (330)
studied byStudied by 58 people
... ago
5.0(1)
flashcards Flashcard (103)
studied byStudied by 12 people
... ago
5.0(3)
flashcards Flashcard (117)
studied byStudied by 9 people
... ago
5.0(1)
flashcards Flashcard (51)
studied byStudied by 7 people
... ago
5.0(1)
flashcards Flashcard (107)
studied byStudied by 1 person
... ago
5.0(1)
robot