This website is preserved for historical and scholarly reference and is no longer actively maintained.
QUIZ 11
September 15, 1997
#1. In class the following style standard illustrated by
was proposed. Explain why is the above code to be preferred over the code given below.
#2. Draw a flowchart to illustrate the logic of the preferred code in question #1.
#3. Step through the following Java code segment.
int count = 0;
double score = 90;
double total = 0;
total += score;
count ++;
score = 80;
total += score;
count ++;
double x = total / count;
After execution of the code segment.
score = __________
count = __________
total = __________
x = __________