Fund. CS II (CS152 2005F)

Homework 2: Object Basics

Assigned: Friday, 16 September 2005
Due: 11:00 a.m., Wednesday, 21 September 2005

Summary: In this assignment, you will extend and experiment with an existing Fraction class and build your own Counter class.

Purpose: To give you an opportunity to explore issues of class design and use in Java.



a. Do exercises 1-6 of Designing Your Own Classes in Espresso.

b. Make sure that you do sufficient testing as you complete those exercises.

Submitting Your Work

a. In Emacs, create a file called username.hw2

b. Copy and paste your test runs from the terminal window into Emacs.

c. Add "section titles" that indicate which exercise each test run is for.

d. Submit, via email, your .java files and this run file.


When you ask questions, I'll try to put the answers here.



Friday, 16 September 2005 [Samuel A. Rebelsky]


Disclaimer: I usually create these pages on the fly, which means that I rarely proofread them and they may contain bad grammar and incorrect details. It also means that I tend to update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This document was generated by Siteweaver on Tue Dec 6 09:47:03 2005.
The source to the document was last modified on Fri Sep 16 11:05:09 2005.
This document may be found at

You may wish to validate this document's HTML ; Valid CSS! ; Check with Bobby

Samuel A. Rebelsky,