Vocab from the book Flashcards

(154 cards)

1
Q

What is software?

A

Computer programs

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

Programmer or software developer

A

Person with the training and skills necessary to design, create, and test computer programs.

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

Hardware

A

The physical components of a computer.

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

What does the central processing unit (CPU) do?

A

It’s the part of the computer that runs programs.

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

What are microprocessors?

A

The CPUs of today. They fit in the palm of your hand!

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

What does the control unit do?

A

Coordinates all of the computer’s operations

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

What does the Arithmetic and logic unit (ALU) do?

A

Performs mathematical operations.

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

What is the fetch/decode/execute cycle?

A

Fetch: CPU fetches from it’s memory the next instruction in a program
Decode: The CPU decodes the instruction from a number to an electronic signal.
Execute: The signal is routed to the appropriate component of the computer, which causes an operation to perform.

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

What is main memory known as?

A

RAM: Random Access Memory

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

What is RAM?

A

Quick access data stored in random locations.

RAM is a volatile memory - only for temp. storage while a program is running.

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

What are bytes?

A

Tiny storage cells (one byte stores one letter)

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

What is a bit?

A

Binary digit. Eight bits make up on byte. Bits stand for either “on” or “off”. (+ or - charge)

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

What does the disk drive do?

A

Stores data by magnetically encoding it onto a circular disk.

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

What is flash memory?

A

Used by USB flash drives. It stores data inexpensively and reliably, like a disk drive.

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

What are input devices?

A

Keyboard, mouse, touch screen, scanner, digital camera, microphone, etc.

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

What are output devices?

A

Computer screens, printers, speakers, etc.

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

What is system software?

A

The programs that control and manage the basic operations of a computer. Includes:

  • operating systems (fundamental)
  • Utility programs (specialized tasks: ie virus scanner, file compresser, etc.)
  • Software development tools (software programmers use to create, modify, and test software)>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is application software (or application programs)?

A

Programs that make computers useful for everyday tasks. (ie: Word, web browsers, games, etc.)

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

List the five major hardware components of a computer system

A

1) Instruction input
2) Secondary storage devices
3) RAM (main memory)
4) CPU
5) Result output

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

What is a program?

A

It is a set of instructions that tells the computer how to solve a problem or perform a task.

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

Algorithm

A

A set of well-defined steps for performing a task or solving a problem.

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

What is machine language?

A

A sequence of binary numbers which the computer interprets.

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

What is a programming language?

A

Uses words instead of numbers, for ease of programming. Then there exist software which converts the words into numbers.

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

low-level language

A

