Question: Part A: Convert the Tile Module to a Cass (35%= 24% test program 11% code] In Part A you will convert the Tile type to

Part A: Convert the Tile Module to a Cass (35%= 24% test program 11% code] In Part A you will convert the Tile type to an encapsulated class You will also add a class invariant that requires the file genus to be strictly less than GENUS_COUNT. By the end of Part A your Tile class will have the following public member functions. Tile () Tile (unsigned int genusl unsigned int specieal); bool is Owner () const: unsigned int getAffectedPlayer ( unsigned int whose turn) const; unsigned int getGenus ( const unsigned int getSpecies ( const: void setOwner (unsigned int ownerl) void activate (unsigned int whose_turn) const: void print () conat: You will also have the following private member functions: void printOwnerChar ( const void printGenuschar 0 consta void printSpeciesChar () const: bool isInvariantTrue () Const Perform the following steps: 1. Convert the Tile record to a class. The fields should become private member variables 2. Convert the Tile-associated functions to member functions in the interface (eh) and implementation (te, cpp) files. The tilePrint-Char functions should be private and the others should be pubic The tileCreate function should become the non-default constructor Remove the word tu le from the function names and change the new first letter to lowercase in the implementation file, add Tiles before every function name. name means "anything so til Print-char refers to three functions. Part A: Convert the Tile Module to a Cass (35%= 24% test program 11% code] In Part A you will convert the Tile type to an encapsulated class You will also add a class invariant that requires the file genus to be strictly less than GENUS_COUNT. By the end of Part A your Tile class will have the following public member functions. Tile () Tile (unsigned int genusl unsigned int specieal); bool is Owner () const: unsigned int getAffectedPlayer ( unsigned int whose turn) const; unsigned int getGenus ( const unsigned int getSpecies ( const: void setOwner (unsigned int ownerl) void activate (unsigned int whose_turn) const: void print () conat: You will also have the following private member functions: void printOwnerChar ( const void printGenuschar 0 consta void printSpeciesChar () const: bool isInvariantTrue () Const Perform the following steps: 1. Convert the Tile record to a class. The fields should become private member variables 2. Convert the Tile-associated functions to member functions in the interface (eh) and implementation (te, cpp) files. The tilePrint-Char functions should be private and the others should be pubic The tileCreate function should become the non-default constructor Remove the word tu le from the function names and change the new first letter to lowercase in the implementation file, add Tiles before every function name. name means "anything so til Print-char refers to three functions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
