Computers and Technology

for this lab assignment, you are required to implement the methods specified in the mytree. txt file:

1. create a java file named mytree. java
2. copy the entire code in the mytree. txt and paste to your mytree. java
3. implement the required methods:

public void delete(int data){// implement this method

}
public int height(){ //imjplement this method

}

public mytree balance(){ //implement this method

}
4. once completed, use the treedriver. class to test your implementations. if you implemented all methods properly, the output should look like:

treedriver. class: results
height= 3
300
85
22
10
6

after deleting 300:

height= 2
85
22
10
6

test balancing method

tree before balancing:

9
8
7
6
5
4
3
2
1
after balancing:

9
8
7
6
5
4
3
2
1

tree before balancing:

9
8
6
5
4
3
2
1
0
after balancing:

9
8
6
5
4
3
2
1
0

tree before balancing:

98
78
56
45
9
9
1
0
after balancing:

98
78
56
45
9
9
1
0

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 01:50, akornegay2
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: a. double the number. b. reverse the digits of the number. c. raise the number to the power of 2, 3, or 4. d. sum the digits of the number. e. if the number is a two-digit number, then raise the first digit to the power of the second digit. f. if the number is a three-digit number and the last digit is less than or equal to 4, then raise the first two digits to the power of the last digit. after performing an operation if the number is less than 10, add 10 to the number. also, after each operation determine if the number is prime. each successive operation should be performed on the number generated by the last operation. your program should not contain any global variables and each of these operations must be implemented by a separate function. also, your program should be menu driven. 7. (fraction calculator) write a program that
Answers: 1
image
Computers and Technology, 23.06.2019 06:00, Disd112984
Which statement is true of web-based social media? a. they allow consumers to interact with and update content. b. they cannot be updated easily, as compared to print media. c. they are expensive to produce and maintain, as compared to print and television. d. they can exist independent of the internet.
Answers: 1
image
Computers and Technology, 23.06.2019 18:00, larry5007
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
image
Computers and Technology, 24.06.2019 07:20, stephanieyingepbtcf8
3pointsyou've found an image you want to insert into your slide presentation. youwant to make the image look more gray so that it looks like an older imagewhat would you need to adjust? 0.00o a. sizeo b. hueo c. contrasto d. tones
Answers: 2
Do you know the correct answer?
for this lab assignment, you are required to implement the methods specified in the mytree. txt file...

Questions in other subjects:

Konu
Mathematics, 11.11.2020 01:50
Konu
Mathematics, 11.11.2020 01:50
Konu
Mathematics, 11.11.2020 01:50