import java.io.*; /** * Quark is a simple JavaBean. * * @author Thornton Rose */ public class Quark implements Serializable { private String flavor = ""; private int charge = 0; /** * Construct a new Quark. */ public Quark() { } /** * Get the flavor. */ public String getFlavor() { return flavor; } /** * Set the flavor. */ public void setFlavor(String newFlavor) { flavor = newFlavor; } /** * Get the charge. */ public int getCharge() { return charge; } /** * Set the charge. */ public void setCharge(int charge) { this.charge = charge; } /** * Return a string representation. */ public String toString() { return getFlavor() + ":" + getCharge(); } }