You are writing a program to estimate how many monsters they can expect to capture in each region….

You are writing a program to estimate how many monsters they can expect to capture in each region. • You’ve got a Small Monster Index that tells you the name, type, and relative commonality of all the small monsters in question. o (A monster’s absolute commonality is the same in each region. A monster’s relative commonality will change region by region as calculations are performed – we’ll show you how that works shortoy.) • You’ve also got an atlas that tells you about the relevant regions and which small monsters are present in them. • Each trainer tells you which regions they’re visiting, and how many monsters they intend to capture per region. • To estimate the number of a given monster M a trainer will capture in a region R: o Divide the relative population of M in R by R’s total relative population. o Multiply the result by the total number of captures the trainer intends per region. o Round this result to the nearest integer. .5 rounds up, so you can use round() and its friends. Note that this can result in a total slightly different than the trainer intended! Data Structures The structures you’ll use for the monsters, regions, itineraries and trainers are shown in the sidebar, and are also provided in fa20_cop3502_as1.h. You must use these structures. You’ll need to allocate, read, compute upon, output from, and subsequently free: • The monster index. o The names and elements of each monster in the monster index. • The region atlas. o The names and monster lists of each region. • A list of trainers. o The names and itineraries of each trainer. o The region list of each itinerary. typedef struct monster { int id; char *name; char *element; int population; } monster; typedef struct region { char *name; int nmonsters; int total_population; monster **monsters; } region; typedef struct itinerary { int nregions; region **regions; int captures; } itinerary; typedef struct trainer { char *name; itinerary *visits; } trainer; Example Input and Output We’ll provide more of these soon. Example Input 8 monsters StAugustine Grass 12 Zoysia Grass 8 WholeWheat Bread 6 MultiGrain Bread 10 Rye Bread 10 Cinnamon Spice 5 Pepper Spice 10 Pumpkin Spice 30 3 regions Rome 4 monsters StAugustine Zoysia WholeWheat Pepper Helve 5 monsters StAugustine WholeWheat MultiGrain Rye Cinnamon Aria 5 monsters Zoysia MultiGrain Cinnamon Pepper Pumpkin 3 Trainers Alice 5 captures 2 regions Rome Aria Bob 4 captures 3 regions Rome Helve Aria Carol 10 captures 1 region Aria Example Output Alice Rome 2 StAugustine 1 Zoysia 1 WholeWheat 1 Pepper Aria 1 Zoysia 1 MultiGrain 1 Pepper 2 Pumpkin Bob Rome 1 StAugustine 1 Zoysia 1 WholeWheat 1 Pepper Helve 1 StAugustine 1 WholeWheat 1 MultiGrain 1 Rye Aria 1 Zoysia 1 MultiGrain 1 Pepper 2 Pumpkin Carol Aria 1 Zoysia 2 MultiGrain 1 Cinnamon 2 Pepper 5 Pumpkin Mapping Example Here’s the table of how each individual trainer’s results are computed. It also shows how rounding issues can lead to trainers capturing more monsters than they intend! Rome Raw Divided Alice Round Bob Round Coefficient 1.00 36.00 5.00 4.00 StAugustine 12.00 0.33 1.67 2.00 1.33 1.00 Zoysia 8.00 0.22 1.11 1.00 0.89 1.00 WholeWheat 6.00 0.17 0.83 1.00 0.67 1.00 Pepper 10.00 0.28 1.39 1.00 1.11 1.00 Total 36.00 1.00 5.00 5.00 4.00 4.00 Helve Raw Divided Bob Round Coefficient 1.00 43.00 4.00 StAugustine 12.00 0.28 1.12 1.00 WholeWheat 6.00 0.14 0.56 1.00 MultiGrain 10.00 0.23 0.93 1.00 Rye 10.00 0.23 0.93 1.00 Cinnamon 5.00 0.12 0.47 0.00 Total 43.00 1.00 4.00 4.00 Aria Raw Divided Alice Round Bob Round Carol Round Coefficient 1.00 63.00 5.00 4.00 10.00 Zoysia 8.00 0.13 0.63 1.00 0.51 1.00 1.27 1.00 MultiGrain 10.00 0.16 0.79 1.00 0.63 1.00 1.59 2.00 Cinnamon 5.00 0.08 0.40 0.00 0.32 0.00 0.79 1.00 Pepper 10.00 0.16 0.79 1.00 0.63 1.00 1.59 2.00 Pumpkin 30.00 0.48 2.38 2.00 1.90 2.00 4.76 5.00 Total 63.00 1.00 5.00 5.00 4.00 5.00 10.00 11.00 Input and Output in General Read input from cop3502-as1-input.txt. Write output to cop3502-as1-output–.txt. For example, my output file will be named cop3502-as1-output-gerber-matthew.txt. There are blank lines in the sample inputs to make them more readable. They may or may not be present in the actual inputs; you should completely ignore blank lines. You’ll always get monsters, then regions, then trainers. Print order should generally be consistent with input: • Print the trainers in the order you got them. • Within the trainers, print the regions in the order you got the visits. • Within the regions, print the monster counts in the order they show up in the atlas for that region. • Print blank lines between each trainer. Specific Requirements • You need to free everything before closing the program. In fact: o You must #include “leak_detector_c.h” in your code, and o You must call atexit(report_mem_leak) as the first line of your main(). o (leak_detector_c.h and leak_detector_c.c will be provided. Keep them in your project directory while you’re working.) • I expect to see constructors and destructors for each of the structure types, with appropriate parameters. • You do not need to comment line by line, but comment every function and every “paragraph” of code. • You don’t have to hold to any particular indentation standard, but you must indent and you must do so consistently within your own code. • You may not use global variables.

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with MyhomeworkGeeks
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Classic English Literature
It was my first time using such a service. Essay was good and nicely formatted.
Customer 452441, February 16th, 2022
Management
Love this writer!!! Great work
Customer 452597, April 5th, 2021
Health Care
The writer did not follow my choice of topic (Food/Water Insecurity, Hunger, & Poverty), the paper was instead written about Climate Change in Africa. However, the paper was still great and informative. Thank you!
Customer 452777, January 28th, 2022
Social Sciences
Very fast report with excellent information on the topic. Thank you for your speedy service in such a short time.
Customer 453213, June 15th, 2022
Literature
Thank you!
Customer 453145, April 19th, 2022
Nursing
It was a very long paper, but she followed all the instructions, and she even finished the paper 5 days before the due date. Will write an essay with her again, thanks!
Customer 452967, November 27th, 2021
Psychology
quick and before due date/time.
Customer 453027, January 29th, 2022
Nursing
Thank you
Customer 453087, March 5th, 2022
Nursing
Paper much better compared to the one prior revision request. References need to be no more than the past 5 years.
Customer 452547, July 20th, 2021
English 101
very good paper thank you.
Customer 453083, February 18th, 2022
Education
Very fast response and did a excellent job.
Customer 453201, May 31st, 2022
English 101
IThank you
Customer 452631, April 6th, 2021
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
Live ChatWhatsApp

Are You Looking For Assignment Help? We Can Certainly Assist You