Objectives
- Create a Java interface
- Create an abstract base (super) class
- Create derived classes (subclasses)
- Compile a multi-file Java application
- Use object-oriented programming techniques when creating a class
- Follow Java coding style guidelines
Overview
You have to create an interface, five classes, and complete an existing class to implement a program which produces the lyrics to the song Old McDonald's Farm.
- Create an interface named McDonaldable
- Create a base class named Animal which implements McDonaldable
- Create a subclass of Animal named Cow
- Create a subclass of Animal named Pig
- Create a subclass of Animal named Aardvark
- Create a subclass of Animal named Dog
- Finish implementing the code in Farm.java
- Compile, test, and debug your programs