On This Page
Overview
This assignment explores the use of linked lists. The lab exercies lead you through the basics of linked lists. The assignment project uses linked lists as follows:
- Implementing an
equals() method
- Using a linked list in place of an array
^ top
Lab Exercises
In these exercises you explore linked lists.
Specifications
- Prepare a single text file named:
exercises.txt. Record answers to all the exercises in this file, labeling each answer with the exercise number.
- Complete self-test exercises 1, 2 and 3 on page 803 of your textbook.
- Complete self-test exercises 4, 5 and 8 on page 807 of your textbook.
- Complete self-test exercises 11 and 12 on page 836 of your textbook.
- When finished, do not forget to upload your file to Blackboard as part of this assignment
^ top
Project Specifications
- Update the
equals() method of the Card class from assignment 6 using the techniques discussed in lesson 7.2.4.
There is no need to update the hashCode() method. Make certain your Deck class still passes the DeckTester with the changes to Card.
- Update the
Deck class from assignment 6 to make use of a LinkedList of Card objects rather than an array.
Before you start, verify that your Deck class from assignment 6 is working correctly. If you had points deducted for your assignment 6 solution, you may either correct your solution to meet assignment 6 specifications or use the instructor's solution, which is posted in Blackboard. Also, if you implemented the extra credit sort() method, you may remove the implementation rather than updating the method.
- To update your
Deck class, use the LinkedList from the Java API we discussed in lesson 10.1.3.
Do NOT write your own linked list and do NOT rewrite the Deck class as a linked list.
- Your updated
Deck class must still pass all the tests of the Test Cases from the DeckTester class of assignment 6.
Do NOT make any changes to the DeckTester class. This means you will need to convert the LinkedList to an array in the getCards() method.
- You must document and organize your code following the requirements in the How To Document and Organize Java Code. Your program must pass CheckStyle configured with the grade_checks.xml for full credit. Note that the CTC has this configured on their computers and that I have instructions for setting up TextPad to use CheckStyle.
- Do not use any
package statements.
- Make an executable JAR of your program containing all the files described in the section of this document: What to Turn In.
Hints
- Shuffling cards in a linked list is the same algorithm as for an array.
^ top
Extra Credit
The following are worth extra credit points:
- Create and submit a second deck class, named
Deck2, that is independant of the Deck class, and uses the final version of the LinkedList class we developed in class. (2 points)
- Modify the data type stored in the linked list to operate with your
Card class.
- You may add other methods to the
LinkedList class but do not change the existing methods.
- Do NOT change the name of the
LinkedList class.
- You will need to modify
DeckTester to use Deck2 as the test class. No other changes are permitted.
Make certain that your README.txt file lists any extra credit attempted.
^ top
Grading Criteria
The instructor will evaluate your assignment using the following criteria. Each criteria represents a specific achievement of your assignment and has a scoring guide. The scoring guide explains the possible scores you can receive.
Some scoring guides have a list of indicators. These indicators are a sign of meeting, or a symptom of not meeting, the specific criterion. Note that a single indicator may not always be reliable or appropriate in a given context. However, as a group, they show the condition of meeting the criterion.
For information on grading policies, including interpretation of scores, see the course information page.
Lab Exercises
- 2: All exercises attempted and turned in
- 1: Some exercises completed and turned in
- 0: No exercises completed or turned in
Program Compilation
- 4: Source code compiles with no errors or warnings
- 0: Does not compile
Functionality
- 10: Demonstrates mastery of the assignment
- Has extra features or demonstrates techniques beyond the assignment
- Applies concepts from the lessons appropriately
- Meets all specifications (see above) with particularly elegant solutions
- Runs to completion with no abnormal error conditions
- Generates correct output given correct input
- Behaves in a reasonable way in response to incorrect data
- 8: Has all the functionality expected of the assignment
- Demonstrates many techniques from the lesson
- Meets all specifications (see above)
- Implementation seems more complicated than necessary.
- May have one minor error
- 6: Has most of the functionality expected of the assignment
- Demonstrates some techniques from the lesson
- Meets all but one of the specifications (see above)
- Implementation seems excessively complicated.
- May have 2-3 minor errors
- 4: Has some of the functionality expected of the assignment
- Demonstrates some techniques from the lesson
- Meets at least 1/2 of the specifications (see above)
- Implementation seems excessively complicated.
- May have more than 3 minor errors
- 2: Serious functional problems but shows some effort and understanding
- Meets less than 1/2 of the of the specifications (see above)
- Has a major error or many minor errors
- Implementation seems very convoluted
- Demonstrates few techniques from the lesson
- 0: Does not execute
Program Style
- 4: Code is well-documented
- 3: Code has minor documentation errors
- Has 1 documentation error
- 2: Code has some documentation errors
- Has 2-3 documentation errors
- 1: Code has many documentation errors
- Has more than 3 documentation errors
- 0: No apparent attempt to document code
README.txt File
- 2: README.txt file submitted with specified information included
- 1: README.txt submitted but some information was not included
- 0: No README.txt submitted
Maximum Score: 22, plus extra credit
^ top
What to Turn In
Submit your assignment following the instructions for homework. Include the following items for grading:
README.txt file
- All Java source code and class files in a single executable JAR file. Include the following items in the JAR file:
Card.java with updated equals() method
Deck.java
Deck2.java (optional extra credit)
LinkedList.java
SimpleCardGame.java (optional as the main file)
- All the
.class files so the JAR executes from the command line
You must submit all the files needed for your assignment to compile and work correctly. Do not assume that the instructors has any files except DeckTester.java and SimpleCardGame.java. Also, do not turn in files that are not part of your assignment, especially ones that do not compile. Your assignment must compile after removing all the .class files and running: javac *.java. In addition, your code must work as submitted.
Home
| Blackboard
| Schedule
| Room Policies
| Syllabus
Help
| FAQ's
| HowTo's
| Links
Last Updated: May 09 2010 @22:30:19
|