Ok .

I did create 2 classes AddressImpl and person .now in the main method how i
can use Addresimpl classs ?
and how i can use the method getaddress with it return an interface??

Thanks.



On Mon, Dec 28, 2009 at 9:32 PM, Stephen Hunter <[email protected]>wrote:

> Need more info on what you are having trouble with.
>
> Sent from my iPhone
>
> On Dec 28, 2009, at 7:24 AM, nn roh <[email protected]> wrote:
>
> Hi ,
> Still stuck on 1027  hw :(
>
> What is the relation between AddressImpl class and person class. ?
>
> Can any one help on this!!
>
>
> Thanks
> Nada
>
> On Wed, Dec 23, 2009 at 5:44 AM, Nic Fox < 
> <[email protected]>[email protected]>wrote:
>
>> 1. Usually methods are declared public so that they can be called by other
>> objects without concern for their parent package or inheritance. If you have
>> specific reasons to restrict the access to the methods then you would select
>> a suitable access modifier. If you don't select an access modifier then the
>> implicit access is at the package level.
>>
>> On the other hand, if you have what are often referred to as 'helper
>> methods' in a class then often those are declared as private or protected
>> because they are used internally by the class to perform some common task
>> that the class performs. It is an example of 'Don't Repeat Yourself' and
>> encapsulation.
>>
>> 2. the method call to getAddress() should return a reference to an object
>> instantiated from the AddressImpl class. The AddressImpl class implements
>> AddressInterface.
>>
>> On 23/12/2009, at 8:15 AM, nn roh wrote:
>>
>> Hi all,
>>
>> from  homework 1027
>>
>> 1-Why i should define the implemented methods as public ?
>>
>>
>> 2-What i can write inside the method   AddressInterface getAddress() which
>> return an interface ?
>>
>>
>> Thanks in advance,
>>
>> Nada
>>
>>
>>
>> --
>> To post to this group, send email to
>> <[email protected]>
>> [email protected]
>> To unsubscribe from this group, send email to
>> <[email protected]>
>> [email protected]
>> For more options, visit this group at
>> <http://groups.google.com/group/javaprogrammingwithpassion?hl=en>
>> http://groups.google.com/group/javaprogrammingwithpassion?hl=en
>>
>>
>>
>  --
> To post to this group, send email to
> <[email protected]>
> [email protected]
> To unsubscribe from this group, send email to
> <[email protected]>
> [email protected]
> For more options, visit this group at
> <http://groups.google.com/group/javaprogrammingwithpassion?hl=en>
> http://groups.google.com/group/javaprogrammingwithpassion?hl=en
>
>

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