CPS quiz 1 Flashcards

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
Q

data type

A

is the kind of data stored in a variable (ex. integers (byte, short, int, long);
real numbers (float, double))

26
Q

Numeric Operators

A

+, –, *, /, %

27
Q

Increment and Decrement Operators

A

++var, var++, –var, var—

28
Q

Augmented Assignment Operators

A

+=, -=, *=, /=, %=

29
Q

two types of import statements

A

Specific import

o Wildcard import

30
Q

three types of conversions

A

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
Q

scanner class

A

gets user input, java.util.Scanner

32
Q

math class

A

Constants
 Math.PI
o Exponent methods
 Math.pow(a, b)

33
Q

a program and its data must be moved into its____ before it can be executed by the CPU

A

memory

34
Q

one gigabyte

A

is 1 billion bytes

35
Q

Which of the following are storage devices? Please select all

A

portable disk
hard disk
flash stick
CD-ROM

36
Q

is a device to connect a computer to a local area network (LAN).

A

NIC

37
Q

Due to security reasons, Java ___________ cannot run from a Web browser in the new version of Java.

A

applets

38
Q

______ is not an object-oriented programming language.

A

C

39
Q

________ is architecture-neutral.

A

Java

40
Q

Every statement in a program must end with a semicolon.

A

True

41
Q

The JDK command to just compile a class (not run) in the file Test.java is

A

javac Test.java

42
Q

Which JDK command is correct to run a Java application in ByteCode.class?

A

java ByteCode

43
Q

Java compiler translates Java source code into _________.

A

Java bytecode

44
Q

A block is enclosed inside __________.

A

braces

45
Q
A