Unformatted text preview:

COP 3540 – Data Structures with OOPProject 3 – Fall 2010Due: 27 Oct 2010 (Wednesday) late date: 29 Oct 2010 (Friday) Doubly-Linked Lists, Stacks, and More Using NetBeans 6.7 or later version, 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 pseudo-codeProvide 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, AsiaCountries.Fall2010.txt you are to create a doubly linked list of objects from countries in West Asia only. Then you are to create two stacks implemented via linked lists – one for adds 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 AsiaCountry objects from the input file (West Asia only). Youhave already done this. You may use an Arraylist or not. This is your choice.Task 2. Sort the file using the selection sort. Task 3: Create a doubly-linked list of ordered AsiaCountry objects based on country name. You can do this directly from your sorted array of AsiaCountry 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. These entries will be in sorted, ascending order.Task 5: Using the input file, LinkedListUpdateTrans.Fall2010.txt, you are to create two 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 these inputs until EOF. Close the input file explicitly. You will need to use StringTokenizer to create these objects.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 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 at the end. For each successful attempt, also provide the number of links inspected before getting a good hit.Task 8: Update the doubly linked list using the Add stack as inputs. 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. Provide a count ofsuccessful attempts and unsuccessful attempts at the end. For each successful Add attempt, also provide the number of links inspected before getting to the correct place in the linked list. Task 9: Display the updated doubly-linked list backward using rear pointers. Naturally, as always, include appropriate headers. You are done!This assignment looks long. But it really isn’t. Take it one step at a time, as usual. 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.Summer2010 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 3540Fall 2010 Program is worth 100 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 pseudo-code) – 15 pointsYou must provide your pseudo-code for your Asiacountry collection class only (orwhatever 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 pseudo-code 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


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?