CS 230 Fall 2009                                                Assignment 6 –Looping (Dreaded Canine Flu Pandemic Silly Simulation)                      

100 Assignment Points

 

Assigned: 10/12/2009

Due: 10/26/2009 at the start of class (no class on Oct 19 and 20 due to fall break)

 

Pre-Lab (Do Before Lab):  Bring materials – a way to save a copy for you and a copy to turn in. Read through the whole assignment; hints and details are spelled out throughout. Plan out tasks, objects, and events needed for program.  Think about the main button’s pseudocode / flow chart.

 

Main Assignment Description:

You are creating an extremely simplified simulation. Write a program that simulates the spread of the newly discovered and dreaded Canine Flu,  which has no known vaccine against it. Get from the user the starting number of people with the flu, severity level of the outbreak (1-10), and the number of weeks to simulate. Display in a RichTextBox for each week elapsed, the number of weeks elapsed to that point and the number of people that are infected. After the given number of weeks, display in labels or read-only textboxes the final number of currently infected people. NOTE – this task MUST be done with a loop – I need to see the week by week results in the rich text box – and in order to see that, you cannot do a single one-time calculation. 

·         Provide capabilities to simulate, clear (the inputs and outputs) to start again, and to exit.

Please set the name of the project to something other than the default name (WindowsApplication1, …). It is helpful if you use a name that identifies you as well as the assignment (e.g. yourlastname assignment 6).

 

Background Knowledge:

 

Task Details:

(The ControlChars.NewLine moves the next info after to a new line). To clear the contents of a list box, use richtextboxname.Clear()

 

Miscellaneous:

 

Hand in: