AP CSA : CodeHS Definitions

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/103

flashcard set

Earn XP

Description and Tags

AP Comp-sci terms/concepts to know, core principals and basics to help understand it better, also commands to know and examples

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

104 Terms

1
New cards

Debugging

Fixing a problem in your code

2
New cards

Syntax error

An error in the sequence of words or rules in a program that prevents the program from running

3
New cards

Algorithm

4
New cards

System.out.println();

Java method that lets us print out a line of the output to the use

5
New cards

System.out.print

Java method that lets us print output to the user, without ending the line printed.

6
New cards

String

A java type that represents a string of characters (text)

7
New cards

Syntax

Rules for writing code in a specific programming language

8
New cards

Variable

A symbol or container that holds a value

9
New cards

Primitive Type

Basic, simple data types that are inherent to Java (int, double, char, boolean)

10
New cards

Boolean

A true or false value

11
New cards

Reference Type

Reference variables store the address of the value

12
New cards

Data Type

A way to classify the information you can use in programming (numbers, words, true/false values)

13
New cards

Reassignment

Process of changing the value stored in a variable

14
New cards

Modulus operator

(written as % in most programming languages) divides two numbers and returns the remainder

15
New cards

Integer Division

When two integers are divided, the decimal values are truncated, or chopped off. (ex. 3 / 2 = 1 instead of 1.5, the decimal is decimated (literally lol))

16
New cards

Escape Sequence

Characters with special meanings

17
New cards

Arithmetic Expression

Combination of numbers, operators and sometimes variables that computes a value

18
New cards

Truncation

To trim some digits of a float or double-type number or some characters of a string from the right

19
New cards

Variable

A symbol or container that holds a value

20
New cards

Scanner class

A class within java.util, contains code specifically designed to help with user input

21
New cards

Assignment Statement

A line of code that assigns a value to a variable using the = operator

22
New cards

Input Buffer

A temporary memory area where input from the user is stored before being processed

23
New cards

Casting

Turning something of one type, into another type

24
New cards

Order of Operations

The order in which mathematical expressions should be evaluated, starts with parentheses, exponents, multiplications and division, addition and subtraction

25
New cards

Round-Off Error

The difference between the calculated approximation of a number and its exact mathematical value due to rounding

26
New cards

Integer Overflow

An error that occurs when the result of an integer operation does not fit within the allocated memory space

27
New cards

Truncate

To remove the digits of the right of the decimal point without rounding

28
New cards

Increment

Increase the value of a variable by one. variable++;

29
New cards

Decrement

Decrease the value of a variable by one. variable--;

30
New cards

Compound Assignment Operators

Allows programmers to shortcut variable assignments that include the variable being assigned a new value: x = x + y; shortcut: x += y;

31
New cards

Comment Out

Commenting out code makes the computer ignore it, so it does not run.

32
New cards

Precondition

Assumptions we make about what must be true before a method is called

33
New cards

Postcondition

What should be true after a method is called

34
New cards

Single Line Comment

// this is a single line comment

35
New cards

Multi-Line Comment

/* This is a multi-Line comment*/

36
New cards

Javadoc Comment

/** 1. One sentence description of code’s function. 2. Preconditions 3. Postconditions 4. Block tags */

37
New cards

Argument

A variable passed as a value to a function

38
New cards

Method

A method is a way to teach the computer a new command

39
New cards

Parameter

A variable that receives a value passed into a method from outside the method

40
New cards

Method signature

A method’s signature is the name of the method and the parameter list

41
New cards

Method overloading

Classes can have multiple methods with the same name, as long as the parameters to those methods are different

42
New cards

Return type

Indicates what type value is being returned from the method

43
New cards

Void

A return type that means the method does not return a value

44
New cards

Instance method

A method that defines the behavior of an object, defines an action the object can perform

45
New cards

Static methods

Methods that can be called w/o creating an object of class, called using dot operator along with class name, unless defined in the enclosing class

46
New cards

Encapsulation

Process of hiding the implementation details of a class from the user

47
New cards

Modularization

Organizing code into smaller, reusable pieces

48
New cards

Math Class

A part of the java.lang package, contains only static methods

49
New cards

Math.random

Can be manipulated to produce a random int or double in a defined range
Ex: Math.random()

50
New cards
51
New cards
52
New cards
53
New cards
54
New cards
55
New cards
56
New cards
57
New cards
58
New cards
59
New cards
60
New cards
61
New cards
62
New cards
63
New cards
64
New cards
65
New cards
66
New cards
67
New cards
68
New cards
69
New cards
70
New cards
71
New cards
72
New cards
73
New cards
74
New cards
75
New cards
76
New cards
77
New cards
78
New cards
79
New cards
80
New cards
81
New cards
82
New cards
83
New cards
84
New cards
85
New cards
86
New cards
87
New cards
88
New cards
89
New cards
90
New cards
91
New cards
92
New cards
93
New cards
94
New cards
95
New cards
96
New cards
97
New cards
98
New cards
99
New cards
100
New cards