Our Services

Get 15% Discount on your First Order

[rank_math_breadcrumb]

Lab Goal : Java – Binary Tree. Will leave an upvote. This lab was designed to teach you more about Binary Trees. Lab Description : Write a binary search tree class. For the base lab, you must write

 Lab Goal :

Java – Binary Tree. Will leave an upvote.

This lab was designed to teach you more about Binary Trees.  Lab Description : Write a binary search tree class. For the base lab,  you must write the following methods :: preOrder, postOrder, inOrder,  revOrder, getNumLeaves, getNumLevels, getWidth, getHeight, getNum Nodes,  toString, is Full. The following method groups are extra credit. Each  group will net you an extra ten points on your base 100 point lab grade.  You can complete any or all of the options in any order you prefer.  Complete as many of these options as you can. Group 1 :: write a method  to search the tree for a value and return true or false Group 2 :: write  getLargest and getSmallest methods to return the smallest and largest  tree values Group 3 :: write a level order traversal using the Java  LinkedList as a Queue Group 4 :: write a method to remove a node from  the tree – must be recursive Group 5 :: write a method to display the  tree like a tree-level order traversal might be useful Sample Output :  IN ORDER 70 80 85 90 98 100 120 ROOT 90 80 100 70 85 98 120 PRE ORDER 90  80 70 85 100 98 120 POST ORDER 70 85 80 98 120 100 90 height = 2 width =  5 numLevels = 3 numLeaves = 4 numNodes = 7 isFullTree = true REVERSE  ORDER 120 100 98 90 85 80 70 Tree height is 2 Tree width is 5 Number of  leaves is 4 Number of nodes is 7 Number of levels is 3 Tree as a string  70 80 85 90 98 The tree is full. 100 120 © A+ Computer Science –Binary  Trees – www.apluscompsci.com BONUS SECTION The tree contains 100! The  does not contain 114! The smallest tree node 70 The largest tree node  120 Tree before removing any nodes – using level order traversal. 90 80  100 70 85 98 120 Tree after removing 90. 98 80 100 70 85 120 Tree after  removing 70. 98 80 100 85 120 Tree after removing 85. 98 80 100 120 Tree  after removing 98. 100 80 120 Tree after removing 80. 100 120 Tree  after removing 120. 100 Tree after removing 100.  

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Part 1Title: Computer Hardware Using bullet points, briefly describe a computing device you use often, such as your desktop, laptop, tablet, or smartphone. Identify the make and model, and at least th

Part 1Title: Computer Hardware Using bullet points, briefly describe a computing device you use often, such as your desktop, laptop, tablet, or smartphone. Identify the make and model, and at least three other components of the computing device. In the speaker notes, discuss in detail what you use the device

Network Threats and Attacks You have now learned about recognizing security threats, vulnerabilities, and how to mitigate them. Almost every day, there are reports of an intrusion, breach of confident

Network Threats and Attacks You have now learned about recognizing security threats, vulnerabilities, and how to mitigate them. Almost every day, there are reports of an intrusion, breach of confidentiality, or some other high-profile attack. Find a news article about a recent network attack (no more than one year ago).

I am doing IFSM 300 Information Systems in Organization. the instructions The Stage 4 case study project is due as shown in the schedule. The assignment instructions and vendor brochure are attached.

I am doing IFSM 300 Information Systems in Organization. the instructions The Stage 4 case study project is due as shown in the schedule. The assignment instructions and vendor brochure are attached. The Case Study is posted under Course Resources. Use the Case Study and weekly readings to develop your assignment and understand the concepts

Find 5 student organizations that interest you. For each organization: Why are you interested in this organization?Describe some of the activities of the organizationWhen and where is the next meeti

Find 5 student organizations that interest you.  For each organization: Why are you interested in this organization? Describe some of the activities of the organization When and where  is the next meeting? If you have questions about the organization, how would you contact them?CSE1106 – Intro to Computer Science and

Network Threats and Attacks You have now learned about recognizing security threats, vulnerabilities, and how to mitigate them. Almost every day, there are reports of an intrusion, breach of confident

Network Threats and Attacks You have now learned about recognizing security threats, vulnerabilities, and how to mitigate them. Almost every day, there are reports of an intrusion, breach of confidentiality, or some other high-profile attack. Find a news article about a recent network attack (no more than one year ago).

Linux in Action (Required/Graded) Review this Linux case study. In particular, review the section titled “Results.” Share your thoughts on Linux after reviewing this study. Did you learn anything tha

Linux in Action (Required/Graded)  Review this Linux case study. In particular, review the section titled “Results.” Share your thoughts on Linux after reviewing this study. Did you learn anything that surprised you? Did it influence your opinion about Linux? Why or why not? In addition to your primary forum response, post

Linux Project and Virtualization (Required/Graded) Next week, the final element of your project will be due. In this phase, you’ll install Linux into a virtual machine and demonstrate some Linux comm

Linux Project and Virtualization (Required/Graded)  Next week, the final element of your project will be due. In this phase, you’ll install Linux into a virtual machine and demonstrate some Linux commands. A vital element of the project is virtualization. Have you previously used virtualization tools, such as VMware, VirtualBox, HyperV,

Careers in Linux System Administration (Required/Graded) SubscribeChoose from one of the following options. Be sure to include the option number in your response. 1. Job Search Use Indeed.com, Monst

Careers in Linux System Administration (Required/Graded) SubscribeChoose from one of the following options. Be sure to include the option number in your response. 1. Job Search Use Indeed.com, Monster.com, or LinkedIn.com to research IT job careers that require Linux Administration skills in your area. You can use keywords such as "Linux

Write a Java program as follows:1. Prompt the user on which action they want to take:a. Convert cubic feet to U.S. bushelsb. Convert miles to kilometersc. Determine graduation with honors titled. Exit

 Write a Java program as follows:1. Prompt the user on which action they want to take:a. Convert cubic feet to U.S. bushelsb. Convert miles to kilometersc. Determine graduation with honors titled. Exit program2. Programs at a minimum must have the following methods:a. Convert cubic feet method that gets cubic feet

Calculator Server and Client Java The goal: Make a client that sends simple arithmetic expressions, and a server that solves them and sends the result back to the client. Class design requirements:

Calculator Server and Client  Java  The goal: Make a client that sends simple arithmetic expressions, and a server that solves them and sends the result back to the client.  Class design requirements:  Your program should contain at least the following classes • CalculatorClient • CalculatorServer Important note: This is an

This is about java. I would appreciate your help! Please do not provide a “copy and paste answer”! Among other things, the purpose of this assignment is to assess the student’s ability to write a pro

This is about java. I would appreciate your help! Please do not provide a “copy and paste answer”!  Among other things, the purpose of this assignment is to assess the student’s ability to write a program dealing with window events, mouse events, and the Delegation Event Model. PROGRAM SPECIFICATIONS Beginning

The following program draws an BB-8 as shown below. Modify the program to move the BB-8 left or right using the arrow keys. The program can be download from the CMS. Please use Javafx   import java

The following program draws an BB-8 as shown below.  Modify the program to move the BB-8 left or right using the arrow keys.  The program can be download from the CMS. Please use Javafx  import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.input.KeyCode; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; import javafx.scene.shape.Line; import javafx.stage.Stage;