COMP5017 Data Structures and Algorithms- The string “Binary Search Tree

$20 Bonus + 25% OFF

Securing Higher Grades Costing Your Pocket?
Book Your Assignment at The Lowest Price
Now!

Students Who Viewed This Also Studied

COMP5017 Data Structures and Algorithms

Task

Learning outcomes

Students will be able to understand
1.1 Data structures
1.2 The applications of data structures
1.3 Object-oriented programming concepts
1.4 Methods for program testing

Students will have acquired skills in:
2.1 Data abstraction
2.2 The use of data structures
2.3 Programming at a more advanced level in a high-level object-oriented language
2.4 Program testing and documentation

Students will have acquired skills in:
3.1 Self-management
3.2 Learning
3.3 Communication
3.4 Problem solving
3.5 Information technology

Requirements types
• Functional requirements (FRs) specify how the software must behave.
• Operational requirements (ORs) specify aspects such as efficiency.
• Developmental requirements (DRs) specify how your software must be developed. 

Part A – Binary search tree

General requirements

DR1: All your programming must conform to “Java Conventions and Programming Guidelines” – see module Moodle site.

DR2: You must paste the source code of all your classes into your report, as text, not images. 

Requirements
Task 1
FR1: You must create a Java class called MemberBST that implements the interface IMemberDB.
DR3: You must use a binary search tree but it does not need to be self balancing.

You must not encapsulate existing implementations of collections in your submission. For example, you must not create a TreeMap object and call methods on that object from your class. Failure to comply with this will result in zero marks for that part.

Note: use String.compareTo to compare strings lexicographically. You can treat uppercase and lowercase as different. (Hash codes have no place in this assignment.) We recommend that you use composition and make your public methods of your class callmethods taking a node as parameter.
You can implement methods either iteratively or recursively. You must not implement the method remove by just building a new tree. You should use the supplied source text for the method remove, based on Object-Oriented Programming in Oberon-2, Hanspeter Mössenböck Springer-Verlag 1993, page 78, transcribed into Java by David Lightfoot (see template file).

DR4: The constructor for MemberBST must print the string “Binary Search Tree” to System.out.
Take care that you have not used a linear search O(n) where you should have used a binary search tree, aiming towards O(logn). 

Task 2
DR5: You must make appropriate use of assertions (assert statements) to protect preconditions of the operations (they should be the same as those for Assignment 1). Remember to enable assertion checking for your project.

Task 3
DR6: You must make your class log monitoring information, either to a text file or by calls of System.out.println. It must log (at least):
• for every addition of a Member (put), attempt to get the Member or attempt to remove the Member:
o the Member name;
o the sequence of nodes of the tree visited.
• Paste your log into your report.

Task 4
DR7: You must devise a test plan for your implementation. Be sure to check (among many other cases). This must supplement the test plan from Assignment 1 by adding tests:
• that deleting a leaf node works correctly
• that deleting a node with one descendant works correctly
• that deleting a node with two descendants works correctly

Task 5
DR8: By using the supplied main program as in Assignment 1, or by other means, you must test your MemberBST.Include your test plan, test data used, expected results and actual results in  your report. You must show your actual results and the logging information copied from your log file or the output pane of your IDE. Do not simply state “test passed”, or similar – show evidence

Task 6
DR9: You must state honestly which of the requirements of Assignment 2 you have successfully fulfilled, citing evidence. Also comment on the time efficiency and space efficiency of your implementation of the binary search tree and compare it with the hash table.

Part B – Graphs and pathfinding

General requirements

DR1: All your programming must conform to “Java Conventions and Programming Guidelines” – see module Moodle site.

DR2: You must paste the source code of all your classes into your report, as text, not images.

DR3: You must implement all necessary data structures using only arrays.

When programming in Java it is usual to make use of collection classes from the Java class library. However, if you need to program in some other language such classes, or their equivalents, will not necessarily be available. 

Task 1
FR1: You must express your network as a text file using the syntax: “station” name x y “link” station station distance
Each station must have been defined in a station line before being cited in a link line. Include the content of the text file in your report.

Task 2
DR4: You must make appropriate use of assertions (assert statements) to protect preconditions of the operations. Remember to enable assertion checking for your project.

Task 3
FR2: You must write Java methods (as in Appendixes) to perform a depth-first traversal from a given node the network called cornwall and in your network, making use of the algorithm given in the appendix. Include the method’s text and the resulting sequence of node names in your report.

You must use the provided classes: ListInt.java, QueueInt.java, SetInt.java and StackInt.java.

Task 4
FR3: You must write Java methods (as in Appendixes) to perform a breadth-first traversal from a given node the network called cornwall and in your network, making use of the algorithm given in the appendix. Include the method’s text and the resulting sequence of node names in your report.

You must use the provided classes: ListInt.java, QueueInt.java, SetInt.java and StackInt.java

Task 5
FR4: You must implement Dijkstra’s algorithm (as in Appendix) making use of the data structures you have constructed, to find and display the shortest path between two stations in the network called cornwall and in your network. You must also ‘instrument’ your implementation to count the number of iterations of the while loop. 

You must use the provided classes: ListInt.java, QueueInt.java, SetInt.java and StackInt.java.
Show these results in your report. 

Task 6
FR5: You must implement the A-star algorithm (“A*”, as in Appendix) making use of the data structures you have constructed, to find and display the shortest path between two stations in the network called cornwall and in your network. Derive the f values from the coordinates of the stations and use of Pythagoras’ theorem. You must also ‘instrument’ your implementation to count the number of iterations of the while loop.

You must use the provided classes: ListInt.java, QueueInt.java, SetInt.java and StackInt.java.
Show these results in your report.

Task 7
DR5: Explain the difference in performance between Dijkstra’s algorithm and A* algorithm and state how their behaviour differ in the cases of cornwall and your network.

Task 8
DR6: Comment on the degree of success you have achieved with each of these tasks. 

COMP5017 Data Structures and Algorithms

Answer in Detail


Solved by qualified expert

Get Access to This Answer

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

35 More Pages to Come in This Document. Get access to the complete answer.

MyAssignmenthelp.com is here to reduce homework and coursework pressure of students from Australia, UK and US. Growing wisdom with improved academic assignment help is our prime concern. The brand image of MyAssignmenthelp.com lies in the precise and conceptual answers to questions crafted by our outstanding pool of 3000+ writers. Custom essay help, online assignment help and dissertation writing services along with homework and coursework help is our extended range of offerings under one roof. You can trust us with deadlines; we have years of record to deliver the jobs way before the stipulated time. Seek us even in the middle of night; we are all set to serve your queries 24×7. We value the worth of money and pledge to return more than what is invested by our clients.

More COMP5017 COMP5017 Data Structures and Algorithms: Questions & Answers

How do you ensure the only one who can send updates to SkyNet isthe botnet master?
How do you protect the valuable information to ensure it can onlybe read by the botnet master? Remember that anyone can read theinformation uploaded onto pastebot.net.
How do you ensure the botnet updates signed by …

View Answer

Task:
Purpose of the assessment (with ULO Mapping)    Main objectives of this assignment are to enable student to analyse the two case studies, gather requirements for OS and the components. After successful completion of this assignment, students should be able to:a.   &nb …

View Answer

A STL file describes a 3D model as a set of triangular patches. Each patch has a:Surface Normaland 3 verticesEach vertices and the surface normal is represented as a set of X,Y,Z coordinates.For this lab, you will convert a text STL file to a CSV format, with each row representing a Triangular …

View Answer

Question:
Overview
Your task  will be to first pitch, then plan and create assets for, and finally develop a small prototype for an original video game. Your game must not be based on any existing artistic works or media, such as film, television, games, stories, or ch …

View Answer

Content Removal Request

If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the
content removal request.

Choose Our Best Expert to Help You

Samantha Ji

PhD in Chemistry with Specialization in Organic

234 – Completed Orders

Hire Me

Still in Two Minds? The Proof is in Numbers!

33845 Genuine Reviews With a Rating of 4.9/5.

Management

Assignment: 11 Pages, Deadline:
11 days

It was great assignment , i have got very high score on this course . many thanks

