Hello Vadim well yes this is allowed and possible, you can check the following link for more information about it and if you find any specified difficulty just notify me and i will be trying to help you by all means:
http://java.sun.com/docs/books/tutorial/java/IandI/interfaceAsType.html this will help. sorry that no one responded to your post all that time, but i've just discovered it while i was searching for an issue with this lab last night. Regards. On Fri, Jul 17, 2009 at 4:30 PM, Vadim Cojocaru <[email protected]>wrote: > Hi everybody could somebody help me with this problem with lab-1027, my > Question is: > > > # Write an interface called MyOwnInterface, which has the following method > > * AddressInterface getAddress(); > ---------------------------------------done > > # The AddressInterface is a Java interface that has the following methods. > > * int getStreetNumber(); > * void setStreetNumber(int streetNumber); > * String getStreetName(); > * void setStreetName(String streetName); > * String getCountry(); > * void setCountry(String country); > ---------------------------------------done > > > # Write AddressImpl class that implements AddressInterface > ---------------------------------------done > > > # Make the Person class to implement MyOwnInterface. > AddressInterface getAddress(){ > ???????????????????????????????????????? how to implement this method, > grabbed from an interface MyOwnInterface which > must return something of AddressInterface type which is also an interface > } > > > # Initialize a Person object with proper data and display it. > > Will realy apreciate it! > > > > -- > Impossible Is Nothing > > > > -- Abbas Zaini --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
