Hi, would you be able to assist me with problem in java code. ......Four new students have arrived at Hogwarts School of Witchcraft and Wizardry. The students will join one of the four houses, Gryffindor, Hufflepuff, Ravenclaw, and Slytherin. The sorting hat has gone missing so in the meantime students will provide a list of the houses they wish to join and the Houses will rank the students in the order they wish to choose. You have been tasked with creating a program to determine a stable match between the students and Houses. The students will get to select their house of choice one at a time. If a student selects a house that is already chosen but rates higher on the list for that house, they are paired to that house and the student who is now un paired will need to select a new house form their ranked list.   The program will need each student's name and list of house preferences. Additionally, it will need each house’s name and ranked list of students. How you implement that portion via, prompt, passing in a file or hard coding a data structure is up to you. You should have a function called stable_matching which implements the Gale – Shipley stable matching algorithm.   When the program terminates the following information should be displayed / printed, each student and their preferences, each House with their ranked selection of new students, and finally the stable match pair.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter2: Problem Solving Using C++using
Section2.3: Data Types
Problem 5E
icon
Related questions
Question

Hi, would you be able to assist me with problem in java code. ......Four new students have arrived at Hogwarts School of Witchcraft and Wizardry. The students will join one of the four houses, Gryffindor, Hufflepuff, Ravenclaw, and Slytherin. The sorting hat has gone missing so in the meantime students will provide a list of the houses they wish to join and the Houses will rank the students in the order they wish to choose.

You have been tasked with creating a program to determine a stable match between the students and Houses. The students will get to select their house of choice one at a time. If a student selects a house that is already chosen but rates higher on the list for that house, they are paired to that house and the student who is now un paired will need to select a new house form their ranked list.

 

The program will need each student's name and list of house preferences. Additionally, it will need each house’s name and ranked list of students. How you implement that portion via, prompt, passing in a file or hard coding a data structure is up to you.

You should have a function called stable_matching which implements the Gale – Shipley stable matching algorithm.

 

When the program terminates the following information should be displayed / printed, each student and their preferences, each House with their ranked selection of new students, and finally the stable match pair.

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Topological Sort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr