ComputerVirus - // I looked carefully at the specifications...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: // I looked carefully at the specifications produced by clicking the javadoc button and checked that the specifications of methods and the class specification were OK /** an instance maintains info about a virus */ public class ComputerVirus { private String name; // the virus name private char type; // the virus type.'M' for Mac, and 'L' for the rare Linux virus private int month;// the discovering month of the virus, range from 1~12 private int year; // the discovering year of the virus private ComputerVirus predecessor; // the name of a ComputerVirus object from which this one evolved private int variation; // the number of variation of the virus private int id=-1; // the virus id number /** Constructor: a new ComputerVirus. Parameters are, in order, the name of the virus, the month and year of discovery, and what type of processor it infects. The virus has no id number, its predecessor is not known, and it has no known variations */ public ComputerVirus(String Name1, int Month1, int Year1, char Type1){ name = Name1;...
View Full Document

Page1 / 4

ComputerVirus - // I looked carefully at the specifications...

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