Question: ****PLEASE READ THE ASSIGNMENT THOROUGHLY, I HAVE PUT THE MOST IMPORTANT INSTRUCTION IN BOLD AND ITALIC*** All help on this is appreciated. CS 372 Program

****PLEASE READ THE ASSIGNMENT THOROUGHLY, I HAVE PUT THE MOST IMPORTANT INSTRUCTION IN BOLD AND ITALIC***

All help on this is appreciated.

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 quite wacky.

You will use and array data structure and using pointers only to traverse through the array. No [ ]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 weeks 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 3rd week even further back in the array (3 weeks prior to NewEnd week).

Step 4: You will then delete the following weeks after the NewEnd week, not deleting the NewEnd week itself.

Step 5: 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 6: 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 t(NewEnd) to be altered each time through the loop. Print out the array prior to altering the NewEnds 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 doesnt become too big??). Note: if you generate the previous week that is prior to the first week, then use the first week value for replacement of NewEnds value. (Dont 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 3rd 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)

2 2 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!