On the home work, could some one provide an example of the code for

public AddressInterface getAdress() {
        //String adress = new String(getStreetNumber()+"
"+getStreetName()+"\n"+getCountry());
        //System.out.println(adress);
        //return getAdress();
    }

I reread through all exercises I could not find a concrete example
that I can remember and reuse.

I understand abstract classes , java interface being types etc. I need
a concrete example. Otherwise I will assume that in the following
something was left out, i.e., Person class extends AdressImpl.



" # Write an interface called MyOwnInterface, which has the following
method

    * AddressInterface getAddress();

# 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);

# Write AddressImpl class that implements AddressInterface
# Make the Person class to implement MyOwnInterface.
# Initialize a Person object with proper data and display it. "

Thank you.

-- 
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

Reply via email to