[Bluej-discuss] Exercise 7.22 pag 204

Luis Moreira Luis.Moreira at jet.uk
Tue Mar 21 08:54:10 GMT 2006


Hi all,

I found a solution for the problem in this exercise but I need an
opinion on the quality of the solution.

What I have done was to Iterate trough the ArrayList where I stored the
Item objects and extracted the description and the weight information
and kept on adding it into a String, When the iteration is finished I
pass this String to Game for printing. Is this a good solution? As I see
it I maintain a very loss coupling , Game as no idea about item only
class Room as any connection with that class, I could change Item and
the only class I would have to maybe change would be Room but not in a
way that would affect Game and vice-versa. 

Opinions welcomed.

Best regards      

                        Luis    

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bluej.org/pipermail/bluej-discuss/attachments/20060321/094cfe7d/attachment-0001.html


More information about the bluej-discuss mailing list