Problem

Fishing Game Simulation Write a program that uses the Die class that was presente...

Fishing Game Simulation

Write a program that uses the Die class that was presented in Chapter 4 to simulate a fishing game. In this game, a six-sided die is rolled to determine what the user has caught. Each possible item is worth a certain number of fishing points. The points will remain hidden until the user is finished fishing, and then a message is displayed congratulating the user depending on the number of fishing points gained.

Here are some suggestions for the game’s design:

? Each round of the game is performed as an iteration of a loop that repeats as long as the player wants to fish for more items.

? At the beginning of each round, the program will ask the user whether or not they want to continue fishing.

? The program simulates the rolling of a six-sided die. (Use the class that was demonstrated in Chapter 4 .)

? Each item that can be caught is represented by a number generated from the die. For example, 1 for “a huge fish”, 2 for “an old shoe”, 3 for “a little fish”, and so on.

? Each item the user catches is worth a different amount of points.

? The loop keeps a running total of the user’s fishing points.

? After the loop has finished, the total number of fishing points is displayed, along with a message that varies depending on the number of points earned.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT