From Voluminous Ibis, 5 Years ago, written in Plain Text.
Embed
  1. public class Dog {
  2.     private float height;
  3.     private float weight;
  4.    
  5.     public Dog(float height, float weight) {
  6.         this.height = height;
  7.         this.weight = weight;
  8.     }
  9.    
  10.     public void walk() {
  11.         //walking
  12.     }
  13.  
  14. }
  15.  
  16. public class BullDog extends Dog {
  17.     public void walk() {
  18.         //bulldog walking
  19.     }
  20. }
  21.  
  22. public class ChihuahuaDog extends Dog {
  23.     public void walk() {
  24.         //chihuahua walking
  25.     }
  26. }