coin.h From Astrachan, p 334 ----------------------------- #ifndef _COIN_H #define _COIN_H // class for simulating a coin (object "tossed" to generate // a random number 0 or 1) // // Coin() -- constructor // // FlipValue Flip() -- returns the random "flip" of the coin, // either heads or tails with equal probability // // int NumFlips() -- access function, returns # of times Flip called // for an instance of the class #include "dice.h" enum FlipValue {heads,tails}; // possible coin flip outcomes class Coin { public: Coin(); // constructor FlipValue Flip(); // return the random flip int NumFlips(); // # times this coin flipped private: Dice myDie; // will be a two-sided die }; #endif // _COIN_H not defined