Monday, February 9, 2009

Marked Assignment 6: Froggie

Marked Assignment 6 consists of the following:

Do the example on Polymorphism on your Java Textbook from pg 113-116. You need to create the following files in a folder in order for the example to work:
  • Animal.java
  • Dog.java
  • Cat.java
  • Duck.java
  • MainApplication.java
After completing the example, compile ALL the files and run MainApplication.java to see the output. For the assignment, create a new class called Froggie that extends Animal, and has the following characteristic:
  • Breed: Muppet
  • Name: Kurmit
  • sound: Riii-ribbit

When you run the program, there should randomly be a printout that consists of:

Your choice:
This is a Froggie
It's Kurmit the Muppet
Riii-ribbit

No comments:

Post a Comment