The Java Code


toolbar
Click Here!




October 9, 1996

Why Read The Java Code?

You may want to read the original code for any of these reasons:

  • You Want the Details
    Subtle changes can have big effects. The only definitive answer for how the simulation works is in the source code. If you want to know exactly how the model matches couples, then you should read the code.

  • You Want to Make Changes
    The current model doesn't seem right to you. If you know how to program in Java, then feel free to tweak the code. Let us know the details of your results.

  • You Want to Extend the Work
    There are many facets of real life that were excluded from this model. You might choose to experiment with a homosexual population. Or you might want to include bisexuality.

    The Code

    The main class file is AIDS4.java. It contains the main applet code which is largely concerned with displaying the information in the browser correctly. The simulation is handled by the threaded class, SimAIDSSim, which is also in the same file. The couples are represented by the class Pair.java that controls how the disease is spread.

    The file HistoryGraph.java contains the code for graphing the results. The code for popping up informative windows is found in TextWindow.java.



  • New-Media Tools

    A Special Report
    Computer Simulations: New-Media Tools for Online Journalism

    The Simulator
    Test how different behavior patterns affect the spread of the HIV virus with the Java-based HIV Simulator.

    Tutorial
    A how-to guide, with sample results and a glossary of simulator variables.

    HIV Simulator FAQ
    What about condoms? What's been left out? Is more sex really safer sex? Explore the nuances in the Simulator FAQ.


    The images are found in files Strip1.GIF through Strip5.GIF:


    Strip1.GIF
    Strip2.GIF
    Strip3.GIF
    Strip4.GIF
    Strip5.GIF


    Click Here!

    Home | Site Index | Site Search | Forums | Archives | Marketplace

    Quick News | Page One Plus | International | National/N.Y. | Business | Technology | Science | Sports | Weather | Editorial | Op-Ed | Arts | Automobiles | Books | Diversions | Job Market | Real Estate | Travel

    Help/Feedback | Classifieds | Services | New York Today

    Copyright 1996 The New York Times Company