Re: Passing Parameters
"Gianni Mariani" <gi2nospam@mari ani.ws> wrote in message
news:bj3u6r$jk0 @dispatch.conce ntric.net...[color=blue]
> John Harrison wrote:[color=green]
> > "Gianni Mariani" <gi2nospam@mari ani.ws> wrote in message
> > news:bj3k2j$21t @dispatch.conce ntric.net...
> >[/color]
> ...[color=green]
> >
> > Deriving CrapsGame from Dice? Poor design surely, there's no obvious
> > releationship.
> >
> > Make Dice a freestanding function and class it from CrapsGame (or[/color][/color]
anywhere[color=blue][color=green]
> > else).[/color]
>
> Craps is a game of dice. It's 100% obvious to me that this is a IS-A
> relationship. For example if I wanted to simulate "loaded" dice ?
>
> Anyhow, this particular function rolls twice and returns the sum. It's
> very particular to craps and potentially other similar games. In
> hindsight, it should give you both values and not the sum.
>
> Sonia, this is an excellent example of how 2 people can come up with
> wildly different opinions even though they've been at it for a while.
> It really does not matter either way how you do this. There are more
> obvious and clearer examples of where you need to inherit vs have a[/color]
member.[color=blue]
>
> I suggest you keey your threshhold for creating a class is very low.
> Small interesting chunks are much easier to understand and maintain that
> large spaghetti plates.
>
>
>
>
>
>[/color]
I understand what you are saying, and agree that small chunks are easier to
manipulate than "large plates". I will get to classes very soon. :) Thanks
"Gianni Mariani" <gi2nospam@mari ani.ws> wrote in message
news:bj3u6r$jk0 @dispatch.conce ntric.net...[color=blue]
> John Harrison wrote:[color=green]
> > "Gianni Mariani" <gi2nospam@mari ani.ws> wrote in message
> > news:bj3k2j$21t @dispatch.conce ntric.net...
> >[/color]
> ...[color=green]
> >
> > Deriving CrapsGame from Dice? Poor design surely, there's no obvious
> > releationship.
> >
> > Make Dice a freestanding function and class it from CrapsGame (or[/color][/color]
anywhere[color=blue][color=green]
> > else).[/color]
>
> Craps is a game of dice. It's 100% obvious to me that this is a IS-A
> relationship. For example if I wanted to simulate "loaded" dice ?
>
> Anyhow, this particular function rolls twice and returns the sum. It's
> very particular to craps and potentially other similar games. In
> hindsight, it should give you both values and not the sum.
>
> Sonia, this is an excellent example of how 2 people can come up with
> wildly different opinions even though they've been at it for a while.
> It really does not matter either way how you do this. There are more
> obvious and clearer examples of where you need to inherit vs have a[/color]
member.[color=blue]
>
> I suggest you keey your threshhold for creating a class is very low.
> Small interesting chunks are much easier to understand and maintain that
> large spaghetti plates.
>
>
>
>
>
>[/color]
I understand what you are saying, and agree that small chunks are easier to
manipulate than "large plates". I will get to classes very soon. :) Thanks
Comment