View Single Post
  #2 (permalink)  
Old 07-19-2007, 09:53 PM
cruxblack cruxblack is offline
Senior Member
 
Join Date: Jul 2007
Posts: 130
cruxblack will become famous soon enough
U did add the addAnimal() method in the Animal class, the problem is, u didn't include it inside the constructor

I presume u wanted the counter to add each time u create an animal right?
if so u should add addAnimal(); line inside your constructor

And also,
Code:
public static int addAnimal(){ counter=addAnimal(); return counter++; }
What do u want from the
Code:
counter=addAnimal()
line to do supposedly?

To increment da animal counter, u don't need this line, it'll bring error toward ur work instead

Good luck with the code
Reply With Quote