Module 1 Flashcards

(182 cards)

1
Q

What is programming?

A

Creating (or developing) software, which contains instructions that tell a computer what to do

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

What is software?

A

Instructions that tell a computer or computerized device what to do

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

What are the two main components of a computer?

A

Hardware (visible physical elements) and software (invisible instructions)

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

What are the 6 major hardware components of a computer?

A

CPU, Memory, Storage devices, Input devices, Output devices, Communication devices

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

What does CPU stand for?

A

Central Processing Unit

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

What are the two components of a CPU?

A

Control unit and arithmetic/logic unit

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

What does the control unit do?

A

Controls and coordinates the actions of other components

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

What does the arithmetic/logic unit do?

A

Performs numeric operations and logical operations (comparisons)

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

What is the unit of measurement for CPU speed?

A

Hertz (Hz)

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

What is 1 Hz equal to?

A

1 pulse per second

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

What does MHz stand for?

A

Megahertz (1 million pulses per second)

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

What does GHz stand for?

A

Gigahertz (1 billion pulses per second)

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

What is a core in a CPU?

A

The part of the processor that performs reading and executing of instructions

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

What is a multicore CPU?

A

A single component with two or more independent cores

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

What is a bit?

A

A binary digit (0 or 1)

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

What is a byte?

A

A unit composed of 8 bits

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

What is a kilobyte (KB)?

A

About 1,000 bytes

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

What is a megabyte (MB)?

A

About 1 million bytes

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

What is a gigabyte (GB)?

A

About 1 billion bytes

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

What is a terabyte (TB)?

A

About 1 trillion bytes

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

What is memory used for?

A

Storing programs and data that the program is working with

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

What does RAM stand for?

A

Random-Access Memory

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

Why is memory called RAM?

A

Because bytes can be accessed in any order

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

What happens to memory when power is turned off?

A

