Java Program Using Single Inheritance Code