Chapter 1 PDF Flashcards

1
Q

What is programming

A

Creating an application, such as a ticketing kiosk, a game, a restaurant ordering system, or another business application.

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

What are some basic computer concepts

A

Hardware
Operating Systems
Application Software
Computer networks and the Internet

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

What is the purpose of the CPU

A

Executes the instructions of the program

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

What is the purpose of the Hard Disk and CD ROM

A

Store instructions and data so the program can be loaded into memory and executed

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

What is the purpose of the main memory of the computer

A

Stores the program instructions and data while executing

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

What is the main purpose of the Keyboard and mouse

A

Used for data input

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

What is the purpose of the monitor

A

Used to display output from a program

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

What is the purpose of the arithmetic logic unit inside the CPU

A

Performs interger arithmetic and logical operations

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

What is the purpose of the floating point unit inside of the CPU

A

Performs floating point operations

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

What is the purpose of harder registers inside of the CPU

A

Stores data and memory addresses

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

What is the purpose of an instruction pointer in the CPU

A

Keeps track of the next instruction to execute

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

What is the purpose of the CPU Instructions

A
  • Move data from one location to another
  • Perform a calculation
  • Compare data
  • Change the sequence of instructions to execute (the flow of control)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the first step in the 5 step Fetch-Decode-Execute Cycle?

A

The program counter keeps track of the next instruction to be executed

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

What is the second step Fetch-Decode-Execute Cycle?

A

The CPU fetches the next instruction from memory and places it into the Instruction Register.

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

What is the third step Fetch-Decode-Execute Cycle?

A

The instruction is decoded (is the instruction a move, load, store, etc?)

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

What is the fourth step Fetch-Decode-Execute Cycle?

A

The instructions are executed

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

What is the fifth step Fetch-Decode-Execute Cycle?

A

This Fetch-Decode-Execute Cycle repeats until the program ends

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

What is CPU speed rated in

A

MHz or GHz

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

What occurs in one clock cycle of a CPU

A

Fetches an instruction from memory,
decodes the instruction,
executes the instruction

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

What does pipelining a CPU do

A

Pipelining allows overlap of operations to improve performance

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

How many bits is inside of memory cells

A

One bit

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

What can a bit’s value be

A

0 or 2

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

What does a byte represent

A

8 bits

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

What does an OS do when computer is turned on

A

Boots when the computer is turned on and runs continuously

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

What does an OS do

A

Controls the peripheral devices
Supports multitasking
Allocates memory to each program
Prevents one program from damaging another program

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

What is multitasking

A

Multiple programs executing simultaneously

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

What are some examples of peripheral devices

A

Disks, keyboard, mouse, etc

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

What is the function of application software

A

Written to perform specific tasks

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

Where does the application software run in relation to the operating system

A

Runs on top of the operating system

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

What are some examples of application software

A

word processor, spreadsheet, database management system, games, internet browser

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

What is the purpose of a network

A

To connect two or more computers so they can share files or devices

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

Describe a LAN network

A

Computers located geographically close to one another

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

How are LAN networks connected

A

Wirelessly or through cables

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

What do servers provide

A

Access to database
Downloading of files
Email delivery

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

What is the internet

A

A network of networks

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

Where did the internet evolve from

A

the ARPANET military research project

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

What do web servers do

A

Website servers deliver Internet content to clients via a browser

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

What is used to identify web pages

A

A URL

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

What is a URL

A

Uniform Resource Locator

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

What is a LAN

A

A local area network

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

What is the purpose of DNS servers

A

Translates a URL to an Internet Protocol (IP) address

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

What is a DNS

A

Domain name system

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

Describe Binary numbers

A

Expressed in base 2 system (two digits are 0 and 1)

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

Describe Hexadecimal numbers

A

Base 16 systems used as shorthand for representing binary numbers

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

What is the unicode character set used for

A

Used to represent characters

46
Q

How can a decimal or base 10 number be represented

A

As the sum of powers of 10 (the base) with coefficients in the base 10 alphabet (0-9)

47
Q

Whats step one of three from converting from decimal to binary

A

Find the largest power of 2 that is smaller than or equal to the decimal number

48
Q

Whats step two of three from converting from decimal to binary

A

Insert 1 in the binary number for the position equivalent to that power of 2

49
Q

Whats step three of three from converting from decimal to binary

A

Subtract that power of 2 from the decimal number. Repeat steps 1-3 until you reach 0
insert a coefficient of 0 for any missing powers of 2

50
Q

Describe hexadecimal numbers

A

Base 16 number system
Uses digits 0-9 and lets A-F
One hexadecimal digit can express decimal values 0-15

51
Q

How many bits can one hexadecimal digit represent

A

4 bits

52
Q

How many bits can one unicode character set

A

Each character is stored as 16 bits.

53
Q

The ASCII character set stores each character as how many bits

A

7 bits

54
Q

What are the three levels of programming languages

A

Machine Language
Assembly Language
High-Level Languages

55
Q

Describe Machine Language

A

Written using CPU instruction set

Difficult to write and not portable

