Answered step by step
Verified Expert Solution
Question
1 Approved Answer
parrots.txt 12 If 17 advance 19 direction 7 you 14 the 20 a 4 confidently 9 in 18 with 5 your 11 you 15 meet
parrots.txt
12 If 17 advance 19 direction 7 you 14 the 20 a 4 confidently 9 in 18 with 5 your 11 you 15 meet 2 of 6 in 16 hours. 3 unexpected 10 common 13 will 1 success 8 dreams
parrotsTest.txt
17 Oh 21 for 8 beautiful 32 skies 9 spacious
I am new to binary trees, any help would be appreciated! Thanks!
Assignment Description This assignment provides the opportunity to implement a binary tree, and to implement a level-order traversal of the tree. The first step is to fill a binary search tree with singing parrots. Each parrot has an ID number and one word that is part of a song. The parrots are placed in the binary tree using their IDs as keys. After the tree is filled, traverse the tree in level-order, getting each parrot to sing its word as you visit it. The complete program contains the following classes: 1 Parrot 1 Binary Tree .1 Node (inner class of the Binary Tree) Specifications 1. Create a Java class called UsernameAssignment10 2. Follow "CS1450 Programming Assignments Policy" 3. In your design notebook do the following: a. b. c. Draw a binary tree from the input given in Figure 1 below. Do a level-order traversal of the binary tree diagram in Figure 2 below. Translate the key sequence from that traversal into words using the decoder in Fiqure3 4. Write a test program (i.e. main) to do the following: Create an instance of your binary tree ADT class: BinaryTree Create parrots and add them to the binary tree a. b. i. For each parrot in the file: .Read the parrot's ID and song word Create a parrot object Assignment Description This assignment provides the opportunity to implement a binary tree, and to implement a level-order traversal of the tree. The first step is to fill a binary search tree with singing parrots. Each parrot has an ID number and one word that is part of a song. The parrots are placed in the binary tree using their IDs as keys. After the tree is filled, traverse the tree in level-order, getting each parrot to sing its word as you visit it. The complete program contains the following classes: 1 Parrot 1 Binary Tree .1 Node (inner class of the Binary Tree) Specifications 1. Create a Java class called UsernameAssignment10 2. Follow "CS1450 Programming Assignments Policy" 3. In your design notebook do the following: a. b. c. Draw a binary tree from the input given in Figure 1 below. Do a level-order traversal of the binary tree diagram in Figure 2 below. Translate the key sequence from that traversal into words using the decoder in Fiqure3 4. Write a test program (i.e. main) to do the following: Create an instance of your binary tree ADT class: BinaryTree Create parrots and add them to the binary tree a. b. i. For each parrot in the file: .Read the parrot's ID and song word Create a parrot object
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started