All information is lost (memory is volatile)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are the 4 main types of storage devices?
Magnetic disk drives, Optical disc drives, USB flash drives, Cloud storage
26
What does CD stand for?
Compact Disc
27
What are the 3 types of CDs?
CD-ROM, CD-R, CD-RW
28
What does DVD stand for?
Digital Versatile Disc or Digital Video Disc
29
How much can a standard CD hold?
Up to 700 MB
30
How much can a standard DVD hold?
4.7 GB
31
What does USB stand for?
Universal Serial Bus
32
What are the most common input devices?
Keyboard and mouse
33
What are the most common output devices?
Monitors and printers
34
What are function keys?
Keys located across the top of keyboard, prefaced with letter F
35
What is a modifier key?
Special key (Shift, Alt, Ctrl) that modifies action of another key
36
What is screen resolution?
Number of pixels in horizontal and vertical dimensions
37
What are pixels?
Tiny dots that form an image on screen (picture elements)
38
What is dot pitch?
Amount of space between pixels, measured in millimeters
39
What does NIC stand for?
Network Interface Card
40
What does LAN stand for?
Local Area Network
41
What is Wi-Fi?
Wireless networking technology for connecting devices to Internet
42
What is machine language?
Computer's native language consisting of binary instructions
43
What is assembly language?
Programming language using mnemonics to represent machine instructions
44
What is an assembler?
Program that translates assembly language into machine code
45
What is a high-level programming language?
Platform-independent language similar to English
46
What is a statement in programming?
An instruction in a high-level programming language
47
What is source code?
A program written in a high-level language
48
What is an interpreter?
Translates and executes program one statement at a time
49
What is a compiler?
Translates entire source code into machine-code file for execution
50
What does OS stand for?
Operating System
51
What are the major tasks of an operating system?
Controlling system activities, Allocating resources, Scheduling operations
52
What is multiprogramming?
Multiple programs sharing the same CPU
53
What is multithreading?
Single program executing multiple tasks simultaneously
54
What is multiprocessing?
Running multiple programs concurrently using multiple processors
55
Who developed Java?
James Gosling at Sun Microsystems
56
Which company owns Java now?
Oracle (purchased Sun Microsystems in 2010)
57
What was Java originally called?
Oak
58
What year was Java designed?
1991
59
What year was Java redesigned for web applications?
1995
60
What are Java applets?
Java programs that run from a web browser
61
What does JDK stand for?
Java Development Toolkit
62
What does JRE stand for?
Java Runtime Environment
63
What does IDE stand for?
Integrated Development Environment
64
What are the 3 editions of Java?
Java SE (Standard Edition), Java EE (Enterprise Edition), Java ME (Micro Edition)
65
What is Java SE used for?
Developing client-side applications for desktop
66
What is Java EE used for?
Developing server-side applications
67
What is Java ME used for?
Developing applications for mobile devices
68
What is the latest Java version used in this book?
Java SE 11 (Java 11)
69
What is a console in programming?
Text entry and display device of computer
70
What does console input mean?
Receiving input from keyboard
71
What does console output mean?
Displaying output on monitor
72
Every Java program must have at least one what?
Class
73
What is the naming convention for Java classes?
Start with uppercase letter
74
What method is the entry point where program begins execution?
main method
75
What is the signature of the main method?
public static void main(String[] args)
76
What is a string in programming?
A sequence of characters
77
How must strings be enclosed?
In double quotation marks
78
What is the statement terminator in Java?
Semicolon (;)
79
What are keywords?
Words with specific meaning to compiler, cannot be used for other purposes
80
List 4 Java keywords from the examples.
public, static, void, class
81
What are the two types of comments in Java?
Line comments (//) and block comments (/* */)
82
What do line comments start with?
Two slashes (//)
83
How are block comments enclosed?
Between /* and */
84
What is a block in Java programming?
Group of components surrounded by braces { }
85
Is Java case sensitive?
Yes
86
What would be wrong with writing 'Main' instead of 'main'?
Java is case sensitive, so 'Main' is incorrect
87
What are syntax errors?
Errors in code construction detected by compiler
88
What are common syntax errors?
Missing semicolon, missing braces, missing quotation marks, misspelled names
89
What are runtime errors?
Errors that cause program to terminate abnormally during execution
90
What are logic errors?
When program doesn't perform as intended
91
Which type of error is hardest to find?
Logic errors
92
What file extension do Java source files have?
.java
93
What file extension do Java bytecode files have?
.class
94
What command compiles Java programs?
javac
95
What command runs Java programs?
java
96
What is Java bytecode?
Low-level language that JVM can interpret
97
What does JVM stand for?
Java Virtual Machine
98
What is the main advantage of Java bytecode?
Can run on any platform with JVM (platform independent)
99
What error occurs if you run a class that doesn't exist?
NoClassDefFoundError
100
What error occurs if main method is missing or misspelled?
NoSuchMethodError
101
What is the class loader?
Program that loads bytecode into memory
102
What is the bytecode verifier?
Program that checks validity of bytecode and security
103
What are the two popular Java IDEs mentioned?
NetBeans and Eclipse
104
What is a project in an IDE?
Like a folder to hold Java programs and supporting files
105
What is programming style?
What programs look like - formatting and appearance
106
What is documentation in programming?
Body of explanatory remarks and comments about a program
107
What are javadoc comments?
Special comments that begin with /** and end with */
108
What command extracts javadoc comments?
javadoc command
109
What are the two popular block styles?
Next-line style and end-of-line style
110
Which block style does this book use?
End-of-line style
111
What should be added around binary operators?
Single space on both sides
112
What is the difference between print() and println()?
println() moves to next line, print() stays on same line
113
What multiplication operator does Java use?
* (asterisk)
114
What is the file naming rule for Java classes?
Source file must have same exact name as public class name
115
What happens when you compile Welcome.java?
Creates Welcome.class file
116
Can you use java Welcome.class to run a program?
No, use java Welcome (without .class extension)
117
What does 'Write once, run anywhere' mean for Java?
Java programs can run on any platform with JVM
118
What is the bus in computer hardware?
Subsystem that interconnects computer components
119
What is the motherboard?
Circuit case that connects all parts of computer together
120
What are transistors?
Tiny electric switches on semiconductor chips
121
What is an encoding scheme?
Set of rules for translating characters and numbers into computer data
122
In ASCII encoding, how is character 'C' represented?
01000011 (in 1 byte)
123
What is the typical RAM size in modern computers?
8 to 32 GB
124
What is a hard disk drive used for?
Permanently storing data and programs
125
What is the storage capacity range of modern hard disks?
1 terabyte to 4 terabytes
126
What is CD-ROM?
Compact Disc Read-Only Memory (prepressed disc)
127
What is CD-R?
CD-Recordable (write-once medium)
128
What is CD-RW?
CD-ReWritable (can write and overwrite like hard disk)
129
What are the two types of DVDs?
DVD-R (Recordable) and DVD-RW (ReWritable)
130
What is current storage capacity of USB flash drives?
Up to 256 GB
131
Name two cloud storage services mentioned.
Google Docs and Microsoft OneDrive
132
What is a touchscreen?
Integrated with monitor to enable finger input and control
133
What is a dial-up modem?
Uses phone line to connect to Internet at up to 56,000 bps
134
What is DSL?
Digital Subscriber Line - uses phone line, 20 times faster than dial-up
135
What is a cable modem?
Uses cable company's cable line, generally faster than DSL
136
What speed can 1000BaseT NIC achieve?
1,000 million bits per second (mbps)
137
What does bps stand for?
Bits per second
138
What does mbps stand for?
Million bits per second
139
Is assembly language high-level or low-level?
Low-level (close to machine language)
140
Are high-level languages platform independent?
Yes
141
What does BASIC stand for?
Beginner's All-purpose Symbolic Instruction Code
142
What does COBOL stand for?
COmmon Business Oriented Language
143
What does FORTRAN stand for?
FORmula TRANslation
144
Which company developed C#?
Microsoft
145
Which company developed Visual Basic?
Microsoft
146
What is Python good for?
Writing short programs (scripting language)
147
What language is used for Android development?
Java
148
What does API stand for?
Application Program Interface
149
What is the Java library also known as?
API (Application Program Interface)
150
Where can you find Java language specification?
docs.oracle.com/javase/specs/
151
Where can you find Java API documentation?
https://docs.oracle.com/en/java/javase/11/
152
What does the JRE do?
Runs Java programs (Java Runtime Environment)
153
Name two popular Java development tools.
NetBeans and Eclipse
154
What does GUI in IDE context typically refer to?
Graphical User Interface for development
155
What special characters denote a block?
Opening brace { and closing brace }
156
What special characters are used with methods?
Opening and closing parentheses ( )
157
What special characters denote an array?
Opening and closing brackets [ ]
158
What special characters enclose strings?
Opening and closing quotation marks \" \"
159
What does System.out.println() do?
Displays string and moves to next line
160
What does System.out.print() do?
Displays string without moving to next line
161
In the expression (10.5 + 2 * 3) / (45 - 3.5), what is the result?
0.39759036144578314
162
What happens if you have mismatched braces?
Compile error
163
What happens if you forget a semicolon?
Compile error
164
What happens if you forget closing quotation mark?
Compile error
165
What creates the .class file?
Java compiler (javac)
166
What reads the .class file?
Java Virtual Machine (JVM)
167
Is Java compiled or interpreted?
Both - compiled to bytecode, then interpreted by JVM
168
What makes Java platform independent?
JVM interprets bytecode on any platform
169
What is the benefit of using an IDE?
Integrated editing, compiling, building, debugging in one interface
170
What should you do immediately after typing opening brace?
Type closing brace to prevent missing-brace error
171
Why is good programming style important?
Reduces chance of errors and makes programs easy to read
172
What should comments be?
Concise so they don't crowd the program
173
How much should subcomponents be indented?
At least two spaces more than the construct they're nested in
174
What is the most common cause of runtime errors?
Input mistakes
175
When do logic errors occur?
When program doesn't perform as intended
176
Which errors are easiest to find and correct?
Syntax errors (compiler indicates location and cause)
177
What should you do when fixing multiple compile errors?
Fix errors from top line and work downward
178
What can cause data-type runtime errors?
Entering string when program expects number
179
What causes division by zero runtime error?
When divisor is zero for integer divisions
180
In Celsius to Fahrenheit conversion, why is 9/5 wrong?
Integer division gives 1 instead of 1.8
181
What should be used instead of 9/5?
9.0/5 for floating-point division
182
What are the 4 common errors for new programmers?
Missing closing brace, missing semicolon, missing quotation marks, misspelling names