CPS quiz 1 Flashcards

(45 cards)

1
Q

Computer’s major components

A

CPU, memory, storage device, communication
device, input device, output device

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

CPU speed

A

hertz (Hz), megahertz (MHz), gigahertz (GHz)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Communication device

A

transmitting signals over wire or wirelessly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Systems software

A

Operating System (OS) such as Windows or Mac OS X

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Machine language

A

computers can execute instructions written in machine language,
however hard to program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Assembly language

A

developed to make programming easier but are still harder to code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Assembler

A

translates assembly language to machine language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

High-level language

A

English-like and easy to learn and program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Compiler

A

translates high-level language to machine language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Java

A

High-level language
Developed by Sun Microsystems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Application Program Interface (API)

A

the library which contains all predefined
resources which can be used by developers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Java Development Toolkit (JDK)

A

consists of separate programs for compiling, testing and
running programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Java Runtime Environment (JRE)

A

program for running Java programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Integrated Development Environments (IDE)

A

software to make it easier to write, test and
run programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Java Class

A

public class ClassName {
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Main Method

A

public static void main(String[] args) {
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Print Statement

A

System.out.print. and System.out.println

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

source code

A

is the java class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

JVM

A

Java virtual machine

20
Q

syntax errors

A

results from writing code incorrectly and is detected by the compiler. Ex: missing semicolon at the end of a statement

21
Q

Runtime Errors

A

error which happens when the program is running which causes the program to abort.
 Ex: the program asks the user to enter a number but the user enters a word instead

22
Q

Logic Errors

A

the program runs but the programmer coded incorrect instructions which produces
incorrect results
 Ex: forgetting to include a space inside the double quotes in a print statement and the
output is all squished together.

23
Q

variables

A

storage location in the computer’s memory where a value may be stored. Values can be
changed in the program

24
Q

Constant

A

a constant is used to store a value in a program which does not change

25
data type
is the kind of data stored in a variable (ex. integers (byte, short, int, long); real numbers (float, double))
26
Numeric Operators
+, –, *, /, %
27
Increment and Decrement Operators
++var, var++, --var, var—
28
Augmented Assignment Operators
+=, -=, *=, /=, %=
29
two types of import statements
Specific import o Wildcard import
30
three types of conversions
assignment conversion - Ex: double y = 5; // y is 5.0 Arithmetic promotion - Ex: System.out.print(5 / 2.0); // prints 2.0 Casting - Ex: int dollars = (int)13.75 // dollars is 13
31
scanner class
gets user input, java.util.Scanner
32
math class
Constants  Math.PI o Exponent methods  Math.pow(a, b)
33
a program and its data must be moved into its____ before it can be executed by the CPU
memory
34
one gigabyte
is 1 billion bytes
35
Which of the following are storage devices? Please select all
portable disk hard disk flash stick CD-ROM
36
is a device to connect a computer to a local area network (LAN).
NIC
37
Due to security reasons, Java ___________ cannot run from a Web browser in the new version of Java.
applets
38
______ is not an object-oriented programming language.
C
39
________ is architecture-neutral.
Java
40
Every statement in a program must end with a semicolon.
True
41
The JDK command to just compile a class (not run) in the file Test.java is
javac Test.java
42
Which JDK command is correct to run a Java application in ByteCode.class?
java ByteCode
43
Java compiler translates Java source code into _________.
Java bytecode
44
A block is enclosed inside __________.
braces
45