CS 230 Spring 2007

Assignment 5 – Looping (Paparazzi Invasion Silly Simulation Game)

100 points

 

Assigned: 02/21/2007

Due: 02/28/2007 at the start of class

 

Pre-Lab (Do Before Lab):  Bring materials – a way to save a copy for you and a copy to turn in. Plan out tasks, objects, and events needed for program. If you didn’t get an A on the midterm, write pseudocode for the main button (and even if you did get an A, it’s probably worthwhile).

 

Main Assignment:

You are creating an extremely simplified simulation “game” (I use quotes because it is so simplified).  Write a program that simulates the invasion by paparazzi with no defense against them. Get from the user the starting number of paparazzi, difficulty level (1-10), and the number of months to simulate. Display in a RichTextBox (see below) for each month elapsed, the number of months elapsed to that point and the number of paparazzi that have invaded. After the given number of months, display in labels or read-only textboxes the final number of paparazzi. NOTE – this task MUST be done with a loop – I need to see the month by month results in the 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.

Hand in:

Task Details:

·         The number of new paparazzi invading each month is equal to 10 times the difficulty level (e.g. with a difficulty level of 7, 70 new pararazzi would invade each month.

·         Sorry, in this simplified game, there is no way to get rid of paparazzi.

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

Miscellaneous