Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Edible Insects Japan has vending machines where you can buy edible insects. Left to right: Crickets ( CR ) 1 4 8 0 Mealy worms
Edible Insects Japan has vending machines where you can buy edible insects.
Left to right:
Crickets CR
Mealy worms MW
LocustsLO
CicadasCI
Silk wormsSW
The machine uses and coins is the symbol for yen Write a program named EatEm that asks the user which of the five items that they desire. They will be filling in the two letter code. Ask them which type of coin they want to deposit. Let them keep depositing coins until they have enough. Let them know what their change is Also let them know what the cost would have been in US dollars.
You need to validate that they pick a valid twoletter code and that they put in a valid coin. Then add a loop so they can get more yummy insects. Continue until they answer no
Part : Insect and EatEm
Write the same application as EatEm, except use a blueprint and driver. The output will be identical.
Sample output:
Which type of edibile insect would you like?
cricketCR mealy worm MW locust LO cicada CI or silk worm SW
Please type in the two letter code
LL
That is not a valid code
Which type of edibile insect would you like?
cricketCR mealy worm MW locust LO cicada CI or silk worm SW
Please type in the two letter code
LO
The cost is yen
Deposit a coin either or yen
Which value of coin?
The remaining cost is
Deposit a coin either or yen
Which value of coin?
Not a valid coin
Deposit a coin either or yen
Which value of coin?
The remaining cost is
Deposit a coin either or yen
Which value of coin?
The remaining cost is
Deposit a coin either or yen
Which value of coin?
Your change is Here is your snack.
Here are your coins back
Your change is Y Y coins
In American money, the snack would cost $
More yummy insects? yes or no
yes
Which type of edibile insect would you like?
cricketCR mealy worm MW locust LO cicada CI or silk worm SW
Please type in the two letter code
MM
That is not a valid code
Which type of edibile insect would you like?
cricketCR mealy worm MW locust LO cicada CI or silk worm SW
Please type in the two letter code
MW
The cost is yen
Deposit a coin either or yen
Which value of coin?
The remaining cost is
Deposit a coin either or yen
Which value of coin?
The remaining cost is
Deposit a coin either or yen
Which value of coin?
The remaining cost is
Deposit a coin either or yen
Which value of coin?
The remaining cost is
Deposit a coin either or yen
Which value of coin?
The remaining cost is
Deposit a coin either or yen
Which value of coin?
The remaining cost is
Deposit a coin either or yen
Which value of coin?
Your change is Here is your snack.
Here are your coins back
Your change is Y Y coins
In American money, the snack would cost $
More yummy insects? yes or no
no
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