Wednesday, June 25, 2008

Superclass and subclass example in class

Write a java program to create a superclass martial arts student. What will a student be able to do after the first class?

Next you will have a subclass Ninja which will extend from the martial arts student. A ninja will be able to do anything the student can do but he can do much more! Add behavior that a ninja could do that a beginning student could not.

Write a main method to show these super and sub classes in action. Try running methods unique to one on the other!

No comments: