June 03, 2008
Saaa wrote:

> My idea was to put everything all the fruits share in the same (abstract)
> super class.
> I would also like the assert code to be in the super class as it is the
> same for all fruits.
> Same for the color setter/getter.
> 
> 

Sure that's reasonable, then you can let the derived classes manipulate the color via the getter / setter interface and still make the color field private.

June 03, 2008
> Saaa wrote:
>
>> My idea was to put everything all the fruits share in the same (abstract)
>> super class.
>> I would also like the assert code to be in the super class as it is the
>> same for all fruits.
>> Same for the color setter/getter.
>>
>>
>
> Sure that's reasonable, then you can let the derived classes manipulate
> the
> color via the getter / setter interface and still make the color field
> private.
>

I think I'll do that then ;)


1 2
Next ›   Last »