this language is close to the level of the computer, resembles the numeric language more than human language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
High-level languages
Closer to the level of human-readability than computer-readability.
26
Text editor
similar to a word processing program, used to type C++ and save to a file.
27
Source code
Statements written by the programmer
28
Source file
The file in which source code is saved.
29
Preprocessor
Reads the source code, looks for directives.
30
Directives
Lines that begin with the # symbol, cause the preprocessor to amend or process the source code in some way.
31
Compiler
Works after the preprocessor - translates each source code instruction into the appropriate machine language instruction.
32
Syntax Errors
Illegal uses of key words, operators, punctuation, and other language elements.
33
Object code
The translated machine language instructions.
34
Object file
Where the object code is stored.
35
Run-time library
An extensive collection of prewritten code for performing common operations or sometimes-difficult tasks.
36
Linker
Last phase of the compiling process - combines the object file with the necessary library routines (run-time library).
37
Executive file
The final file to run a program
38
Executable code
Instructions in the machine's language.
39
Integrated development environment (IDE)
Environment consists of a text editor, compiler, debugger, and other utilities in one package. Preprocessing, compiling, linking, and executing a program happens with a single button press.
40
Key words (reserved words)
Words that have a special meaning, only can be used for their intended purpose.
41
Programmer-defined identifiers
Words or names defined by the programmer - they are symbolic names that refer to variables or programming routines.
42
Operators
These perform operations on one or more operands. Operand is a piece of data, like a number.
43
Punctuation
Punctuation characters mark the beginning or ending of a statement, or separate items in a list.
44
Syntax
Rules that must be followed when constructing a program: how key words and operators may be used, where punctuation symbols must appear.
45
What are keywords always written in?
Lowercase
46
=
Assignment operator: takes the value of the expression on the right and stores it in the variable whose name appears on the left.
47
Statement
A complete instruction that causes the computer to perform some action.
48
Variable
Named storage location in the computer's memory for holding a piece of data
49
Variable definition
The line in which variables are defined. ie: int x; or double hours, rate, pay;
50
What to do when defining what a program is to do?
Identify: - Purpose - Input - Processing (multiplication, etc.) - Output
51
Hierarchy chart
A diagram that graphically depicts the structure of a program (boxes represent each step in the program).
52
Top-down design
When boxes in a hierarchy chart are divided into further boxes (smaller steps).
53
Flow chart
Diagram that shows the logical flow of a program.
54
Pseudocode
A cross between human and programming language. Used for note taking/preparation for coding.
55
Logical errors (logic errors)
Mistakes that cause the program to produce an erroneous result.
56
Desk-checking
This means the programmer starts reading the program, or a portion of the program, and steps through each statement.
57
Header file
A file that must be placed at the header, or top, of the source code.
58
Function
A group of one or more programming statements that has a name. () indicate a function.
59
String, string literal, string constant
The characters found between two "".
60
Stream object
This works with streams of data (ie: cout
61
LTLT (Stream-insertion operator)
The item immediately to the right of the operator is inserted into the output stream.
62
Escape sequence
Always written as a "\" followed by a control character. are always used to control the way output is displayed. (ex: \n = newline). Must always be written between double ""s.
63
Variable definition
Tells the computer the variable's name and the type of data it will hold. (ie: int number;, float x;, etc.)
64
Example of an assignment statement
``` number = 5; x = 7; ```
65
Identifier
Programmer-defined name that represents some element of a program. (ie: int apples; "apples" is the identifier)
66
Data type's SIZE
The number of bytes a data type can hold
67
range of the data type "short int"
-32,000 to 32,000
68
Range of the data type "int"
-2billion to 2 billion
69
Range of the data type "long long int"
-9 quadrillion to 9 quadrillion
70
Mantissa
The first number in scientific notation. (ie 4.5x10^5, "4.5" is the mantissa)
71
Prompt
A question that lets the user know an input is expected, prompts what need to be entered.
72
GTGT
This is the stream extraction operator, it extracts characters from the input stream so they can be used in the program. Stores info into the variable on the right of it. (cin GTGT length; "length" is the variable)
73
input buffer, or keyboard buffer
Where characters entered by the user get placed temporarily.
74
expression
Something that can be evaluated to produce a single value (ie: 21 + 3)
75
precedence
PEMDAS. This also works in computers!
76
How to do an exponent in C++
Pow function! pow(4.0, 2); (This will do 4^2). The pow function expects floating-point numbers. For pow function to work - - must have "cmath" in the header file. (#include LTcmathGT) - first of the two arguments must be a double. - The variable must be stored as a double.
77
Arguments
Arguments are what go inside the parenthesis | ie pow(4.0, 2) - 4.0 and 2 are both arguments
78
type coercion
When C++ strives to convert the operands to the same type.
79
Promoted
When a value is converted to a higher data type.
80
Demote
When a value is converted to a lower data type.
81
truncated
When everything after the decimal point in a number is discarded. (ie: if a float value is placed into an int variable, it will be truncated.)
82
Type cast expression
This will allow you to manually chance a data type. static_castLTdatatypeGT(variable) (it: static_castLTintGT(number) )
83
prefix notation (another type cast expression)
The new data type can be placed in () before the variable. | ie: booksPerMonth = (double)books / months;
84
Functional notation (another type cast expression)
the variable is placed in the () instead of the data type | ie: booksPerMonth = double(books) / months;
85
relational expression
compares two variables (ie: x GT y, x == y, etc)
86
Boolean expressions
All relational expressions are Boolean expressions - they can only ever be true or false.
87
Equality operator
==
88
Not equal operator
!= The two chars or ints must NOT be equal to be true.
89
Sequence structure
When statements are executed in sequence, one after another, without branching off in another direction.
90
Decision structure
When some statements are executed only under certain circumstances.
91
Conditionally exectued
When an action is performed only under a certain condition.
92
Block
The statements inside of the body of a function (inside the {} ). This lets the compiler know which statements are associated with the if.
93
Condition
The () after the function (ie: if(){ } The () contain the condition! There is no semicolon after the condition!
94
if statement
``` Looks like this: if (condition) { statement 1; statement 2; ... statement n; } ```
95
Null statement
An empty statement that does nothing. | misplaced ;s, like after an if statement, will become null statements
96
Flag
Variable that signals whether or not some condition currently exists in a program. Bool variables are good for this!
97
How to have relations in your program
#include LTcmathGT
98
absolute value function
abs() works like the if statement! No ; at the end :) ) (ie if(abs(result4.0 LT .0001))...
99
if else if statement
``` if( ) cout LTLT ____; else if( ) blah else if( ) ..... ```
100
Trailing else
This places a default action or set of actions when non of the if expressions are true - normally is used to catch errors.
101
What is a loop?
A control structure that cuases a statement or group of statements to repeat. There are three looping control structures in C++: the WHILE loop the DO-WHILE loop and the FOR loop
102
Important part of the WHILE loop
1) an expression is tested for a T or F value 2) A statement or block that is repeated as long as the expression is true. while (condition) { statement; statement; ... }
103
loop header
The first line in a loop
104
Condition
The keyword in the parenthesis after a loop while (answer == 'y'){ } "answer == 'y'" is the condition
105
Iteration
Each execution of a loop is known as an iteration.
106
loop control variable
A variable that controls the number of times a loop iterates
107
Pretest loop
WHILE is a pretest loop - it tests its condition before each iteration.
108
Infinite loop
If a loop has no way of stopping, it's an infinite loop.
109
What does it mean to increment a value?
Increase it - usually done by 1
110
What does it mean to decrement a value?
Decrease it - usually done by 1
111
Ways to increment the variable "num" by 1
num = num + 1; num += 1; num++;
112
Ways to decrement the variable "num" by 1
num = num - 1; num -= 1; num--;
113
postfix mode
when the operator is placed after the variable (ie: count++) | in postfix mode, the compiler will display the number and THEN increment.
114
prefix mode
When the operator is placed before the variable name (ie: ++count) in prefix mode, the compiler will increment, and THEN display the number.
115
Counter
A counter is a variable that is regularly incremented or decremented each time a loop iterates.
116
Running total
This is a sum of numbers that accumulates with each iteration of a loop.
117
Accumulator
The variable used to keep the running total.
118
Divide and conquer
Using several smaller functions to divide up a problem, and execute them in order to solve it
119
Code reuse
Writing a function and then using it several times throughout your code
120
Return type of a function
What kind of data the function will return. Int main(); "Int" is the return type
121
Parameter of a function
The orange yet is within the ()s. Int main(void){} "Void" is the parameter.
122
What is the body of a function?
What goes between the {}s. ``` Int main(){ Statement; } ``` "Statement" is in the body.
123
What is the function header?
The return type, name, and parameter of the function! Int main(){} This is the function header.
124
What are void functions?
Functions that don't return any value, they just perform statements and then end.
125
What is a function call statement?
It calls a function into the MAIN function. ``` It is called by this format: functionName(); i.e.: my function is Void multiFunc(int a, int b){} ``` I would call "multiFunc();"
126
Function prototype
Let's the compiler know a function will appear later in the code.
127
Where does a prototype get placed in the code?
After "using namespace std;"
128
Which of the following must show the data type with the variables? Function header, prototype, or call?
Both the function prototype and the function header must list the data type with the variables. The function call MUST NOT list the data type. Void showSum(int num1, int num2, int num3); The call: showSum(value1, value2, value3)
129
Functions that return a value are known as:
Value-returning functions
130
What do you call a variable that is defined inside a function?
A local variable
131
What are arguments?
Values that are sent into a function
132
What is a parameter?
A special variable that holds a value being passed as an argument into a function.
133
What is a null terminator?
The number 0, which is automatically placed at the end of any string placed in the computer.
134
What is initialization?
When a value is stored in a variable at the time the variable is defined.
135
What does the keyword "auto" do?
It takes the place of a variable definition, and the computer will automatically assign it. Ex: Auto num = 100 The computer would store it as an int data type.
136
Every variable has a...
Scope
137
What is scope of a variable?
The part of the program where the variable may be used.
138
What is a named constant, or constant variable?
It's like a variable, but its content is read-only and cannot be hanged while the program is running.
139
What is field width?
The minimum number of spaces to use for each number. (It makes all the numbers in a table line up nicely!
140
What does "showpoint" do?
Forces a values decimal to be shown (6 figures! So 6.00000 or 12,345.00)
141
How to make output left or right justified?
Use left LTLT variable Or right LTLT variable
142
How a user can enter a whole line or sentence into a program:
Getline function! Getline(cin, nameUChooseForFunction)
143
What function will test if an argument is a letter of the alphabet?
isalpha
144
What function will test if an argument is a letter of the alphabet or a digit?
isalnum
145
What function will test if an argument is a digit from 0 to 9?
isdigit
146
What function will test if an argument is a lowercase letter of the alphabet?
islower
147
What function will test if an argument is a printable character (including a space)?
isprint
148
What function will test if an argument is a printable character other than a digit, letter, or space?
ispunct
149
What function will test if an argument is an uppercase letter of the alphabet?
isupper
150
What function will test if an argument is a white space character?
isspace
151
What is an object?
a software entity that combines both data and the procedures that work with it in a single unit.
152
What is an attribute?
An object's data items, which are stored in member variables.
153
What are member functions?
The procedures that an object performs.
154
What is encapsulation?
The bundling of an object's data and procedures together.