/** *
 *  Aquarium.java
 *
 *  Revisions: 1.0 Sep. 26, 2002
 *               Created the Aquarium class
 *			   1.1 Sep. 28, 2002
 *				 Finished, Compiled, Commented
 *
 *  
* * Collaboration Statement: * I worked on the homework assignment alone, using only * course materials. * * Created with JCreatorLE, some indents are off when viewed through notepad * or EMACS * * @author Jose Manuel Caban * @version Version 1.1, Sep. 28, 2002 */ public class Aquarium extends ZooBuilding{ //////////////// //Constructors// //////////////// /** *Constructor for Aquarium *@param name the name for the Aquarium */ public Aquarium(String name){ super(name); } /////////// //Methods// /////////// /** *@return true if it is safe to enter *Safe if all dangerous animals are 30 feet underwater */ public boolean isSafeToEnter(){ Animal aTemp; SwimmingType sTemp; boolean bSafe = true; for(int i=0; i
* @param args a String array of command line arguments. */ public static void main(String[] args) { Aquarium swimswim = new Aquarium("Smells like Fish"); swimswim.getTheAnimals().addToFront(new Duck("Bob")); swimswim.getTheAnimals().addToBack(new Gator("Crocodile")); swimswim.getTheAnimals().addToFront(new GoldFish("Can't Remember Jack",5)); swimswim.getTheAnimals().listOut(); System.out.println(); Gator Tom = (Gator)swimswim.getTheAnimals().getLast(); Tom.setDepth(50); System.out.println(swimswim.isSafeToEnter()); Tom.setDepth(4); System.out.println(swimswim.isSafeToEnter()); swimswim.getTheAnimals().listOut(); System.out.println(swimswim); }// end of main(String[] args) }// end of class Aquarium