Zookal
Zookal

We’d love to hear any feedback or comment from you!

© 2011-2021 Zookal Pty Ltd

View question and answer

From our collection of questions and answers
Engineering · Computer Science
Question details

Duck, Duck, Goose

  1. We are going to play duck, duck, goose. Read the text file of unique first names (players.txt) and place them in a circular linked list. Assume the text file is properly formatted and that there is no bad data. Assume text file is in the current directory.
  2. Print the circular linked list in a serial format to the console. The assumption is that the head of the list will be linked to the tail of the list.
  3. Generate a random number between 1 and 10 inclusive. This number is the player who is the “goose”. Output this random number to the console.
  4. Iterate over the linked list. Remove the “goose” (a loser) from the circular linked list. Print the new circular linked list in a serial format. The assumption is that the head of the list will be linked to the tail of the list.
  5. Generate another random number between 1 and 10 inclusive. This is the new “goose”. Starting at the player AFTER the last loser, find the next goose. Print the new circular linked list in a serial format after this goose is removed.
  6. Continue play until there is only one player left in the list—The WINNER!! Print out the winner.
  7. Name your primary class which contains your main method DuckDuckGoose.java.
  8. Submit all java files needed to build and run your application. Do not use packages, as this makes grading more difficult.
  9. You must use the LinkedList class with an iterator. NO INDEXING MAY BE USED! Any additional instructions given in class must be conformed to.
Answer
Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.

Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.