{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lab9 - Lab 9 Simulate a virus colony by creating a virus...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lab 9 – Simulate a virus colony, by creating a virus class with properties and behaviors, and run the simulation. Scientists often use computers to map and predict the changes and movement of many phenomena: weather, disease, pollution, economic prosperity, the damage caused by explosions, even social behaviors like the spreading of rumors. The state and changes of such phenomenon are often encapsulated in objects, whose class definitions define the properties and behaviors of each member of the population. In this way, we can model large behaviors by correctly modeling each individual. Preparation: To prepare for this lab, read the lecture 14 notes on Classes and Objects, and especially the sample code. Part 1 – create a Virus class definition: Write a class that encapsulates the behavior of a biological virus. The properties of a virus include the following integer variables: Age , in seconds Size , in square cm.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}