CS 1713 Introduction to Computer Science, Spring 2011 Exam 1 Comments

The exam average was 71 and the median was 75. If you got below a 70 on this exam, you might not be prepared for this course.
If you got below a 60 on this exam, you are not prepared to continue with this course and you must see me.

Some comments on particular problems:

  1. In this problem you did not need to go into detail about each line of code. The important information is:
  2. For the last part, it does not work to have index = index++;
  3. You should create the Random object outside the loop and reuse it.
  4. The parameter should be an int and it should return an int
  5. The parameter is a String and you should use charAt.
  6. Most did not handle the case of length 0 at all.
    In this case only the brackets should be printed.
  7. This code segment should always print two messages.
    The first is the prompt and the second is a statement about the value entered.
  8. Be careful not to add the negative value to the sum.
  9. Watch out for which operations produce integers and which produce numbers with a fractional part.

Exam 1      solutions