CS 311 Algorithms and Complexity
Spring 2007
Programming Project 4
The Manhattan
Distance
between points is the sum of the differences of their coordinates. In particular, if p1=(x1,
y1) and p2=(x2, y2), then
the
Write a class
called
ClosestPairManhattan that takes one argument, the name of a file that
contains
data representing a number of points on the plane and returns a report
that
gives a closest pair of points and their distance apart using the
Using the file in.dat, my implementation finds the distance between
a closest
pair to be 6 with a sample pair of points to be (-23, 251) and
(-22,256). I do not know if my
implementation is
correct. Please let me know if you get
different results.
In your memo.doc write a brief report that describes potential
applications
of the
By the due date
and time,
zip and email me a directory that contains any files you want me to
consider. This directory should have in it:
·
memo.txt
·
ClosestPairManhattan.java
·
Any
other java
files we need to run your application
We will
use the following rubric to assess your work
on this project:
|
Attribute |
Advanced |
Proficient |
Needs
Improvement |
Maximum
Pts |
|
Behavior |
||||
|
ClosestPairManhattan |
Correct
implementation of the algorithm |
Mostly correct implementation of the
algorithm |
Mostly
incorrect implementation |
30 |
|
Design
& Code |
||||
|
Class
Design |
Uses a
clear and understandable class design. |
Uses a
clear and understandable class design. |
Uses an
unclear and/or non-understandable class design. |
7 |
|
|
Uses good code style. Code is mostly self-documenting. Javadoc comments for each class and method. |
Mostly correct with some comments. |
Mostly not correct. Poor code style. |
3 |
|
memo.txt |
||||
|
|
Provides a clear
description of the significance of the |
Provides a mostly clear
description of the significance of the |
Provides a mostly unclear
description of the significance of the |
8 |
|
Grammar
and style |
Well written. No obvious
grammar or punctuation errors. A pleasure to read. |
A few grammatical errors
such as punctuation or spelling, although most errors do not interfere
with the overall message or the substance of the text. |
May grammatical errors
including punctuation, spelling or usage problems. |
2 |
|
Total |
50 |
|||