A Computer Program for Tracking Cancer Development and Movement

Introduction | Desc. & Method | Results | Analysis | Conclusions | Achievements | Recommendations | Acknowledgements
A-Report Figures | B-Screen Shots | C-frmInput | D-GraphicCell | E-frmAbout | F-frmSimulation | G-frmCellCount | H-frmSplash
Abstract | Interim Report | Interim Presentation | Printable Final Report

Appendix D

small logo

Graphic Cell Code

The Class of All of the Model’s Cells



'For an indented version of the code, see the Printable Final Report.

'The Cancer Modeling Project: Tracking Cancer Development and Movement
'Punit Shah and Karalyn Baca
'Team 004
' Albuquerque Academy
'AiS 2004-2005
 
'Code written in Microsoft Visual Basic 6.0, line comment character is '
 
'Code for: GraphicCell
'Purpose of class module: To be the class in which all of the cells of the graphics become objects of.
 
Option Explicit 'Force variable declarations
 
'Public Variables
 
'The variable that determines whether a certain cell is cancerous or not
Public IsCancerous As Boolean
 
'Variable used for tabulation in sweeps when developing cancer (see frmInput code)
Public HasBeenSwept As Boolean
 
'Each number is a loctaion and it tell whether that neighbor is cancerous
Public Neighbors(8) As Boolean
 
 
Public Function Nutrients() As Double
'Purpose: To calculate the number of neighbors with cancer, and then using that, calculate the amount of avalible nutrients
' This is very important as it is a factor in cancer growth
Dim Counter As Integer
Dim HowManyNeighbors As Integer
For Counter = 0 To 7
If Neighbors(Counter) = True Then
HowManyNeighbors = HowManyNeighbors + 1
End If
Next Counter
Nutrients = 100 - HowManyNeighbors * (100 / 8)
End Function

AiS Challenge | Albuquerque Academy
Site Map | Contact Us
Web search by
Valid HTML 4.01!

Project © 2005 Punit Shah and Karalyn Baca | Site Design © 2005 Punit Shah