Old MacDonald Had A Farm.
From Huben's Wiki
Line 8: | Line 8: | ||
Don't look at Animal.java. Just look at TestAnimal.java. | Don't look at Animal.java. Just look at TestAnimal.java. | ||
− | + | The instructions are in TestAnimal.java: | |
+ | * You will need a class for each type of animal. You should then be able to compile and run. | ||
+ | * Use setNoise() in constructors for each animal class. | ||
+ | * You will need some classes for grouping animals together, and to override methods eats(), babyfood(), and coat() from the parent classes. | ||
+ | * Avoid any duplicate code by using a good class hierarchy. | ||
+ | |||
+ | When you are successful, the program will inform you. At that point, you can uncomment the "Animal.song();" line, and you should get a correct rendition of the song. When you know how to make your computer read the song, we can put the instructions here. | ||
* Reading the song on Macs: | * Reading the song on Macs: |