Assignment is intended to give you practice writing


Assignment: Recursion in BSTrees

Recursion in Binary Search Trees

This assignment is intended to give you practice writing recursive code that traverses a common computer programing structure: a binary search tree.

In this assignment you will implement a simple binary search tree using recursive methods: insert, find and remove. These trees are very common to computer science and are typically handled with recursive methods to help attain their intended efficiency.

It is intended that you write this assignment by modifying the answer code from assignment #2. You can use your own answer code or the code we post as answer code as your starting point. We will describe the requirements as though you are modifying the answer code from assignment #2 but you are of course free to start from scratch as well.

1)The TA will open IntelliJ and open your code as an IntellliJ project. (If you compress your code then provide a .zip file only (we will not support .rar, .tar, ... etc.) Only .zip files.

2)The TA will then rebuild (compile) your project and look for a source file among your code with "main" in its file name and then run that as a java application.

3)Once your code launches it will be evaluated against the assignment requirements. If any of steps 1,2 or 3 fail the assignment gets a
mark of 0. So be aware no partial marks will be awarded to assignments that don't compile and run.

Assignments are intentionally broken down into many small requirements. It is better have running code that satisfies some of them than to have code that won't compile and run but claims to be address more requirements.

The following good practice requirements will be in effect for all assignments.

R0.2) All of your variables, methods and classes should have meaningful names that reflect their purpose. Do not follow the convention common in math courses where they say things like: "let x be the number of customers and let y be the number of products...". Instead call your variables numberOfCustomers or numberOfProducts. Your program should not have any variables called "x"unless there is a good reason for them to be called "x". (It's OK to call simple for-loop counters i,j and k etc. when the context is clear and very localized.)

R0.3) All variables in your classes should be private, unless a specific design requirements asks for them to be public (which is unlikely). It is good programming practice to design objects that provide services to others through their public methods.

How they store their variables is their own private business.

R0.4) Robustness Requirements: Your program should never crash when is is being run for marking. Make sure you have no null pointer exceptions or attempt to access an array or data structure out of bounds. (We get especially annoyed by out of bounds errors since they still seem to be the number one bug in programming and have been for a long long time!)

R0.5) Code Comment Requirements: Comments in your code must coincide with what the code actually does. It is a very common bug in industry for people to modify code and forget to modify the comments and so you end up with comments that say one thing and code that actually does another. By the way, try not to over-comment your code; instead choose good variable names and method names which make the code more "self commenting".

R0.6) Hard Coded Constants: Your code should not have hard coded constants used in places like if statements or function parameters. Your constants should have meaningful names. Don't have if statements like if(ball.getLocationX() + 40 < 100) ...; instead your code should look like if(ball.getLocationX() + ballRadius < rightBoundaryX) ...; If necssary create local variables that reflect the use of the constant. e.g. double rightBoundaryX = 100; then you can refer to that in your program logic.


Attachment:- java.zip

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Assignment is intended to give you practice writing
Reference No:- TGS01132093

Expected delivery within 24 Hours