Computer Lab #9

This lab illustrates the following

Java libraries documentation

UW library documentation

   

I) Overloading

Write a method numberOfCharacters that counts how many characters are needed to print its argument. The method should work with an int, a long, and a String (sample, solution).

 

II) Inheritance

Sample: Person.java, Student.java, TestPersonStudent.java

Solution: Person.java, Student.java, TestPersonStudent.java

 

III) Abstract classes

Sample: Bovine.java, Buffalo.java, Cow.java, Critter.java, Poodle.java, TestCritter.java , and add another class Bird.java

Solution: Bird.java, Bovine.java, Buffalo.java, Cow.java, Critter.java, Poodle.java, TestCritter.java