Programming Assignment 3
There are two different parts of this assignment.
Part I. Algorithm Creation and Implementation:
An open source advocate has asked you to create a utility class (i.e.,
a class with only static methods) that you and others can use to
format
String
objects in a variety of different ways
(so that text can be presented on a variety of different devices
of different sizes).
She has designed this TextFormatter
class and has come
to you to create and implement the algorithms needed for this class.
A driver and associated
expected output file are available
to help you test this class independently.
Part II. Class Design and Implementation:
You have been hired by Enhanced Realty to design and implement some of
the classes needed for their
HomeBase system, a system that
provides users with the ability to search a database of real estate listings
using a variety of different devices (e.g., desktop computers,
laptop computers, smartphones, tablets, etc...).
Testing:
Unit Testing:
You should have learned from the earlier programming assignments
that it is very useful to test one module at a time (often
called "unit testing"). Hence, you must create your own unit
tests (and corresponding drivers). In particular, you must
create an appropriately named driver that tests each class you
write.
Checking Your Output:
Since the driver can generate many lines of output, it is difficult
to determine if it is working correctly or not. The process
can be facilitated by saving the expected/correct output
in a file, redirecting the actual output to a file,
and then comparing the two.
There are a number of utilities that you can
use for this purpose. The "ancestor" of most is the
diff
utility
.
Some others can be found on the
"tools" page.
You may also want to read the material on
KDiff3 Tips and Tricks (regardless
of which
diff
tool you use).
Submission:
Drivers:
In addition to the normal submission materials, for this assignment
you must also submit hardcopy of all of the drivers that you used
to test your classes.