9
The Project The Project •Due at 12:00 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.)

The Project

Embed Size (px)

DESCRIPTION

The Project. Due at 12:00 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.) - PowerPoint PPT Presentation

Citation preview

Page 1: The Project

The ProjectThe Project•Due at 12:00 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.)

•Due at 12:00 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.)

Page 2: The Project

Project GradingProject GradingAfter 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).

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).

Page 3: The Project

The RulesThe RulesYou must adhere to the following four 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.

Page 4: The Project

SubmissionSubmission You must have a single project for this assignment. Your project must be called: prj. Otherwise we will not beable 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 containsanswers to all of the questions asked in this project.

Page 5: The Project

MarksMarks 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 - 6*4 + 2*4 = 32

Maximum 122 points

Mark Summary Part B:•Class KeyedArray - 10

•Class MultiKeyedArray - 10 Maximum 20 points

Page 6: The Project

Implementation Implementation StrategyStrategy

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.

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.

Page 7: The Project

Combined Class and Combined Class and Interface Inheritance Interface Inheritance

HierarchyHierarchy

KeyedCollection

MultiKeyedCollection

KeyedVector KeyedList

MultiKeyedVector MultiKeyedList

implements interface inheritance

Page 8: The Project

AspectsAspects

May 26

John 36

Bill 29

Jane 16

InsertionOrder

2

3

1

0

aspect1

3

0

2

1

aspect2

Page 9: The Project

Implementation Implementation StrategyStrategy

May 26

John 36

Bill 29

Jane 16

InsertionOrder

May 26

John 36

Bill 29

Jane 16