Question: SOLVE IN C PLEASE In this assignment, students will demonstrate the ability to write and apply C code to allow a user to interact with
SOLVE IN C PLEASE



In this assignment, students will demonstrate the ability to write and apply C code to allow a user to interact with a menu system and play a game with random number generation. The learning outcomes for this assignment are as follows: - Students will be able to write code, compile it, and test the output against a requirement set. - Students will be able to write code to read user input from the command line / terminal. - Students will be able to apply conditional execution that allows a user to choose menu items. - Students will be able to apply functions to support various menu item selections. - Students will be able to apply loops to allow a user to continuously interact with the program. - Students will be able to apply random number generation to accommodate varying outcomes. Students must work alone on the assignment. DO NOT SHARE CODE. You may discuss concepts, but try to complete the assignment before you ask for any help. This assignment is not meant to trick you in any way. If something is not clear, remember that you have resources available to you. Don't forget to utilize the TA, tutors, or Instructor Office Hours (see Canvas) if you need help. I want you to succeed, and I want you to learn. If you need help, talk to me, the TA, or a tutor, and we will give you guidance! Fishing with Various Bait You go to the Jacksonville Beach pier and try your hand at fishing! You don't really know what's biting, so you bring along three types of bait - live worms, a jig, and chum. Each of these baits attracts the fish differently; for instance, every fish will possibly bite at all baits, but you have a greater chance to catch a particular fish when using the correct type of bait. See below for the probability tables you must use for this project. You plan on fishing for 12 hours. Every time you cast your line, you will leave your bait in the water for 5 minutes. If nothing bites, you will reel it in and try again. However, if something bites, you must spend time to reel it in! See below for the table detailing the amount of time every fish takes to reel in. Lastly, every time you catch a fish, you will sell it to the local fishmonger immediately. At the end of the day - or when you decide to stop fishing - you will count up all the money you made! See below for the amount of money you will receive per fish. Program Requirements: 1. Your program must seed the random number generator (RNG). 2. Your program must determine the caught fish using RNG. 3. Your program must use three different probability sets, one for each bait (see below). 4. Your program must allow the user to choose the bait they want to fish with. 5. Your program must keep track of the remaining time as they go fishing (see below). 6. Your program must keep track of the user's wallet as they catch fish (see below). 7. Your program must use at least one function in addition to the Main function called "GoFish". a. This function must receive an "int" as the type of bait to be used for fishing. b. This function must return an "int" as the fish that was caught (including nothing). 8. Your program must be written in C, and able to be compiled with GCC! 9. The file containing this program must be called "your_last_name_fishing.c" Live Worms Sample Outpu Welcome to the fishing simulator! What type of bait will you use? 1 = Worms 2=Jig 3= Chum 1 = Leave Early 1 Caught a Red Snapper! Remaining time: 700 Current Wallet Size: 250 What type of bait will you use? 1 = Worms 2= Jig 3= Chum 1 = Leave Early 1 Caught a Flounder! Remaining time: 690 Current Wallet Size: 350 What type of bait will you use? 1 = Worms 2= Jig 3= Chum -1 = Leave Early 1 Thank you for fishing. Final wallet size: 350
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
