657.209B, 2002. Hand-in Project One
Your task is to implement a simple interactive application
for fitting lines to data-points.
You are encouraged to work together in groups of two.
Due date: Friday, 23th August
Stuff to submit:
A jar-file including everything.
This file should be executable
CHANGED: The name of that file should be
YourEMAIL.jar, so if my Email were bmp987, my jar file would be
bmp987.jar; if this project is done by two people, e.g. xyz123 and
zyx789, use xyz123_zyx789.jar.
The jar-file should contain:
- all sources
- all class files
- Javadoc style documentation. Use the @author tag to give
your names and IDs!
After that an "ls bmp987.jar" should produce:
- copy your jarfile to /home/bernhard/Project1: cp bmp987.jar /home/bernhard/Project1
- prevent others from reading it: chmod 700 bmp987.jar
- change the owner of the file to 'bernhard': chown bernhard bmp987.jar
-rwx------ 1 bernhard compsci 61234 Aug 13 10:00 bmp987.jar
Your application should consist of one graphical pane,
where the user can add points by just clicking,
as well as five buttons implementing the following functionalities:
A simple and easy to parse file format would be one coordinate/line, e.g.
- Quit: obvious
- Clear: reset the graphical pane to no points,
- Fit line: compute a regression line for all current points
and draw it.
- Save: save all current points into a file named "SavedPoints.txt"
- Load: read all points defined in file "SavedPoints.txt" and add
them to the current points
A fitting line is easily computed by the following regression equation:
y = a + b*x
where a and b are computed as follows for n points:
a = s1 / d
b = s2 / d
s1 = (Sum y)*(Sum x*x) - (Sum x)*(Sum x*y)
s2 = n*(Sum x*y) - (Sum x)*(Sum y)
d = n*(Sum x*x) - (Sum x)*(Sum x)
Assessment will be based on the following criteria:
- Presence of the required features (1, 2, and 3 above).
- Clarity and style of programming.
In addition, the following grading policy similar to 312 (Communications and Systems Software) applies:
As always, marks will be subtracted for poor programming practice. Make sure you liberally comment your code and keep good Object
Oriented design principles in mind. The grade is made over all deliverables, meaning your documentation will be graded as
well as the correctness of program execution.
Late submissions will not be graded without a mitigating Doctor's certificate.
It is better to get some marks than no marks, so be sure to submit what you have, even if it isn't complete.
Last modified: Mon Jul 24 11:42:09 NZST 2002