Next: About this document ...
Up: Programming assignment
Previous: Preserve your program for
- 1.
- On pages 48 and 49 of the textbook, choose ANY TWO of
exercises 4, 6 and 8. Write and debug your programs
and test them with a variety of inputs.
- 2.
- Add comments to your code to explain what each part of it
does. Add a comment that has your name, the date, the number of the
assignment, and the number of the exercise you chose to do.
- 3.
- Although the spaces, tabs and newlines in your program do not
(generally) affect its execution, they do make the program easier to
read. There are some standard conventions for how to layout a Java
program. By reading and copying the programs in the book, you can
figure out what these conventions are. Please check your program
to make sure that lines are indented properly, etc., before you turn
it in.
- 4.
- Print your program and write your name, the number of the
assignment, and the number of the exercise in the upper-right corner
of the page.
- 5.
- You should have two pages, one for each program. Staple them
together and hand them in.
Congratulations on completing the first assignment. Only ten more
to go!
Next: About this document ...
Up: Programming assignment
Previous: Preserve your program for
Allen B. Downey
2/7/1998