Midterm 2 Flashcards
value
A value is a data item that is manipulated by the computer.
variable
A variable is the name that the programmer uses to refer to a location in memory.
location
A location has an address in memory and stores a value.
variables can also be called _____
identifiers.
An identifier is a name that must begin with a letter and cannot contain spaces.
reserved word
A reserved word is a string that has special meaning in the language. (e.g. var, if, else)
variable types
numbers – both integers and float/doubles
strings – sequences of characters
Boolean – true or false
algorithm
An algorithm is a precise, systematic method for producing a specified result.
Fetch/Execute Cycle
Instruction Fetch (IF) - retrieve instruction from memory Instruction Decode (ID) - lookup meaning of instruction Data Fetch (DF) - fetch data for instruction Instruction Execution (IE) - execute instruction Result Return (RR) - return result to register
Grouping instructions
allows programmers to use algorithms to solve other problems without re-creating them. It also allows programmers to focus on one task at a time (divide-and- conquer) and build up solutions to larger problems.
5 Basic Steps of Software Development
1) Specification
2) Design
3) Implementation
4) Testing, Execution, and Debugging
5) Maintenance
Problem decomposition
breaking down a large problem into subproblems which are easier to solve. Dividing problems into subproblems is called “divide and conquer”.
def. method
a sequence of program statements that have a specific task that they perform. (void)
def. function
a procedure that returns a value after it is executed. (return)