Computer Science Units 1–3: Introduction to CS, Using Objects, and Fundamental Data Types

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

1/33

flashcard set

Earn XP

Description and Tags

Practice fill-in-the-blank flashcards covering computer hardware architecture, binary and number systems, high-level languages, Java programming basics, the software development life cycle, GridWorld objects, primitive data types, arithmetic operators, casting, Scanner input, Math methods, and printf formatting.

34 Terms

1
New cards
<p>The computer hardware component shown here, known as the "brain" of the computer that controls programs, performs arithmetic, and manages data, is the __________.</p>

The computer hardware component shown here, known as the "brain" of the computer that controls programs, performs arithmetic, and manages data, is the __________.

CPU

2
New cards

Computer memory that loses its stored data when the power is turned off is classified as __________.

volatile

3
New cards

The smallest unit of information processed on a computer, consisting of a single digit (00 or 11), is called a(n) __________.

bit

4
New cards

One Gigabyte is equal to 2302^{30} bytes, which corresponds exactly to __________ bytes.

1,073,741,8241,073,741,824

5
New cards

Converting a binary number to hexadecimal requires grouping binary digits into groups of __________ digits from right to left.

44

6
New cards

In early computers, a program called a(n) __________ was required to translate assembly language into CPU-executable machine language.

assembler

7
New cards

The structured high-level programming language developed in the late 1950s for business purposes by Grace Hopper and the Navy is __________.

COBOL

8
New cards

The Java programming language was developed by James Gosling and his team at Sun in the year __________.

19951995

9
New cards

In the design phase of software development, continuing to refine a design one step at a time until complete is known as __________.

Stepwise Refinement

10
New cards

Testing each individual class by itself during the implementation phase is termed a(n) __________.

Unit Test

11
New cards

Compiling Java source code creates a bytecode file that is executed by the __________.

Java Virtual Machine (JVM)

12
New cards

In Java string literals, the escape sequence used to insert a tab character is __________.

\t

13
New cards

An error detected by the compiler resulting from a violation of programming language rules is a(n) __________ error.

syntax

14
New cards
<p>In the GridWorld grid shown, row and column numbering is $$0$$-based, meaning the upper-left corner coordinates are __________.</p>

In the GridWorld grid shown, row and column numbering is 00-based, meaning the upper-left corner coordinates are __________.

(0,0)(0, 0)

15
New cards

A method that inspects an object without modifying its internal data is classified as a(n) __________ method.

accessor

16
New cards

A method that modifies the internal data or state of an object is classified as a(n) __________ method.

mutator

17
New cards

Creating or constructing an object by invoking a class constructor with the new operator is called __________.

instantiation

18
New cards

When two or more object variables store a reference to the exact same object in memory, they are known as __________.

aliases

19
New cards

Classes defined in the __________ package are automatically available and do not require an explicit import statement.

java.lang

20
New cards

When a class provides multiple definitions for a method with different parameter signatures, the method is said to be __________.

overloaded

21
New cards

The method of the String class that returns the total count of characters, including whitespace, is __________.

length()

22
New cards

The primitive integer data type in Java that occupies exactly 11 byte of memory and stores values from −128-128 to 127127 is __________.

byte

23
New cards

In Java, the expression 7/27 / 2 evaluates to __________ because both operands are integers.

33

24
New cards

In Java integer remainder division, the expression −17%5-17 \% 5 evaluates to __________.

−2-2

25
New cards

Attempting integer division by zero in Java throws a run-time exception named __________.

ArithmeticException

26
New cards

Dividing a floating-point number by 0.00.0 in Java does not crash the program but instead yields the value __________.

Infinity

27
New cards

To declare a constant identifier whose value cannot be reassigned once initialized, Java requires the reserved word __________.

final

28
New cards

Explicitly forcing Java to convert a value from one data type to another, such as converting a double to an int, is called __________.

casting

29
New cards

Due to left-to-right evaluation, the Java expression "hello" + 4 + 2 evaluates to the string __________.

"hello42"

30
New cards

When using a Scanner object, calling nextLine() immediately after nextInt() or nextDouble() will read an empty string unless you first __________ the newline character.

flush

31
New cards

A method declared with the modifier __________ belongs directly to the class rather than to a specific object instance.

static

32
New cards

The standard Java formula to generate a pseudo-random integer in the closed range [low, high] using Math.random() is __________.

(int)(Math.random()∗(high+1−low))+low(int) (Math.random() * (high + 1 - low)) + low

33
New cards

In a printf format specifier, the conversion character used to format a decimal (base 10) integer is __________.

d

34
New cards

In a printf format specifier, the optional flag character that causes the output to be left-aligned is __________.

-