Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please pay close mind to the instruction of No [ ]'s are to be used in your code except to declare an array dynamically. I

Please pay close mind to the instruction of "No [ ]'s are to be used in your code except to declare an array dynamically."
I really need this by Tuesday at 2:30 PM CST image text in transcribed
CS 372 Program Assignment (Pointers Only) Wacky Growth Model A new modeling idea has come to light in determining a very erratic growth rates of a new organism just recently detected. The growth model you are to develop is very experimental and is quit wacky You will use and array data structure and using pointers only to traverse through the array. No O's are to be used in your code except to declare an array dynamically. The following are the steps for the simulation model for this wacky growth rate! Step 1: Initialize the array with 15 weeks of growth where each node will represent the number of organism each week as a Fibonacci sequence starting with the value of 2 for the first two weeks. (ie the first two values in the array will have the value of 2). You will generate the next 13 weeks by adding the previous two values to get the next week's value. The growth rate is stable for the first 15 weeks. After the 15 weeks, the organism start showing some erratic growth properties (deaths). They either become too populated (crowded), get hunger and eat each other, some disease hits them (virus). other something else not known at this time. Step 2: You will now randomly select a previous week that will be altered. The previous (week) you will select will be a random week from one of the previous 4 weeks (1-4). We will refer to the selected week as the NewEnd week. The values after NewEnd will be replaced with new values Step 3: After the NewEnd week selected in Step 2, its value (NewEnd) will be replaced with the 30 week even further back in the array (3 weeks prior to NewEnd week). Step 3: You will then delete the following weeks after the NewEnd week, not deleting the NewEnd week itself. Step 4: You will then start regenerate the next 4 weeks of values as described in Step 1 (Fib 2). The growth rate becomes stable for four weeks. Step 5: Go to Step 2 and repeat INPUT: Generated input from your programming efforts OUTPUT: You will print out the array (all the weeks) along with the random number indicating the previous node (NewEnd) to be altered each time through the loop Print out the array prior to altering the NewEnd's value. Show how many of these organisms are present for the next 15 iterations Do this for the next 15 iterations, replacing the NewEnd value 15 times (if it doesn't become too big??). Note: if you generate the previous week that is prior to the firut week, then use the first week value for replacement of NewEnd's value. (Don't go beyond array[0]???) Example: Initial weeks: (note: these are biological (my brain) random numbers shown here) 2 2 4 6 10 16 26 42 68 110 178 288 466 754 1220 random #: 3 (EndNode is 288) Replacing 288 with the 3 week back (68) you get the next array as output and the next 4 weeks of growth 2 2 4 6 10 16 26 42 68 110 178 68 (new value) 246 314 560 874 random : 1 (EndNode 560) 22 4 6 10 16 26 42 68 110 178 68 246 314 68 (new value) 382 450 832 1282 random = 5 (EndNode 314) 2 2 4 6 10 16 26 42 68 110 178 68 246 178 (new value) 424 612 1036 1448

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

What is cost behavior?

Answered: 1 week ago