Talk:Frogs design

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
m
Line 2: Line 2:
  
 
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''? --- [[User:Johannes Pagwiwoko|Jojo]] 02:08, 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''? --- [[User:Johannes Pagwiwoko|Jojo]] 02:08, 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? --- [[User:Johannes Pagwiwoko|Jojo]] 02:51, 23 July 2008 (UTC)

Revision as of 02:51, 23 July 2008

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)

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)