Coursework 1 : Specification This coursework involves creating a class MultiDice that extends the TwoDice class already developed in the lectures. Whereas TwoDice has the two data members dice1 and dice2, an object of this new class will have N data members dice1, dice2, dice3, ... , diceN where N > 0. The constructor of MultiDice will need to include an integer value that specifies how many dice are to be supplied for this object. So, for example, if we require a "5-dice" object for a game such as "Yum" (also known as "Yangtze"), we would simply write: MultiDice t( 5 ) ; and the corresponding object t would have five data members, each of which would be initialised to a random number between 1 and 6. Clearly, the number of dice is not known until run-time, so we are going to have to store a pointer to a dynamically allocated piece of memory which will store the values of the 5 dice. The class definition for MultiDice will therefore take the form: class MultiDice { public: MultiDice( int ) ; // default constructor ... // rest of the class interface private: int* pDice ; // pointer variable int number ; // why is this needed and what is it for? } This coursework is divided into three main parts - the first requires you to produce an interface for MultiDice, along the lines of that for TwoDice together with a corresponding implementation. The second part develops these ideas by getting you to think about alternative formulations of some of the member functions produced in part one. This part also involves the writing of an operation that simulates the re-throwing of an existing MultiDice object and asks you to provide additional member functions of your own. The last part requires you to use your class in an application that simulates the playing of a game of Yum. Part 1 Complete the class definition MultiDice given above by providing a full set of member functions, analogous to those for the class TwoDice developed in the lecture, together with corresponding implementations of these member functions. In particular, you should: Provide an appropriate canonical class form which ensures that an object with two dice is created by default Provide an operation sum( ) that finds the sum of the face values of a MultiDice object Provide an overloaded operator that finds the combined sum of two MultiDice objects Provide a Boolean-valued function,
## Deliverables
For this coursework, the following deliverables (documents) must be provided, in this order, when submitting the coursework: the header file MultiDice.h corresponding to Part 1 (a) to (g) inclusive the implementation file [login to view URL] corresponding to Part 1 (a) to (g) inclusive a revised header file MultiDice.h corresponding to Part 2 (h) to (k) inclusive a revised implementation file [login to view URL] corresponding to Part 2 (h) to (k) inclusive a main program that simulates the playing of the game - this should include your global function getHighest( ) output from the main program
## Platform
unix or visual c++ 6