Unformatted text preview:

COP 3540 – Data Structures with OOPProject 3 – Spring 2010Due: 9 March; late date: 11 March 2010 Doubly-Linked Lists, Stacks, and More Using NetBeans 6.7, you are to write a Java program using OOP principles to accommodate the following functionality Assignment #3Objectives:Provide student additional experiences with file input.Provide student exercises in learning UML (architectural design)Provide student exercises in developing detail design pseudocodeProvide student exercises in Javadoc and its various formatsProvide student exercises in building a doubly-linked list of Country objects.Provide student with experience in inserting, deleting, and searching the doubly-linked list Provide student with exercises in updating a linear linked listOverview:Given the sequential file, Countries.txt you are to create a doubly linked list of Country objects. Then you are to create two stacks implemented via linked lists – one foradds and one for deletes from the doubly-linked list. Perform this maintenance, and then display the updated linked-list backwards.Functions: Task 1: Create an array of Country objects from the input file. You have already done this.Task 2. Sort the file using any O(n2 ) sort of your choosing. You have already done this too.Task 3: Create a doubly-linked list of ordered Country objects. “A” is considered low and should be first in your ordered doubly-linked list. You can do this directly from your sorted array of country objects.Task 4: Using a toString() method, display the ordered doubly-linked list – one object per line. Be certain to precede this display with an appropriate header naming your outputs, such as Doubly-Linked List Displayed Using Forward Pointers followed by a column header the names the attributes of the country objects that follow.Task 5: Using the input file, LinkedListUpdateTrans.Spring2010.txt, you are to createtwo stacks of country objects with each stack implemented via a linked list. One stack is to contain the Add transactions, while the other stack is to contain the Delete transactions.You are to open() this file and create the stacks with a single pass of the input file. Read and process the inputs until EOF. Close the input file explicitly.Task 6. Using appropriate professional headers, you are to then display each stack separately. Tag each one so that it is clear which stack contains the Adds and which one contains the Deletes.Task 7: Update the doubly linked list using the Add stack as inputs first. For each transaction, indicate the success of the Add attempt or the failure (Dupe Add Attempted) of the Add attempt. Ensure the add node is in its proper ordered position in the linked list. Provide a count of successful attempts and unsuccessful attempts.Task 8: Update the doubly-linked list using the stack of delete transactions. For each transaction, indicate the success of the Delete attempt or the failure of the Delete attempt (Not Found). Provide a count of successful attempts and unsuccessful attempts.Task 9: Display the doubly-linked list backward using rear pointers. Naturally, as always, include appropriate headers. You are done!This assignment looks long. It is. But, if you take it one step at a time, it is very straightforward and you have PLENTY of time if you start right away and work slowly and methodically.Procedure:I urge you to tackle this problem incrementally. Using a small sample of the inputfile to test your procedure. Then build the entire linked list. Verify as you go. Use the toString method or other display method to your advantage and VERIFY that you are in fact building the doubly-linked list correctly!Deliverable: Your zipped folder to me MUST include copies of your data files. I will need these to run your program and to test it. Do not provide me with output your program generates. I will get your program to generate your outputs. As noted, your outputs will be displayed on the screen. I very well may, however, substitute a differentLinkedListUpdateTrans.Spring2010 file for testing. You are to zip all files in your COP3540 folder being certain to have a Main class and your project named, project3yourname as expected. Zip your project file and submit it to me via Blackboard Assignment links as you have done in the past. Check out your work prior to submitting it to me and print out a copy of your submission. Cover yourself!Grading – Project 3 – COP 3540Spring 2010Program is worth 120 pointsSource Code – 20 pointsLooked at closely:Indentation – consistent and reasonable. Suggest four spaces; Internal comments;Scope terminators; Overall program documentation and readability.Architectural Design (using UML) – 15 pointsYour design must reflect good object-oriented design as we have discussed repeatedly. Objects are to contain the methods that operate on the data they contain as much as possible. Ensure your UML design reflects these classes and their methods with appropriate signatures. Correctness, associations, completeness - This means that the classes you identify are correct, that associations are indicated, and that the attributes and methods are documented within the classes. All classes are to be connected. Be certain to note that UML entries for a method are NOT the same as a Java method entry.Detail Design (using pseudocode) – 15 pointsYou must provide your pseudocode for your country collection class only (or whatever you call it. This is the one that will contain the pointer to the start of the linked list. It really is your most significant class. This needs to be the class that actually has the methods that does the real work regarding the linked lists: building updating, displaying, validating, etc. Examples may be found on my web page. Recognize that your pseudocode should be done prior to your coding in Java. If you have any questions, please ask early!Javadoc – 10 points.Appropriateness and completeness of commentsALL methods must have Javadoc comments up front that are meaningful, please..Outputs – 40 pointsAccuracy and Format. All functionality present!Skip lines in between displayed numbers for readability.Include headers / descriptors as specified. Points are distributed in proportion to each function implemented and displayed. Program must run totally to end of job to receive a passing grade (above 60) and to receive at least partial credits above. Start early and do this a little at a


View Full Document

UNF COP 3540 - Study Notes

Download Study Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?