User ID: 7***78 Saudi Arabia

Management

Assignment: 12 Pages, Deadline:
17 days

Thank you for another fantastic assignment help, i very pleased on this work i must say once again thank you

User ID: 7***88 Melbourne, Australia

Marketing

Assignment: 3 Pages, Deadline:
2 days

I am happy with the result. The paper is concise and ideas are well presented. Key details needed to respond to the task are evident.

User ID: 7***73 Indonesia

Marketing

Assignment: 2 Pages, Deadline:
1 day

The paper is well-written and covered the required task. I am happy for the output.

User ID: 7***73 Indonesia

Finance

Home Work: 1 Page, Deadline:
7 days

thanks for the grades its very nice to get your great and supportive services, appreciate the expert and the whole team.

User ID: 6***96 Kashipur, Australia

Business Law

Home Work: 1 Page, Deadline:
6 days

I got 52 marks out of 100 marks, i am really happy for these grades in business law, because its tough marking subject . really appreciate the expert …

User ID: 6***96 Kashipur, Australia

Project Management

Home Work: 1 Page, Deadline:
4 days

i got 64 marks out 100 marks, thank you so much for the efforts and supports. I appreciate the whole team.

User ID: 6***96 Kashipur, Australia

Management

Home Work: 1 Page, Deadline:
6 days

i got 70 marks out 100 . Thanks for the grades and efforts made by the whole team.Great!

User ID: 6***96 Kashipur, Australia

Management

Assignment: 8 Pages, Deadline:
13 days

Quick response and doing my escalation properly, satisfied in general and will be happy to make another order anytime soon.

User ID: 4***31 Swansea, Great Britain

Assignment

Home Work: 1 Page, Deadline:
7 hours

This was spot on! Thank you so much for your help! This was spot on! Thank you so much for your help!T his was spot on! Thank you so much for your hel …

User ID: 8***59 United States

Management

Assignment: 11 Pages, Deadline:
11 days

It was great assignment , i have got very high score on this course . many thanks

User ID: 7***78 Saudi Arabia

Management

Assignment: 12 Pages, Deadline:
17 days

Thank you for another fantastic assignment help, i very pleased on this work i must say once again thank you

User ID: 7***88 Melbourne, Australia

Marketing

Assignment: 3 Pages, Deadline:
2 days

I am happy with the result. The paper is concise and ideas are well presented. Key details needed to respond to the task are evident.

User ID: 7***73 Indonesia

Marketing

Assignment: 2 Pages, Deadline:
1 day

The paper is well-written and covered the required task. I am happy for the output.

User ID: 7***73 Indonesia

Finance

Home Work: 1 Page, Deadline:
7 days

thanks for the grades its very nice to get your great and supportive services, appreciate the expert and the whole team.

User ID: 6***96 Kashipur, Australia

Business Law

Home Work: 1 Page, Deadline:
6 days

I got 52 marks out of 100 marks, i am really happy for these grades in business law, because its tough marking subject . really appreciate the expert …

User ID: 6***96 Kashipur, Australia

Project Management

Home Work: 1 Page, Deadline:
4 days

i got 64 marks out 100 marks, thank you so much for the efforts and supports. I appreciate the whole team.

User ID: 6***96 Kashipur, Australia

Management

Home Work: 1 Page, Deadline:
6 days

i got 70 marks out 100 . Thanks for the grades and efforts made by the whole team.Great!

User ID: 6***96 Kashipur, Australia

Management

Assignment: 8 Pages, Deadline:
13 days

Quick response and doing my escalation properly, satisfied in general and will be happy to make another order anytime soon.

User ID: 4***31 Swansea, Great Britain

Assignment

Home Work: 1 Page, Deadline:
7 hours

This was spot on! Thank you so much for your help! This was spot on! Thank you so much for your help!T his was spot on! Thank you so much for your hel …

User ID: 8***59 United States

Have any Query?

GET HELP WITH YOUR HOMEWORK PAPERS @ 25% OFF

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

Write My Paper Button

WeCreativez WhatsApp Support
We are here to answer your questions. Ask us anything!
👋 Hi, how can I help?
Scroll to Top