Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java, make an array based binary tree with the following specifications: - Create an integer 1 dimensional array named ArrayTree, also an integer variable

In Java, make an array based binary tree with the following specifications:
- Create an integer 1 dimensional array named ArrayTree, also an integer variable for the number of nodes in the array for the tree
- Make a constructor for the array based tree, that is an integer which will be used to create an array based on the parameter
- A method to insert a node into the tree, that checks if the tree is full beforehand
-A method to print out the tree with a loop that gets user input, that checks if the tree is empty before trying to print, then print by each "level" of the tree
-Create two methods, one named findIndex which returns the index of the value in the array tree, and another method called parentIndex, which checks if the value is in the tree and if that value is the parent node. Then return the index of said parent using [(k-1)/2].
Thank you.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

Develop an awareness of tax research tools.

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago