Question: Need help writing Java Code follow the requirement below. Some codes were provided to assist . 2. The beautiful princess Eve had many suitors. She
Need help writing Java Code follow the requirement below. Some codes were provided to assist .



2. The beautiful princess Eve had many suitors. She decided on the following procedure to determine which suitor she would marry. First, all of the suitors would be lined up on after the other and assigned numbers. The first suitor would be number 1, the second number 2, and so on up to the last suitor, number n. Starting at the first suitor she would then count three suitors down the line (because of the three letters in her name) and the third suitor would be eliminated from winning her hand and removed from the line. Eve would then continue, counting three more suitors, and eliminating every third suitor. When she reached the end of the line she would continue counting from the beginning For example, if there were six suitors then the elimination process would proceed as follows 123456 initial list of suitors, start counting from 1 12456 suitor 3 eliminated, continue counting from 4 suitor 6 eliminated, continue counting 1 1245 125 suitor 4 eliminated, continue from 5 suitor 2 eliminated, continue from 5 15 suitor 5 eliminated, 1 is the lucky winner Write a program in Java that creates a singly linked list of nodes to determine which position you should stand in to marry the princess if there are n suitors. Your program should simulate the elimination process by deleting the node that corresponds to the suitor that is eliminated for each step in the process. Follow are the specifications of the program in more detail. You will implement a singly linked list in the manner of the class LinkedList3KT that is, your list has to be generic. In fact, you may use many methods in that class. Note that the list cannot be double linked, that is, each node has only one pointer to the next node. To make things more interesting, we will name this class "LinkMaster". It should have the structure below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
