Jack Burton wrote: Can anyone help me setup the structure of the project?
I don't understand why it has to be so many files? Also, can it be done without out if, else statements?
Jack Burton wrote:Through the first six weeks of my class I've had no problems with simple single source file programs. This project for some reason is confusing me. Can anyone help me setup the structure of the project?
I don't understand why it has to be so many files? Also, can it be done without out if, else statements?.
Maneesh Godbole wrote:Welcome to the Ranch.
Jack Burton wrote: Can anyone help me setup the structure of the project?
I don't understand why it has to be so many files? Also, can it be done without out if, else statements?
What do you mean by "setup the structure"? Can you please elaborate?
Why do you want to avoid if/else statements? Is that a requirement?
Campbell Ritchie wrote:
Joanne
Tim Chaung wrote:You can probably make a constructor to make all the possible sides. (probably array of size n)
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Wikipedia wrote:A simple example of the central limit theorem is rolling a large number of identical, biased dice. The distribution of the sum (or average) of the rolled numbers will be well approximated by a normal distribution.
Campbell Ritchie wrote:I would be surprised if you lose marks for using a construct you haven’t covered yet, unless you are specifically prohibited from using it.
Divide and rule.
Put a Die on the table in front of yourself. Look at it. What does it have? It has faces (usually six of them) each displaying a different number. What does it do? It might display a number, or it might be rolled to get a new number, which is random. Implement a class which models a Die, and try its methods, with something like this:You can add to that code and roll the Die several times, or create a d2 Die. Get that working. Then think about how to create a PairOfDice class.
Jack Burton wrote: . . . Wouldn't it be the same for d1 and d2? Then I would just use import statements. What about using the random class?
Consider Paul's rocket mass heater. |