chapter 4 computer programming

13 cards

whatever


 
  
Created Sep 23, 2011
by
forger33

 

 
Table View
 
Download
 
Print

Flashcard Set Preview

  Side A   Side B
1
Loops
 
-controlling a repeating set of statementsfor(initStatement;booleanExpression; updateStatement){statements}...
2
for loops
 
-for loops: when a single variable declaration/initialization/update statement occurs-uses...
3
while loops
 
while(booleanExpression){statements}-must have changing variable or else infinite loop will...
4
do loop
 
do{statements}while(booleanExpression);-statement will be executed before the body is executed...
5
Range Checking
 
-must be done after type checking full code for type checking and range checkingScanner in...
6
Type checking
 
-checks type of input to make sure entry is validScanner in = new Scanner(System.in); ... type...
7
Yes or no prompt for users to keep repeating execution
 
Scanner in = new Scanner(System.in); ... do{     ...    ...
8
Sentinel value termination (limiting the range controlled by the user)
 
Scanner in = new Scanner(System.in); ...type name; do{     System.out.println(“prompt;...
9
sum
 
double sum = 0;loopHeader{     ...       sum +=...
10
average
 
double sum = 0; int count = 0; loopHeader{     ...    ...
11
counting matches
 
look at slides
12
Maximum
 
double max = firstValueInSequence;loopHeader{     ...     ...
13
Minimum
 
double min = firstValueInSequence; loopHeader{     ...     ...

No comments yet! Be the first to add a comment below!

Please login to post comments.
After login, we will forward you back to this flashcard.

Upgrade and get a lot more done!
Upgrade