Chapter 3 Flashcards
(40 cards)
The simplest type of structured statement used to group a sequence of statements into a single statement
Block
A block consisting of nothing but an empty pair of braces
Empty Block
A central concept in computer science allowing a programmer to work with something without understanding how it works in detail, in order to work on a ‘higher level’
Abstraction
Concept that the value of a variable can only be used if the compiler can verify that the variable will have been assigned a value at that point when the program is running
Definite Assignment
An unambiguous, step-by-step procedure that always terminates after a finite number of steps
Algorithm
A method of algorithm development starting with a description of the task, which is used to gradually add details and steps of how to execute said task
Stepwise Refinement
Informal instructions that imitate the structure of programming language without the complete detail and perfect syntax of actual program code
Pseudocode
Semantic error in a program that shows up as incorrect behavior rather than as compilation error
Bug
Process of tracking down the cause of a bug in a program’s source code and eliminating it
Debugging
A program that helps find bugs, allowing a programmer to set ‘breakpoints’ in a program where the program pauses so that the programmer can assess variable values
Debugger
Traditional approach to debugging where output statements are inserted to print information about the state of the program, thus giving insight to variable values and control structure functionalities
Debugging Statements
Input value marked as the last value which can be used to test a loop against but is not part of the data
Sentinel Value
Variable used as a signal that is set in one part of the program and tested in another part of it
Flag Variable
Statement that allows a programmer to specify which loop they want to break
Labeled Break
A simple identifier followed by a colon to specify which loop is which
Label
Error in branching statements where an else statement attaches to the wrong if, in nested branches
Dangling Else
A multi-tiered if statement that includes three or more options
Multiway Branching
A statement that consists simply of a semicolon telling the computer to do nothing
Empty Statement
A control structure which allows one to test the value of an expression and, depending on that value, to jump directly to some location within the statement
Switch Statement
Marker of a position within a switch statement to which it can jump
Case Label
An expression which computes and returns a single value as a switch
Switch Expression
Statement which runs a hypothetical and catches errors within it, as well as programs a response different from simply letting the program crash
try..catch
Term used to refer to the type of event that one might want to handle with a try..catch statement
Exception
Term to describe how an exception occurs in a program
Throw