APCSA Vocab - Unit 5

0.0(0)
studied byStudied by 1 person
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/11

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

12 Terms

1
New cards

AccessorGetter

// returns a data field

public int getSlices() {

return slices;

}

2
New cards

Arguments 

// values passed to a method

public void setColor (String s) { 

   color = s; 

}

3
New cards

Class

// code that describes an object

4
New cards

Constructor 

code that creates an object, sets the data fields

// public Pizza(String t, int s) {

   topping = t; 

   slices = s; 

5
New cards

Default constructor

Code that creates an object, NO ARGUMENTS/PARAMETERS

6
New cards

Instance variable / data field

// characteristics of the object; what each object knows about itself

public class Dog {

private String name;

private int age;

}

***the stuff inside class Dog are always private, declared at the beginning of a class

7
New cards

Instantiation 

// creation of an object, uses the word new, happens in a driver class 

Dog fred = new Dog(“fred“, 8); 

8
New cards

Local variable

variable that exists only in one section of code

Ex. a var created in a loop or method

9
New cards

Setter/Mutator/Modifier

// changes the value of a data field

public void setNum(int n) {

num = n;

}

10
New cards

Null

the state of an object before it is instantiated

Noodle ramen; 

this above is NULL ^^^

Noodle ramen = new Noodle(“Korean”, 5);

11
New cards

Object

a specific instance of a class created in a driver

Pizza mushroom = new Pizza…

Pizza pepperoni = new Pizza…

mushroom and pepperoni are Pizza objects 

12
New cards

Primitive

just a value, no built in methods

int x = 5;

double y = 3.14;

boolean z = false;