On Sep 4, 10:01 pm, MonkeyButt <[EMAIL PROTECTED]> wrote:
> I don't want to give away too much of my work but I need someone to
> verify that my main method is correct so I know that I implemented the
> instructions correctly.
> Here it is:
> public static void main(String[] args) {
> AddressInterface ai = (AddressInterface)new AddressImpl();
> ai.setCountry("USA");
> ai.setStreetName("Washington St.");
> ai.setStreetNumber(123);
> Person p = new Person(ai);
> System.out.println(p.getAddress().getStreetNumber() + " " +
> p.getAddress().getStreetName() + " "
> +
> p.getAddress().getCountry() + "\n");
> }
>
> It works so I assume I am correct in my understanding of this homework
> assignmnent.
For me, it is the other way around. First you define a Person, then
you define the AddressInterface derived on the Person.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---