/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package petzoogarden; /** * * @author jcmt * * For June 13, make an animal class and then put those in the array in zoo */ public class PetZoo { private int numAnimals; private String[] animals = new String[42]; private double zooChow; private int numVisitors; private double revenue; public PetZoo() { numAnimals = 0; zooChow = 0.0; numVisitors = 0; revenue = 0.0; } public PetZoo(int nA, double zC) { numAnimals = nA; zooChow = zC; numVisitors = 0; revenue = 0.0; } public PetZoo(PetZoo joes) { numAnimals = joes.numAnimals; zooChow = joes.zooChow; numVisitors = joes.numVisitors; revenue = joes.revenue; } public int getNumAnimals() { return numAnimals; } public boolean setNumAnimals(int temp) { if (temp >= 0) { numAnimals = temp; return true; } return false; } }