Title: The Project
1The Project
- Due at 1200 noon on Wednesday March 22.In this
project, you will - create a series of classes that can be used to
sort and access collections. - write the classes in the order they are
described. (Some of the later classes require the
earlier classes in their implementation.) - after writing a class, write your own test
application that checks it. (Your test
application should contain a main method that
calls each of the methods in your class, several
times if necessary with different objects as
parameters.)
2Project Grading
- After you submit your assignment we will use our
own main programs to call your classes and test
them. - The grade for this assignment will be based NOT
ONLY on whether your classes work, but also on
the quality of your code. The quality of your
code will be based on how easy it is to read and
understand (see details in project description).
3The Rules
- You must adhere to the following four rules
1. You may not create any of your own classes
except for the ones described in this document.
2. You may not create any public methods in any
of your classes except the ones described in this
document. You may create as many protected or
private methods as you need. 3. You may not
modify the signatures of any of the public
methods. 4. You may not define any public
instance variables or public static variables.
4Submission
You must have a single project for this
assignment. Your project must be called prj.
Otherwise we will not be able to grade your
project and you will receive zero marks. All of
the classes for this assignment must be added to
this single project. To submit your project, you
must drag your project folder to your submit
folder. In addition to your code, you must
include a single file in your project folder
called report that contains answers to all of the
questions asked in this project.
5Marks
Mark Summary Part A
- Class StopWatch - 10
- Class SimplePerson - 10
- Class KeyedVector - 10
- Class KeyedList - 10
- Class Person - 10
- Class MultiKeyedVector - 10
- Class MultiKeyedList - 10
- Class SortedVector - 10
- Class SortedList - 10
- Report - 64 24 32 Maximum 122 points
6Implementation Strategy
- Each time you implement a class, you should
implement a test program to test it. (You do not
need to submit your test programs we will use our
own.) - You should build the classes in the order listed
above. - The functionality of the program for Part A and
Part B are identical. However, Part B uses
inheritance to significantly reduce the amount of
code that is written. - Part B involves many abstractions that are not
easy to understand until the code has been
written without the abstractions. For this
reason, you are strongly encouraged to complete
and submit Part A, before you attempt to re-write
the project as described in Part B.
7Combined Class and Interface Inheritance Hierarchy
KeyedCollection
KeyedVector
KeyedList
MultiKeyedCollection
MultiKeyedVector
MultiKeyedList
implements
interface inheritance
8Aspects
aspect1
aspect2
2
3
Insertion Order
3
0
1
2
0
1
9Implementation Strategy
Insertion Order