AP CSA Unit 2 Vocabulary

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

DRY Principle

1 / 35

36 Terms

1

DRY Principle

a software development principle that stands for "Don't Repeat Yourself" which aims to reduce repetition in code

New cards
2

access modifier

a keyword used to set the visibility of classes, variables, constructors, and methods

New cards
3

encapsulation

an object-oriented programming concept where the instance variables of a class are hidden from other classes and can be accessed only through the methods of the class

New cards
4

instance variable

a variable defined in a class that represents an attribute of an object

New cards
5

refactor

to improve the readability, reusability, or structure of program code without altering its functionality

New cards
6

constructor signature

the first line of the constructor which includes the public keyword, the constructor name, and any parameters

New cards
7

default value

a predefined value that is used by a program when the user does not provide a value

New cards
8

no-argument constructor

a constructor with no parameters

New cards
9

actual parameter

the value to assign to the formal parameter

New cards
10

call by value

copying the value of the actual parameter to the constructor's formal parameter

New cards
11

formal parameter

the value to be passed to a constructor or method

New cards
12

local variable

a variable declared and accessible within a specific block of code

New cards
13

overloading

defining two or more constructors or methods with the same name but different signatures

New cards
14

parameterized constructor

a constructor that has a specific number of arguments to be passed to assign values to an object's instance variables

New cards
15

state

the attributes of an object that are represented by its instance variables

New cards
16

scope

where a variable can be used

New cards
17

assignment

using the assignment operator to initialize or change the value stored in a variable

New cards
18

initialization

giving a starting value to a variable using the assignment operator

New cards
19

literal

a source code representation of a value, such as a number or text

New cards
20

primitive type

a basic data type that Java predefines

New cards
21

reference type

a data type that contains a pointer to the memory location of an object

New cards
22

accessor method

gives the value that is currently assigned to an instance variable

New cards
23

application program interface (API)

a library of prewritten classes

New cards
24

library

a collection of methods or reusable components of code

New cards
25

return by value

a copy of the value is given to where the method is called

New cards
26

compound assignment operator

shortcut syntax to perform an operation on both operands and assign the result into the variable on the left

New cards
27

compound expression

a combination of expressions

New cards
28

concatenation

when two strings are joined together

New cards
29

expression

a combination of data and operators that evaluates to a single value

New cards
30

operand

the data that is operated on

New cards
31

truncate

to cut off data from the end

New cards
32

Boolean expression

a logical statement that gives either a true or false value

New cards
33

mutator method

changes the value assigned to an instance variable

New cards
34

relational operator

an operator used to compare values or expressions

New cards
35

escape sequence

starts with a \ to indicate how to display a string

New cards
36

override

to define a method in a subclass with the same method signature as a method inherited from a superclass

New cards

Explore top notes

note Note
studied byStudied by 132 people
... ago
5.0(1)
note Note
studied byStudied by 55 people
... ago
4.5(2)
note Note
studied byStudied by 7 people
... ago
5.0(1)
note Note
studied byStudied by 30 people
... ago
5.0(1)
note Note
studied byStudied by 37 people
... ago
5.0(1)
note Note
studied byStudied by 6 people
... ago
5.0(1)
note Note
studied byStudied by 16 people
... ago
5.0(1)
note Note
studied byStudied by 23129 people
... ago
4.8(187)

Explore top flashcards

flashcards Flashcard (21)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (93)
studied byStudied by 13 people
... ago
5.0(2)
flashcards Flashcard (27)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (58)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (83)
studied byStudied by 8 people
... ago
5.0(1)
flashcards Flashcard (30)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (22)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (68)
studied byStudied by 29 people
... ago
5.0(2)
robot