Extend Project 1 to use advanced data structures and support sorting on various keys.
Elaboration:
Required data structure - the data structure specified in Project 1:
World has SeaPort's
SeaPort has Dock's, Ship's, and Person's
Dock has a Ship
Ship has Job's
PassengerShip
CargoShip
Person has a skill
Job requires skills - optional until Project 3
PortTime
Use the HashMap class to support efficient linking of the classes used in Project 1.
The instances of the hash map class should be local to the readFile (Scanner) method.
These instances should be passed as explicit parameters to other methods used when reading the data file.
For example, the body of the methods like the following should be replaced to effectively use a <Integer, Ship> hash map, the surrounding code needs to support this structure:
Ship getShipByIndex (int x, [login to view URL] <Integer, Ship> hms) {
return [login to view URL](x);
} // end getDockByIndex
Since the body of this method has become trivial, perhaps the call to this method can be simply replaced by the get method of the HashMap.
Your code should be sure to handle a null return from this call gracefully.
The instances should be released (go out of scope, hence available for garbage collection) when the readFile method returns.
Comments: The idea here, besides getting some experience with an interesting JDK Collections class, is to change the operation of searching for an item with a particular index from an O(N) operation, ie searching through the entire data structure to see if the code can find the parent index parameter, to an O(1) operation, a hash map lookup. Of course, this isn't so very interesting in such a small program, but consider what might happen with hundreds of ports, thousands of ships, and perhaps millions of persons and jobs.
Comments: Also, after the readFile operation, the indices are no longer interesting, and could be completely eliminated from the program. In this program, removing the index references could be accomplished by removing those variables from the parent class, Thing.
Implement comparators to support sorting:
ships in port que ArrayList's by weight, length, width, draft within their port que
all items withing their ArrayList's by name
OPTIONALLY: sorting by any other field that can be compared
The sorting should be within the parent ArrayList
Extend the GUI from Project 1 to allow the user to:
sort by the comparators defined in part 2.
Again, the GUI elements should be distinct from the other classes in the program.
Hi, I am a senior Java developer, see my profile to get details. I did many projects for students. So i am sure i can help you to complete your project. Contact me to discuss details. Thanks, Appotato10
$55 USD dalam 3 hari
5,0 (10 ulasan)
4,1
4,1
7 freelancer menawar dengan rata-rata $133 USD untuk pekerjaan ini
hey guys
i am computer engineer with experience java programming for 3 years
i read your description i got it also i see netbeans project but now it's good if you give file to test
Dear Hiring Manager;
I have read your project description and I’m pretty confident that I will be able to get your work done excellently. I am an expert in data entry. I have successfully helped clients with data analysis.
I am confident; I can take up your project and do it with perfection. I have excellent communication skills with over 10 years experience in data entry. I can use ms-excel spreadsheet to compute any type of data. I can use SPSS and CRM to compute data as well. I would be glad to talk about this project with you. I am really interested to know more about your project. What are the other things that I can do to satisfy you for your project? I would love to build an awesome working relationship with you by my Expertise, Honesty, Sincerity and Hard Work.
With 100% accuracy guaranteed, I can create ms-excel templates from scratch to completion for different purposes. I am an expert using ms-excel, VBA macro and formula expert. I have over 5 year experience using excel formula. I can build-complex module program with VBA macro.
I will be looking forward to discussing with you in greater depth and commence work immediately.
Yours sincerely
Femiab