ComputerVirus - /* An instance of class ComputerVirus...

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

View Full Document Right Arrow Icon
/** An instance of class ComputerVirus represents a computer virus * I used the javadoc buttons to check that the specifications of methods and class specifications were ok. */ public class ComputerVirus{ private String name; //Virus's name private char type; // The kind of operating system the virus can infect (field holds 'W' for windows, 'M' for Mac, and 'L' for Linux) private int month; //The month of virus discovery (1-12 = Januaray- December) private int year; // The year of virus discovery private int id; // ID a virus in database private ComputerVirus predecessor; //The name on the tab of the folder of the computer virus object from which this one evolved private int variations; //the number of known viruses that directly evolved from this one //** Constructor: a virus with name, month discovered, year discovered, and processor targeted */ public ComputerVirus(String name, int month, int year, char type) { this.name= name; this.month= month; this.year= year; this.type= type; this.id = -1;
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 02/24/2010.

Page1 / 3

ComputerVirus - /* An instance of class ComputerVirus...

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