Please help with the following. This needs to be coded in C++

Lab 2: Earning Gear

You will implement a program that hands out gear to the players of a particular game. You may

theme your game as you wish.

Your program will use probabilities to decide what gear to hand out to the player. The gear includes

a dagger, a helment, a shield, and armor.

Your Program

All of the gear that will be handed out is represented by a token in a bag. To begin, there are 2

daggar tokens, 3 helmet tokens, 3 shield tokens, and 4 armor tokens in the Token Bag.

The program will choose a token from the bag and give that gear to the player. To simulate which

token was chosen, you will compute the probability of choosing each piece of gear and hand out

the gear with the highest probability of being chosen. If there is a tie, the user gets both (or all)

of the gear with the same probability.

You should display the probabilities of each kind of gear in a table before handing out the gear.

See the sample output for how to format the probabilities.

Remember, you cannot directly compare doubles. You have to compare using abs(x-y) < EPSILON

where EPSILON is some very small number, like 1e-14.

### Recently Asked Questions

- Please help me to analyze a number of continuous and discrete-time sinusoids using MATLAB. Please post MATLAB coding and plotting signals as well.

- Use the linear approximation formula to approximate e 2.1 a. e 2.1 â 8.1661699 b. e 2.1 â ï»¿ \frac{11e^2}{10} ï»¿ c. e 2.1 â e 2 d. e 2.1 â ï»¿

- Which of the following statements about the odds ratio is NOT true? Question 5 options: It can be any non-negative number. The sample odds ratio can be