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. And the presence or absence of an AntiVirul agent (a boolean).
Background image of page 1

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

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

This document was uploaded on 12/05/2011.

Page1 / 3

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online