This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a doubt regarding the excersise 1.1 page 18-K&B book(with my scenario) If i create the abstract class Fruit, say the class contains abstract method x() and non-abstract methods y() and z(), and if i make Apple class(abstract) extending the Fruit class. Then there is no way i can access the non-abstract methods of class Fruit from Apple though it is extending it(bcoz i cant create objects for Apple class as its abstract). I would like to know if there is any way i can access the non-abstract methods of Fruit class from Apple class bcoz Apple extends Fruit?
Hey asha as you have mentioned that both Fruit and Apple are abstrat classes and you want to inherit the nonabstarct methods of super class Fruit in apple
You must be knowing that abstract classes do not consist of implementation of methods just methods are declared,and still you want to get the non abstract methods in the abstract class apple you just override those methods as shown in below code..........