Question
In java write a program that simulates the childrens game. Input: A list of children and associated data in a text file, one child per
In java write a program that simulates the childrens game.
Input: A list of children and associated data in a text file, one child per line.
# Sample input file for Duck, Duck, Goose program # Name age gender Noah 5 M Emma 8 F Liam 7 M Olivia 4 F Mason 7 M Sophia 6 F Anthony 7 M Ava 9 F Output: Print the state of the game as it progresses, detailing the results of each step of the game.
Problem Description: In a game of Duck, Duck, Goose, a group of children sit in a circle. One of them starts off as It and stands up. The player that is It walks around the circle patting each player in the circle on the head, saying Duck each time, until randomly identifying another player as Goose. The Goose stands up and chases the It player around the circle. The two children race around the circle to the Gooses former spot, the faster one sitting in it while the player standing becomes It for the next round. Between rounds, children occasionally get bored with the game (increases by 5% every round) and go home to play Pokmon. The game ends when fewer than four children remain or an adult calls Snack Time! (The adult will call snack time after a fixed number of rounds).
Implement a Circularly-Linked List and use it to simulate children playing the game. Children have names, gender, and age. Older kids run faster, though they do not always run as fast as they can so they are caught by younger kids 50% of the time. Be mindful that your output is grammatically correct and takes into consideration the gender of the children. Deliverables
output: 5 kids play Duck, Duck, Goose. Michael is it! Duck, Duck, Duck, Duck, Goose! Michael tags Tito and he dashes! Tito runs faster. Michael is it! Jermaine leaves to play Pokemon... 4 players remain. Duck, Duck, Duck, Duck, Duck, Duck, Goose! Marlon chases Michael! Michael runs faster. Marlon is it! Michael leaves to play Pokemon... 3 players remain.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started