/** An instance is a sulfur bacterium. */
//  This code  and tester will be posted to the course website.
public class SBact extends Organism {
    
    private String color; /** color of the SBact; once the Sbact has been created,  
                            * must be either "purple" or "green" */
    
    /* #@ with nothing in here, there is a default constructor declared
     * called SBact(), isn't there? Yes, but its default is that it's 
     * first line is super().  /
    
    /** Constructor: a sulfur bacterium with color c.  
      *  It is at food-chain level 0, contains no methylmercury, 
      * is alive and thus has not been eaten by anything, 
      * hasn't eaten anything (because it photosynthesizes), 
      * and has no nickname. 
      * Precondition: c is either "purple" or "green". */
    public SBact(String c) {
        super(0);
        color=c;
    }
    
    /** = color of this sulfur bacterium */
    public String getColor() {
        return color;
    }
    
    /** do nothing --- exists to model, via overriding superclasses' eat
      * method, the fact that SBacts don't eat. */
    public void eat(Organism o) {
        ;
    }
    
    /** = String representation of this sulfur bacterium, following the format
      * described in the A3 handout, except that
      * "Organism" is replaced by "<color> sulfur bacterium ",
      * where <color> is the color of this sulfur bacterium. */
    public String toString() {
        return getColor() +  " " + super.toString().replace("Organism","sulfur bacterium"); 
    }
    
}