Question: In Java code the following: Make sure to follow the program requirements. Starting with the UML object model add a GameMaster object to the model.
In Java code the following: Make sure to follow the program requirements.
Starting with the UML object model add a GameMaster object to the model. The GameMaster object will control the overall gameplay, handle the Barrel, manage Participants, and determine the winner.
Write a main program that will:
Ask the user for the number of Participants up to a certain limit
Get the name of each Participant.
Assign three GiftCards to each Participant. Show each Participants GiftCards.
Check if any Participant has a sum total value of their GiftCards greater than $ If so eliminate them from the game.
Allow each remaining Participant two opportunities to switch GiftCards. Display each Participants GiftCards after switching.
After all Participants have had their opportunities, check if any Participant has two or more GiftCards from the same company or with the same monetary value. If so eliminate them.
Determine the winner as the Participant with the lowest sum total value of their GiftCards, where each GiftCard is unique different category, company, and monetary value
Display the winner and their GiftCards.
Test and check that all the requirements are working as expected.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
