Question: USING JAVA Purpose: Use data types/variables, various selection structures, random number generation input/output, performing calculations and formatting output. have just been given the opportunity to

USING JAVA  USING JAVA Purpose: Use data types/variables, various selection structures, random number

generation input/output, performing calculations and formatting output. have just been given the

Purpose: Use data types/variables, various selection structures, random number generation input/output, performing calculations and formatting output. have just been given the opportunity to win prizes from a sweepstakes entry Description: You you made at the county fair! The opportunity includes winning 4 prizes, each will be determined by a different game of chance. You may create your own descriptions for the prizes and values as you like, just make sure they are patterned as follows. Each of these requires a random number generation 1. Flip a coin: Depending upon the heads or tails result, you will get prizel: a. Heads: A smartphone charger worth $9.99 b. Tails: A 9-volt battery and a wire worth $0.49 (the booby prize) 2. Roll a six-sided die: Depending upon the number that comes up, you will get prize2: a. 1: A refrigerator magnet worth $1.49 b. 2: A handy grocery bag worth $.59 (the booby prize) c. 3: Ahalf-price ticket to next years fair worth $4.00 d. 4: A CD with hits from 12 bands playing at the fair worth $12.00 e. 5: A coupon for a free item at one of the concession stands worth $5.00 f. 6: A stuffed animal penguin worth $8.00 3. Spin a roulette wheel: Depending o the color (red or black) and the nu mber (1 to 100), you will get prize3: a. Red doubles the prize, Black triples the prize b. Spin 1-20: rn a penny (the booby prize) c. Spin 21-40: n $4.00 d. Spin 41-60: Earn $1.00 e. Spin 61-80: Earn $2.00 f. Spin 81-100: Earn $3.00 4. Draw one card from a deck of 52: Depending on the number, suit, or face card, you will get prize4 a. Suits (multiplier): Club (x1), Diamond (x2), Heart (x3), Spade (x4) b. Numbers 2-10: Get a deck of cards worth $1.00 c. Number 11 Jack): Get a game of jacks worth $.50 (the booby prize) d. Number 12 (Queen): Get an autographed picture of the fair queen worth $2.00 e. Number 13 (King): Get an autographed picture of the fair king worth $2.00 f. Number 14: (Ace): Get $10.00 After counting the number of booby prizes one person may get, use the following scale to award a consolation prize: a. 1 booby prize $1.00 b. 2 booby prizes: $2.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!