For this assignment you create a set of Java classes that faithfully realizes a set of UML class diagrams. This means you will define classes with the appropriate attributes and operations. You will not, however, need to fully implement the methods; rather, you will use method stubs (described below). In the end you will have code that compiles but does not execute.
The class diagrams are available in the document, Library Asset Manager Design.You are permitted to use other classes included in the libraries of Java 6 Standard Edition.
Your source code must meet the class coding standards.
Method Stubs
When implementing a class it's often useful to establish interfaces before providing implementations. This ensures that the classes are correctly declared and as you implement operations the source code will compile. One of the rules of Java is that if a operation has a non-void return type, the method must return a value of that type. If it doesn't, a compiler error occurs.
For example, the following will not compile since an int value should be returned:
int doSomething() {
}
If the initial goal is compilation, we stub the operation by returning a value. So,
int doSomething() {
return 0;
}
Choosing a value to be returned from the stub depends on the situation and how the operation is being used. When testing the stub may be changed to test the different functionalities of the caller. For the purposes of this assignment the actual value doesn't matter provided it is of the appropriate type.
Submission Requirements
Your submission for this assignment will consist of a single zip file that contains the Java source code files (no .class files!) and the two text files containing the asset and account data. The files should not be nested in another folder. The files need to compile with a Java 6 compiler and cannot depend on anything more than each other and the Java 6 Library.
Each each class must be contained in its own file and begin with a header of the form
//
// CLASS :
// AUTHOR :
//
// CLASS DESCRIPTION
//
//
// KNOWN LIMITATIONS
//
//
// ------------------------------------------------------------------------------------------------
You will complete the headers by providing:
The name of the class after "CLASS : "
Your name and access id after "AUTHOR : " in the form
AUTHOR : Joe Marks (jam103)
A brief descrption of the class under CLASS DESCRIPTION
A description of any problems you know exist in your code such as methods that don't work right (explain the shortcomings) or assumptions made that might lead to the class not working correctly under KNOWN LIMITATIONS
Notes on Evaluation
The evaluation of your assignment is in terms of the quality of the content and presentation. For each dimension, below are a set of questions to consider as you are thinking about your solution. The list isn't necessarily complete; you will want to refer back to the lesson content.
Content
Did I meet the specified requirements?
Did I use the most appropriate data types and classes provided by Java?
Do the Java classes have a structure that faithfully realizes the structure defined in the UML diagrams?
Did I use good programming practices?
Is there anything I can do to make the implementation cleaner or more robust?
Presentation
Did I follow the course coding standards?
Are my comments complete sentences and use proper grammar and spelling?
Are identifiers meaningful?
Did I make good use of what space?
Is there anything I can do to make the code more elegant?