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
What does an OS do
Controls the peripheral devices Supports multitasking Allocates memory to each program Prevents one program from damaging another program
26
What is multitasking
Multiple programs executing simultaneously
27
What are some examples of peripheral devices
Disks, keyboard, mouse, etc
28
What is the function of application software
Written to perform specific tasks
29
Where does the application software run in relation to the operating system
Runs on top of the operating system
30
What are some examples of application software
word processor, spreadsheet, database management system, games, internet browser
31
What is the purpose of a network
To connect two or more computers so they can share files or devices
32
Describe a LAN network
Computers located geographically close to one another
33
How are LAN networks connected
Wirelessly or through cables
34
What do servers provide
Access to database Downloading of files Email delivery
35
What is the internet
A network of networks
36
Where did the internet evolve from
the ARPANET military research project
37
What do web servers do
Website servers deliver Internet content to clients via a browser
38
What is used to identify web pages
A URL
39
What is a URL
Uniform Resource Locator
40
What is a LAN
A local area network
41
What is the purpose of DNS servers
Translates a URL to an Internet Protocol (IP) address
42
What is a DNS
Domain name system
43
Describe Binary numbers
Expressed in base 2 system (two digits are 0 and 1)
44
Describe Hexadecimal numbers
Base 16 systems used as shorthand for representing binary numbers
45
What is the unicode character set used for
Used to represent characters
46
How can a decimal or base 10 number be represented
As the sum of powers of 10 (the base) with coefficients in the base 10 alphabet (0-9)
47
Whats step one of three from converting from decimal to binary
Find the largest power of 2 that is smaller than or equal to the decimal number
48
Whats step two of three from converting from decimal to binary
Insert 1 in the binary number for the position equivalent to that power of 2
49
Whats step three of three from converting from decimal to binary
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
Describe hexadecimal numbers
Base 16 number system Uses digits 0-9 and lets A-F One hexadecimal digit can express decimal values 0-15
51
How many bits can one hexadecimal digit represent
4 bits
52
How many bits can one unicode character set
Each character is stored as 16 bits.
53
The ASCII character set stores each character as how many bits
7 bits
54
What are the three levels of programming languages
Machine Language Assembly Language High-Level Languages
55
Describe Machine Language
Written using CPU instruction set | Difficult to write and not portable
56
Describe Assembly Language
– Written using mnemonics for instructions and symbolic names for variables – Assembler converts code to machine language – Easier to write, but still not portable
57
What are some examples of High-Level Languages
Fortran, COBOL, Ruby, Objective, C, C++, PHP, Python and Java
58
Describe High Level Languages
Highly symbolic Portable among CPU architectures Languages can be designed for specific uses
59
What are Ruby, PHP and Python used for
Internet Applications
60
What was Fortran used for
Scientific applications
61
What was COBOL used for
Business applications
62
What is a compiler used for
A compiler converts source code (instructions) into machine language and then the program is executed
63
What does an interpreter do
Interpreter converts instructions into machine language at run time as instructions are executed
64
Describe an interpreter vs a compiler
Usually executes more slowly than compiled program
65
Describe Java
Combination of compiler and interpreter
66
What is the function of a compiler
Converts source code into byte codes
67
What is byte codes
an instruction set for a virtual machine-indendent processor
68
What does a Java Virtual Machine do at run time
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
What is the class function used for in object-oriented programming
A tool for encapsulating data and operations into one unit
70
What is another word for operations
methods
71
What is class used to define
Class is used to define a template or model for creating and manipulating objects
72
What is an object
Data created using the class and its methods,
73
What is an object in relation to the class
An object is an instance of the class
74
What is it called when you create an object
Instantiation
75
What is the advantage to OBJECT ORIENTED PROGRAMMING
Well-written classes can be reused in new applications
76
Why would reusing the OOP be advantageous
Shortens development time because programmers don't need to write that code again
77
When was the Java language created and by whom
It was created by Sun Microsystems in 1995
78
What is the java syntax based on
C++
79
Describe the orientation of the java language
Object oriented
80
What are some general java features
Supports internet applications Provides an extensive library of classes Is portable among platforms Has built-in networking
81
What are applets (java program)
Small programs designed to add interactivity to websites | Downloaded with the webpage and launched by an internet browser
82
What are Servlets (java program)
Run by web server on the server | Typically generate web content
83
What are applications (java program)
Programs that run standalone on a client
84
What is programming in general terms
Programming is translating a problem into ordered steps consisting of operations a computer can perform
85
What are some examples of operations that computers can perform
``` Input Perform Calculations Compare values Move data Output ```
86
What is the name of the order of executions of instructions called
Flow of control
87
What is pseudocode
English-like language for specifying the design of a program.
88
What is the benefit to using pseudocode
Programmers can concentrate on design of a program without worrying about Java language rules
89
What is syntax
Language rules
90
What happens to pseudocode once it is written
It then needs to be converted into Java code
91
What is Sequential processing (in relation to four types of flow of control)
It executes instructions in order
92
What is Method call (in relation to four types of flow of control)
It jumps to code in method and then returns
93
What is Selection (in relation to four types of flow of control)
Choose code to execute based on data value
94
What is looping or Iteration (in relation to repeat operations for multiple data values)
Repeat operations for multiple data values
95
What does calling the method do
Calling the method executes the method
96
What can methods use
They can take arguments (data to use) and return values
97
What is an IDE
Integrated Development environment
98
What is an IDE used for
Typically programmers use an IDE to develop programs
99
What does an IDE consist of
an IDE consists of a program editor, a compiler, and a run-time environment integrated via a Graphical User Interface
100
What are some common errors in java
* *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
What are the three types of Program Errors
Compiler Errors Run-time Errors Logic Errors
102
What finds compiler errors
The compiler
103
What are compiler errors usually caused by
Usually caused by incorrect syntax or spelling
104
What finds Run-time errors
Reported by the JVM
105
What are Run-time errors usually caused by
Usually caused by incorrect use of prewritten classes or invalid data
106
What finds logic errors
Found by testing the program
107
What are logic errors usually caused by
Incorrect program design or incorrect execution of the design
108
What are JAR files
Java programs are typically distributed as JARs
109
What does JAR stand for
JAR Archive
110
What is a .jar extension usually associated with
The JVM
111
What happens if a user double clicks on the JAR file
The program starts executing