Quiz #1

Friday

With a piece of paper, write down your name and answers to for following questions.

  1. These characters mark the beginning of a single-line comment.

    1. //
    2. /*
    3. */
    4. /**
  2. This type of expression has a value of either true or false.

    1. binary expression
    2. decision expression
    3. unconditional expression
    4. boolean expression
  3. What will the println statement in the following program segment display?

    int x = 5
    System.out.println(++x);
    1. 5
    2. 6
    3. 0
    4. None of these
  4. Find the error in the following method.

    public static double timesTwo(double num) {
        double result = num * 2;
    }

    Correction:

    public static double timesTwo(double num) {
        double result = num * 2;
        return result;
    }

Student Performance and Statistics

A histogram of student performance on percentage grades for Quiz 1 on Friday.

100% 7 90 - 99% 0 80 - 89% 0 70 - 79% 3 60 - 69% 0 50 - 59% 2 40 - 49% 0 30 - 39% 0 20 - 29% 0 10 - 19% 0 0 - 9% 0

A table showing the average performance for each question in Quiz 1 on Friday.

Q1 0.9 / 1 Q2 1.0 / 1 Q3 0.8 / 1 Q4 0.8 / 1