CIS 150MIDTERM – Flashcards

Unlock all answers in this set

Unlock answers
question
Hardware
answer
The equipment, or physical devices, associated with a computer. Ex. Keyboard, mice, speakers, and printers.
question
Software
answer
Computer instructions that tell the hardware what to do.
question
Data
answer
Set of values, information
question
Logic Error
answer
Results when you use a syntactically correct statement but use the wrong one for the current context.
question
Syntax Error
answer
Statements that do not follow the rules that govern the language.
question
Where are programs and data stored during executions?
answer
RAM
question
What makes up a method name?
answer
Name followed by ( ) most languages follow lowerCamelCase()
question
What is precedence?
answer
Order of operations. (), ^, *, /, +, -
question
byte
answer
-128 to 127 8 bits
question
char
answer
U+0000 to U+ffff 16 bits
question
short
answer
-32,768 to 32,767 16 bits
question
integer
answer
-2,147,483,648 to 2,147,483 32 bits
question
long
answer
-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
question
float
answer
-3.4E+38 to 3.4E+38
question
double
answer
-1.79E+308 to 1.79E+308
question
boolean
answer
true or false
question
string
answer
a group of characters
question
Literals
answer
numeric constant
question
Variables
answer
numeric variable, sting variable
question
Named Constants
answer
Similar to variable but value is assigned only once.
question
What is a prompt?
answer
A message that asks the user for a response and may tell user how that response should be formatted.
question
Start/Stop
answer
Pill shape - notates beginning or ending of routine or module
question
Processing
answer
Rectangle - Notates processing steps such as arithmetic, moving data within memory, or accumulating values.
question
Decision
answer
Diamond - Notates a true of false decision
question
Input/Output
answer
Rhombus - Notates data read from devices or data written to devices
question
On page connector
answer
Connects multiple flowcharts or shoes entry points from branch points.
question
Off page connector
answer
Connects a multi-page flowchart.
question
What are the various methods to control loops?
answer
Loop control variable - Incrementing or decrementing Sentinel Value
question
Loop Control Variable
answer
Value is tested to control loop's execution.
question
What three actions must occur before a loop will be initialized?
answer
1. Loop control variable must be initialized before entering the loop. 2. Test loop control variable. If true, enter loop body. 3. Alter loop control variable value in loop body.
question
Decision Structure
answer
if-then-else
question
Iteration Structure
answer
while loop
question
Sequence Structure
answer
When action is performed next action is executed after
question
What is nesting?
answer
A decision inside of another decision.
question
What is a priming read?
answer
First input that sets loop control variable's first value.
question
while loop
answer
Structured loop has one entry and one exit point.
question
for loop
answer
Used when the program knows exactly how many times the loop will repeat.
question
What three actions occur in one statement when using a for loop.
answer
1. Loop control variable initialized. 2. Loop control variable is evaluated 3. Loop control variable is altered.
question
What is a method and what is its advantage?
answer
Executes a single, finite task. Smaller methods are less complex and more reliable and reusable.
question
What are named constants?
answer
Similar to a variable but its value can only be assigned once.
question
What is a boolean expression?
answer
An expression whose value can only be true or false.
question
How do we make compound decisions?
answer
AND Logic
question
What are parentheses used for in programs?
answer
Items places in the method headers (). Or an expression that is to be evaluated first will be contained within ().
question
What is a step value?
answer
The amount by which a for loop control variable changes after the body executes.
question
Pretest loop
answer
The loop control variable is tested before each iteration.
question
Posttest loop
answer
The loop control variable is tested after each iteration.
question
What loops are examples of pretest loops?
answer
while and for
question
Detail Report
answer
Detailed report with data items listed.
question
Summary Report
answer
Lists only totals with no individual item details.
question
What is the process to control erroneous data called?
answer
validation
question
What is an array?
answer
A data structure that consists of a series or list of values in computer memory.
question
What are the components of an array?
answer
Element - Each data item Subscript - Differentiates each element
question
What are parallel arrays?
answer
Two or more arrays in which each element in one array is associated with the element in the same relative position in the other array.
question
What is the valid range for an array subscript?
answer
Starts at zero
question
What is abstraction?
answer
The process of paying attention to important properties while ignoring nonessential details.
question
What is in scope?
answer
Term to describe variables that are known to a method.
question
What is out of scope?
answer
When locally declared variables go out of scope or die.
question
What is encapsulation?
answer
The process of combining all of an object;s attributes and methods into a single package.
question
Methods that do not return values are called what?
answer
Void method
question
How are arrays passed to methods?
answer
An array element can be passed into a method just like a variable or constant. A passed array element is passed by value; the receiving method receives a copy.
question
What are overloaded methods?
answer
When you write multiple methods with a shared name but different parameter lists.
question
Why are classes useful?
answer
Like a blueprint from which many houses can be constructed.
question
What two basic components make up a class?
answer
Objects Attributes
question
What is inheritance?
answer
Data passed down from predecessor
question
How does an object relate to a class?
answer
An object is one instance of a class.
question
What makes up a class diagram?
answer
The top section contains the class name, the middle contains the name and data type of the attributes, and the bottom contains the methods.
question
What is a constructor?
answer
A method that establishes an object, reserving enough memory space for it and providing its name.
question
What is a destructor?
answer
Contains the actions you require when an instance of a class is destroyed.
question
What is composition?
answer
The technique of using an object of one class as an attribute within another class.
question
What is an IDE?
answer
Integrated Development Environment
Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New