Talk:Frogs design

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(exportXML and sauteInWine: new section)
Line 12: Line 12:
  
 
Added a link to the [[A froggy visitor]] page. This describes a possible application of the Visitor pattern to the [[Frogs design]] --[[User:Tureiti Keith|TK]] 06:39, 2 August 2008 (UTC)
 
Added a link to the [[A froggy visitor]] page. This describes a possible application of the Visitor pattern to the [[Frogs design]] --[[User:Tureiti Keith|TK]] 06:39, 2 August 2008 (UTC)
 +
 +
== exportXML and sauteInWine ==
 +
 +
Is there a difference between the two of those? I think exportXML is ok (maybe put the formatting into another class), but sauteInWine seems to be completely wrong.

Revision as of 03:02, 23 July 2009

Added "Broken heuristics" and "Feels bad" sections with the issues discussed in the lecture. --Yugan 03:19, 23 July 2008 (UTC)

Adding avoid becomes as one of the heuristics broken in this Frogs design --Jojo 01:53, 23 July 2008 (UTC)


I think we should take out the exportXML() from Frog and also take out the display() from the Move and put them together in a class...but I cant think of a name for that class...FrogManager? FrogTagger? (assuming Igor tagged his beloved frog specimens). I feel suspiciously unsure about this naming. I got a feeling that in COSC224 we were thought that we shouldn't name class like that. Or maybe FrogDisplay? --Jojo 02:08, 23 July 2008 (UTC)

Yea, I think the exportXML() method violates the one key abstraction heuristic too. But not sure what the elegant solution is. --Yugan 03:19, 23 July 2008 (UTC)

Hmm just an aside question here. Frog class has a method call sauteInWine(). But Frog can't saute itself, but Igor can saute the frogs in wine. That is one way of looking at it. The other way is, the frog is being sauted in wine. In that sense, having sauteInWine() in Frog class makes quite a sense. Do you guys think it's better to have +sauteFrogInWine(frog: AdultFrog) inside Biologist class instead? So it's aFrog.sauteInWine() vs igor.sauteFrogInWine(aFrog) kind of question. Is there any OO design principles that judge this? --Jojo 02:51, 23 July 2008 (UTC)


Great entry Robert. Added a link to the Visitor pattern page --TK 21:31, 1 August 2008 (UTC)

Added a link to the A froggy visitor page. This describes a possible application of the Visitor pattern to the Frogs design --TK 06:39, 2 August 2008 (UTC)

exportXML and sauteInWine

Is there a difference between the two of those? I think exportXML is ok (maybe put the formatting into another class), but sauteInWine seems to be completely wrong.

Personal tools