In C++ please! ( https://www.answers.com/homework-help/questions-and-answers/2-bst-50-wizards-hogwarts-lost-memory-badge-f

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

In C++ please! ( https://www.answers.com/homework-help/questions-and-answers/2-bst-50-wizards-hogwarts-lost-memory-badge-f

Post by answerhappygod »

In C++ please! (
https://www.answers.com/homework-help/que ... -q97528258
) this is not good
In C Please Https Www Chegg Com Homework Help Questions And Answers 2 Bst 50 Wizards Hogwarts Lost Memory Badge F 1
In C Please Https Www Chegg Com Homework Help Questions And Answers 2 Bst 50 Wizards Hogwarts Lost Memory Badge F 1 (43.41 KiB) Viewed 11 times
2. Binary Search Trees (BST) (5p) The wizards of Hogwarts have lost their memories. All they have is a badge with their last name, first name and a score. Help them remember which of the 4 houses they belong to. (1p) Create a Sorcerer class with the fields last name, first name, score, house. Add them constructors and methods needed. (0.5p) Declare several Sorcerer type objects and add them to the BST. When you press different options (1, 2, 3, 4, 5), you have to do the operations following: a) (0.25p) Show wizards sorted in ascending order according to their score b) (0.25p) Display the total score of a house (we enter key 2 and the name of the house) c) (1p) View Members of Each House of Hogwarts by Category and Refresh each person's "house" field, using the BST. - if the score is between 0 and 5000, the house is Hufflepuff - if the score is between 5000 and 20000, the house is Gryffindor - if the score is between 20000 and 50000, the house is Ravenclaw - if the score is >>50000, the house is Slytherin. For example, we will display: - Maison Hufflepuff: Cedric Diggory, 2000 - Maison Gryffindor: Harry Potter, 10000; Hermione Granger, 17000 - Maison Ravenclaw: Luna Lovegood, 31000 - Maison Slytherin: Draco Malfoy, 60000; Severus Snape, 150000. d) (1p) Congratulations :) Now we can play Quidditch. But the game can take place only if the set of wizards is complete. We say that the set is integral if all the tree nodes have zero or two children. e) (0.5p) Given a sequence of scores in ascending order that represent the players, check if this sequence exists and if so, display the names of the players always in ascending order. Attention! You cannot use any other structure of auxiliary data, only an array with the read sequence and the binary tree. Example 1: 2000, 10000, 31000, 60000 will display: Oui: Cedric Diggory, Harry Potter, Luna Lovegood, Draco Malfoy Example 2: 2000, 31000, 10000, 60000 will display: No //(or wrong order) Example 3: 2000, 31000, 45000, 60000 will display: No //(because 45000 does not exist) The interactive menu with options: 0.5p
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply