/* * Lab 4 * * Author: Robin Dawes * * Date: 20081022 * * Comment: * */ public class Chip { boolean good; int index; public Chip(int i, int g) { index = i; good = (g == 1); } // Chip public boolean returnGood() { return good; } // returnGood public boolean checkChip(Chip other){ if (good) return other.returnGood(); else if (Math.random() < 0.5) return true; else return false; } // checkChip public int getIndex() { return index; } // getIndex } // class