Homeworks for Chapter 3

Due 2/15, 2/20, and 2/22
Click here for solutions

Part I. These exercises are due on Wednesday Feb. 15

Exercises 3.1, 3.2, 3.6

Part II. These exercises are due on Monday Feb 20

Exercises 3.12, 3.16, 3.18.

Part III. These exercises are due on Wednesday Feb 22

Exercises 3.10, 3.11, plus the following challenge problem:

CHALLENGE: Write a method that takes a double parameter representing a student's quiz grade, and returns the corresponding letter grade. A grade of 90 or better is an "A", 80-90 is a "B", and so on. For example, if you named this method numberToLetterGrade() and called it with numberToLetterGrade(95), it should return "A".
For exercises that ask you to "write a method", I encourage you to try to compile and test your method. That way you can see your mistakes.

Here's a link to a sample program that you can use as a template:

MethodTester.java

As a way of testing your methods, you can add them to this program. Solutions to Exercises 3.8 and 3.9 are provided in the program as examples. We can go over these in class.

How To Submit

  1. Bring your solutions to class. We'll go over the answers in class.