Question: Write a driver program that obtains the input n, a list of n suitors' names, and a list of n-1 integers to be used

Write a driver program that obtains the input n, a list of

Write a driver program that obtains the input n, a list of n suitors' names, and a list of n-1 integers to be used as "rotate steps." Using the class you have written, the program prints the names of the rejected suitors (in the order of rejection), and then prints the name of the lucky guy. 6. Wedding Lottery II Write an appropriate graphical user interface for the Wedding Lottery problem. The interface should allow the princess to specify the list of suitors using commands of the form add name. Once the princess has entered all the names, she presses a button labeled "Choose" to move from the input phase to the selection phase. In the selection phase, the user interface displays a list of suitors already rejected and another list of suitors still under consideration. The interface will have a text field in which the princess can enter a number for the next rotate step. As long as there is more than one suitor left, the program eliminates a suitor each time the princess types a number into the rotate step text field. 7. Adjacency List Input Create a file containing the adjacency list data given at the end of this chapter, and then modify the program in Code Listing 19-6 so that it reads the file and uses the data found in the file to build the adjacency list structure. Use an array of strings to keep track of the association between node names and node numbers that is given at the beginning of the file, and then use an array or an ArrayList of lists of numbers for the adiacency list structure Print the adiacency list twice: once using numbers to Hi 87F 4 ENG

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!