COMP 1600: Introduction to Programming - Comprehensive Course Flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/72

flashcard set

Earn XP

Description and Tags

Vocabulary practice flashcards covering fundamental computer science concepts, Java programming syntax, hardware, primitive and reference types, control flow, arrays, methods, object-oriented design, multimedia libraries, and asymptotic analysis.

73 Terms

1
New cards

Computer

A machine that manipulates data according to a list of instructions; historically, the term referred to a human person who performed mathematical calculations.

2
New cards
<p>Von Neumann Architecture</p>

Von Neumann Architecture

The foundational physical design layout of modern general-purpose computers, consisting of a Central Processing Unit (CPU), Memory, and Input/Output (I/O) components.

3
New cards

Moore's Law

The historical observation that the density of transistors placed on a CPU doubles approximately every 18 months, historically leading to a doubling of CPU speed over the same timeframe.

4
New cards

Multicore Processor

A CPU architecture containing several independent processing units called cores on a single chip, enabling simultaneous parallel computation across multiple tasks.

5
New cards

Embedded Computer

A small, specialized computer built inside of everyday appliances and devices such as watches, phones, toasters, and cars; numerically more prevalent than any other computer type.

6
New cards

Compiler

A specialized software program that translates human-readable source code written in a high-level programming language into a low-level language or machine code.

7
New cards

Java Virtual Machine (JVM)

A software execution environment that runs compiled, platform-independent Java bytecode by translating it into platform-dependent machine code via a just-in-time compiler.

8
New cards

Java Bytecode

The platform-independent intermediate binary code produced by compiling Java source code, which is subsequently interpreted and executed by the JVM.

9
New cards

Bit

A fundamental binary digit in computing representing one of two physical electronic states: OFF (00) or ON (11).

10
New cards

Byte

A standard unit of digital memory storage consisting of an ordered sequence of 8 bits.

11
New cards

Overflow

A computing phenomenon that occurs when an arithmetic operation exceeds the maximum representable value of a data type, causing the value to wrap around to a very negative number.

12
New cards

Underflow

A computing phenomenon that occurs when subtracting from a negative value causes it to become too negative to be represented, wrapping around to a positive number.

13
New cards

int

A Java primitive data type that stores a 32-bit signed integer ranging from −2,147,483,648-2{,}147{,}483{,}648 up to 2,147,483,6472{,}147{,}483{,}647.

14
New cards

double

A Java primitive floating-point data type used to store rational numbers that contain a fractional component.

15
New cards

boolean

A Java primitive data type that can hold only one of two truth values: true or false.

16
New cards

char

A Java primitive data type used to store a single textual character enclosed within single quotes (such as 'a' or '$').

17
New cards

String

A Java object data type that represents an indexed sequence of characters enclosed within double quotes.

18
New cards

Literal

A source code representation of a fixed, concrete value belonging to a specific data type (such as 115, 3.14, true, or 'A').

19
New cards

Variable

A named memory location or storage 'box' designated to hold values of a specific data type whose contents can be modified during program execution.

20
New cards

Assignment Operator (=)

The Java operator that takes the evaluated value of the expression on its right side and stores it into the variable named on its left side.

21
New cards

Casting

An explicit operation that instructs the compiler to convert a value from one data type to another (e.g., (int)2.6), explicitly accepting any resulting loss of precision.

22
New cards

Scanner

A utility class imported from java.util that breaks user or system input into tokens and converts them into primitive types or Strings using methods like nextInt(), nextDouble(), and next().

23
New cards

System.out.format()

A method that prints formatted text using specific formatting specifiers, such as "%.2f" to format floating-point numbers to two decimal places.

24
New cards
<p>ASCII Table</p>

ASCII Table

A standard 7-bit character encoding table that assigns a unique integer value from 0 to 127 to individual characters, letters, punctuation marks, and control codes.

25
New cards

Escape Sequence

A character combination preceded by a backslash (such as \n for newline, \t for tab, or \" for quotes) that represents a special character or command within character and string literals.

26
New cards

String Concatenation (+)

An operation that joins two string operands together into a newly constructed String without modifying the original source strings.

27
New cards

equals()

A method provided on Java objects (such as String) used to compare the actual character contents of two objects for equality rather than comparing memory addresses.

28
New cards

compareTo()

A String method that compares two strings lexicographically, returning a negative integer if the calling string precedes the argument, 0 if equal, or a positive integer if it follows.

29
New cards

Wrapper Class

A class (such as Integer, Double, or Character) that encapsulates a primitive data type into an object, providing utility conversion methods like parseInt() and classification methods like isDigit().

30
New cards

Relational Operators

A set of binary operators (==, !=, <, <=, >, >=) used to compare two values, yielding a boolean result of true or false.

31
New cards

Logical NOT (!)

A unary boolean operator that inverts the truth value of its operand, converting true to false and false to true.

32
New cards

Logical AND (&&)

A binary boolean operator that evaluates to true if and only if both of its operand expressions evaluate to true.

33
New cards

Logical OR (||)

A binary boolean operator that evaluates to true if either or both of its operand expressions evaluate to true.

34
New cards

Logical XOR (^)

A binary boolean operator that evaluates to true if exactly one operand is true and the other is false, returning false when both operands share the same boolean value.

35
New cards

Short-Circuit Evaluation

A rule of boolean expression evaluation where Java skips evaluating the second operand if the outcome of the entire expression is already guaranteed by the first operand (e.g., true || ... or false && ...).

36
New cards

if Statement

A selection control statement that evaluates a boolean condition and executes its associated block of code only when the condition is true.

37
New cards

if-else Statement

A conditional structure providing two mutually exclusive branches, executing the if block when the condition is true and the else block when it is false.

38
New cards

switch Statement

A control flow statement that evaluates an int, char, or String expression and transfers execution directly to the matching literal case label until a break is encountered.

39
New cards

yield

A Java keyword used inside a multi-statement block of a switch expression case to return a resulting value from the switch.

40
New cards

while Loop

A pre-test repetition statement that repeatedly executes its body as long as its controlling boolean condition evaluates to true, typically used when the iteration count is unknown beforehand.

41
New cards

for Loop

A repetition statement whose header integrates initialization, loop continuation condition, and update expressions, making it ideal for tasks with a predetermined number of iterations.

42
New cards

do-while Loop

A post-test repetition statement that executes its loop body first and checks the condition at the end, guaranteeing that the body executes at least once.

43
New cards

Fencepost Error

A common programming error in loops where the loop iterates one time too many or one time too few due to an off-by-one condition boundary.

44
New cards

Array

A homogeneous, static data structure in Java that stores an ordered collection of elements of the exact same data type with a fixed capacity set at instantiation.

45
New cards

Three-Line Swap

A fundamental algorithm pattern used to interchange the contents of two variables x and y using a temporary variable: int temp = x; x = y; y = temp;.

46
New cards

Two-Dimensional Array (2D Array)

A structured array of arrays visualized as a table or grid of rows and columns, declared with two sets of square brackets (type[][]).

47
New cards
<p>Variance</p>

Variance

A statistical measurement describing how spread out a data distribution is from its mean, calculated by the formula σ2=1N∑i=1N(xi−xˉ)2\sigma^2 = \frac{1}{N}\sum_{i=1}^{N}(x_i - \bar{x})^2.

48
New cards

Pure Tone

A sound wave characterized by a single, smooth, unperturbed sine wave that lacks overtones and harmonics.

49
New cards

Sampling Rate

The number of discrete audio wave height measurements recorded per second, standardized in StdAudio at 44,100 Hz44{,}100\text{ Hz}.

50
New cards

StdAudio

A Java audio manipulation library developed by Sedgewick and Wayne that reads, writes, and plays WAV audio samples represented as an array of doubles between −1.0-1.0 and 1.01.0.

51
New cards

StdDraw

A graphics rendering library developed by Sedgewick and Wayne that enables drawing geometric shapes, lines, points, and animations on a Cartesian canvas.

52
New cards

Double Buffering

A graphics technique enabled in StdDraw that performs rendering off-screen and presents the complete frame all at once via show(), eliminating flickering in animations.

53
New cards

Static Method

A class-level method declared with the static keyword that performs an action without being associated with or requiring an instance of an object.

54
New cards

Void Method

A method declared with the void return type that executes statements to perform a task but does not return any value to the caller.

55
New cards

Method Overloading

The practice of defining multiple methods within the same class that share the identical name but have different parameter lists (differing in number, type, or both).

56
New cards

Scope

The defined section of program code where a particular variable is declared, recognized, and accessible.

57
New cards

Binding

The parameter-passing process in Java whereby values of argument expressions from the caller are copied into the parameter variables of the called method.

58
New cards

Object

A concrete entity created in computer memory that encapsulates state (data stored in member variables) and behavior (executable methods).

59
New cards

Class

A blueprint or template in Java that specifies the member variables and methods that characterize any object instantiated from it.

60
New cards

Reference Variable

A variable that stores the memory location of an object rather than storing the actual object data directly within itself.

61
New cards

Alias

A situation where two or more reference variables point to the exact same object in memory, allowing changes made via one reference to affect the other.

62
New cards

Constructor

A special class method invoked using the new keyword whose primary role is to initialize the state of a newly instantiated object.

63
New cards

Accessor

A public method (getter) designed to retrieve and return the value of a private member variable of an object without directly exposing the variable.

64
New cards

Mutator

A public method (setter) designed to modify or update the value of a private member variable of an object.

65
New cards

Class Variable (Static Member)

A field declared with the static keyword in a class, resulting in exactly one copy stored globally with the class rather than separate copies per object instance.

66
New cards

final Keyword

A Java modifier that defines a constant variable or member whose value can be assigned only once and can never be modified thereafter.

67
New cards

Big Oh Notation

A mathematical notation used to classify algorithms according to their worst-case asymptotic running time as the input size nn grows arbitrarily large.

68
New cards
<p>RGB Color Model</p>

RGB Color Model

An additive color system used for computer screens that produces colors by mixing Red, Green, and Blue light intensities ranging from 0 to 255.

69
New cards
<p>CMYK Color Model</p>

CMYK Color Model

A subtractive color system utilized for color printing that combines Cyan, Magenta, Yellow, and Key (Black) inks where adding colors absorbs light and darkens the output.

70
New cards

Luminance

The perceived brightness of a color calculated to convert RGB to grayscale using the formula Value=0.3R+0.59G+0.11B\text{Value} = 0.3R + 0.59G + 0.11B, reflecting human eye sensitivity.

71
New cards

Lossy Compression

A data compression method used in JPEG images that permanently discards certain image details to dramatically reduce file size.

72
New cards

Lossless Compression

A data compression method used in PNG images that reduces file size without discarding any image information, allowing perfect reconstruction of the original pixels.

73
New cards

Picture Class

A class from the Princeton standard library that provides an interface to manipulate images as 2D arrays of Color pixels using methods like get(x, y) and set(x, y, c).