56
Q

Describe Assembly Language

A

– Written using mnemonics for instructions and symbolic names for variables
– Assembler converts code to machine language
– Easier to write, but still not portable

57
Q

What are some examples of High-Level Languages

A

Fortran, COBOL, Ruby, Objective, C, C++, PHP, Python and Java

58
Q

Describe High Level Languages

A

Highly symbolic
Portable among CPU architectures
Languages can be designed for specific uses

59
Q

What are Ruby, PHP and Python used for

A

Internet Applications

60
Q

What was Fortran used for

A

Scientific applications

61
Q

What was COBOL used for

A

Business applications

62
Q

What is a compiler used for

A

A compiler converts source code (instructions) into machine language and then the program is executed

63
Q

What does an interpreter do

A

Interpreter converts instructions into machine language at run time as instructions are executed

64
Q

Describe an interpreter vs a compiler

A

Usually executes more slowly than compiled program

65
Q

Describe Java

A

Combination of compiler and interpreter

66
Q

What is the function of a compiler

A

Converts source code into byte codes

67
Q

What is byte codes

A

an instruction set for a virtual machine-indendent processor

68
Q

What does a Java Virtual Machine do at run time

A

At run time the Java Virtual Machine interprets the byte codes and converts them into the machine language for the platform on which the program is running

69
Q

What is the class function used for in object-oriented programming

A

A tool for encapsulating data and operations into one unit

70
Q

What is another word for operations

A

methods

71
Q

What is class used to define

A

Class is used to define a template or model for creating and manipulating objects

72
Q

What is an object

A

Data created using the class and its methods,

73
Q

What is an object in relation to the class

A

An object is an instance of the class

74
Q

What is it called when you create an object

A

Instantiation

75
Q

What is the advantage to OBJECT ORIENTED PROGRAMMING

A

Well-written classes can be reused in new applications

76
Q

Why would reusing the OOP be advantageous

A

Shortens development time because programmers don’t need to write that code again

77
Q

When was the Java language created and by whom

A

It was created by Sun Microsystems in 1995

78
Q

What is the java syntax based on

A

C++

79
Q

Describe the orientation of the java language

A

Object oriented

80
Q

What are some general java features

A

Supports internet applications
Provides an extensive library of classes
Is portable among platforms
Has built-in networking

81
Q

What are applets (java program)

A

Small programs designed to add interactivity to websites

Downloaded with the webpage and launched by an internet browser

82
Q

What are Servlets (java program)

A

Run by web server on the server

Typically generate web content

83
Q

What are applications (java program)

A

Programs that run standalone on a client

84
Q

What is programming in general terms

A

Programming is translating a problem into ordered steps consisting of operations a computer can perform

85
Q

What are some examples of operations that computers can perform

A
Input
Perform Calculations
Compare values
Move data
Output
86
Q

What is the name of the order of executions of instructions called

A

Flow of control

87
Q

What is pseudocode

A

English-like language for specifying the design of a program.

88
Q

What is the benefit to using pseudocode

A

Programmers can concentrate on design of a program without worrying about Java language rules

89
Q

What is syntax

A

Language rules

90
Q

What happens to pseudocode once it is written

A

It then needs to be converted into Java code

91
Q

What is Sequential processing (in relation to four types of flow of control)

A

It executes instructions in order

92
Q

What is Method call (in relation to four types of flow of control)

A

It jumps to code in method and then returns

93
Q

What is Selection (in relation to four types of flow of control)

A

Choose code to execute based on data value

94
Q

What is looping or Iteration (in relation to repeat operations for multiple data values)

A

Repeat operations for multiple data values

95
Q

What does calling the method do

A

Calling the method executes the method

96
Q

What can methods use

A

They can take arguments (data to use) and return values

97
Q

What is an IDE

A

Integrated Development environment

98
Q

What is an IDE used for

A

Typically programmers use an IDE to develop programs

99
Q

What does an IDE consist of

A

an IDE consists of a program editor, a compiler, and a run-time environment integrated via a Graphical User Interface

100
Q

What are some common errors in java

A
  • *Java is case sensitive
  • *The Source file must be saved with the same name as the class name with the .java extension
  • *The class name and the source file name must match exactly, including capitalization
101
Q

What are the three types of Program Errors

A

Compiler Errors
Run-time Errors
Logic Errors

102
Q

What finds compiler errors

A

The compiler

103
Q

What are compiler errors usually caused by

A

Usually caused by incorrect syntax or spelling

104
Q

What finds Run-time errors

A

Reported by the JVM

105
Q

What are Run-time errors usually caused by

A

Usually caused by incorrect use of prewritten classes or invalid data

106
Q

What finds logic errors

A

Found by testing the program

107
Q

What are logic errors usually caused by

A

Incorrect program design or incorrect execution of the design

108
Q

What are JAR files

A

Java programs are typically distributed as JARs

109
Q

What does JAR stand for

A

JAR Archive

110
Q

What is a .jar extension usually associated with

A

The JVM

111
Q

What happens if a user double clicks on the JAR file

A

The program starts executing