In Java code 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 Participant’s GiftCards.
• Check if any Participant has a sum total value of their GiftCards greater than $3,000. If so, eliminate them from the game.
• Allow each remaining Participant two opportunities to switch GiftCards. Display each Participant’s 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.