Hi Abhisek,
You have to implement AddressInterface with AddressImpl and implement all methods of AddressInterface inside AddressImpl And use AddressImpl instead of AddressInterface when you call any method from AddressInterface A.S.El-Dalatony _____ From: javaprogrammingwithpassion@googlegroups.com [mailto:javaprogrammingwithpass...@googlegroups.com] On Behalf Of abhishek shukla Sent: Saturday, February 07, 2009 6:14 PM To: Free Java Programming Online Training Course By Sang Shin Subject: [java programming] Problem with interface and abstract class hi , In Lab 1027 we are asked to * Write an interface called MyOwnInterface, which has the following method o AddressInterface getAddress(); * The AddressInterface is a Java interface that has the following methods. o int getStreetNumber(); o void setStreetNumber(int streetNumber); o String getStreetName(); o void setStreetName(String streetName); o String getCountry(); o void setCountry(String country); * Write AddressImpl class that implements AddressInterface * Make the Person class to implement MyOwnInterface. I am having problem with AddressInterface getAddress(); we have to write AddressInterface getAddress(); function which returns AddresInterface as object I am having problem with returning interfaces as objects. How to write the body of this function so that it returns AddressInterface object. Thanks and Regards, Abhisek shukla --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to javaprogrammingwithpassion@googlegroups.com To unsubscribe from this group, send email to javaprogrammingwithpassion-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---