Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The programming language is C++ with std:: letterCount(char): a non-member function that returns the quantity of each letter in a standard scrabble bag letterValue(char): a

image text in transcribedimage text in transcribedimage text in transcribed

The programming language is C++ with "std::"

letterCount(char): a non-member function that returns the quantity of each letter in a standard scrabble bag letterValue(char): a non-member function that returns a letter's value No other member or non-member functions are required. A simple demo program has been posted to show the functionality of your classes. Feel free to create your own version of the game AFTER you have the classes working with my program. No container classes are allowed to be used. All non-constant arrays must be implemented as dynamic arrays. Include documentation for your class definition and implementation. File Scrabble.cpp Description scrabble Main Program File (file is provided) This file may not be edited. Scrabble.exe Executable game of scrabble based on main program file (file is provided) Don't expect a fully functioning game! Collins Scrabble Words (2015) Text File (file is provided) This file may not be editted. Collins Scrabble Words (2015).txt scrabbleBoard.hxx scrabble board Header File (file is provided) This file may not be edited. scrabbleBoard.cxx scrabble board Implementation File (file is provided) This file may not be edited. scrabble Tile Header File scrabble Tile Implementation File scrabble Tile.hxx scrabble Tile.cxx scrabbleBag.hxx scrabbleBag Header scrabbleBag Implementation File scrabbleBag.cxx Would you like to display the rules? (y or n): n Would you like the Tile Table displayed while playing? (y or n): Y Would you like to display the # of tiles left in the bag while playing? (y or n): Would you like invalid words to be challenged? (y or n): y How many players are in game? (1 to 4): 3 A B C D E F G H I J K L M N O +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ A 3WS 2LS L L 3WS L L 2LSL L 3WS A: 9/1, N: 6/1 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ BL 2WS L L 3LS L L LSL L 2WS | B: 2/3, 0: 8/1 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ CL L 2WS 2LSI LSI L 2WS | C: 2/3, P: 2/3 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ D 2LS L 2WSI D I LSL L 2WS 2LS D: 4/2, Q: 1/10 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ EL L L 2WS L L L L 2WS | E:12/1, R: 6/1 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ FL 3LS L L 3LS L L 3LS L L 3LSI | F: 2/4, S: 4/1 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+. GI L 2LS L L 2LS 2LS L L 2LS L | G: 3/2, T: 6/1 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ H|3WS | L 2LS L L 2WS L L 2LS L 3WS H: 2/4, U: 4/1 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ IL L 2LS L L 2LS LS L L LS | I: 9/1, v: 2/4 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ JL 3LS L 3LSL L L LSL L L 13LS | J: 1/8, W: 2/4 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ KL L L 2WS L L L 2WS L | K: 1/5, X: 1/8 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ L 2LS L 2WS 2LS L L 2WS L 2LS L: 4/1, Y: 2/4 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ M L 2WS L 2LSI 2LS L L 2WS | M: 2/3, Z: 1/10 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ NL 2WS L L 3LS L L 3LS L L 2WS | ? (blank): 270 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ O 13WS 2LS L L |3WS L L LSL 13WS Tile Count: 79 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ Player 0: Rack="?AYYDMR", Score=0 Position (RC or 00 to reload rack) : HH Create class named scrabble Tile. A scrabble Tile object will store the letter and point value of a Scrabble tile. Note that blank tiles are represented by the ? character. scrabble Tile will have the following member functions: scrabbleTile(char, value), constructor to create a tile I-scrabbleTile(), destructor (optional) set(char), sets a blank tile's letter letter(), returns the tile's letter value(), returns the tile's point value isBlank), returns true if tile is a blank No other member or non-member functions are required. Create class named scrabbleBag. A scrabbleBag object will store a collection of scrabbleTile objects in a dynamic array. scrabbleBag will have the following member functions: scrabbleBag(), creates an empty scrabbleBag scrabble Bag(scrabbleBag), creates a copy of a scrabbleBag I-scrabbleBag(), destructor clear(), empties the scrabbleBag of all scrabbleTiles size(), that returns the number of scrabbleTiles in the scrabbleBag reload(), loads the scrabbleBag with a standard set of scrabble Tile objects (see table below) .isEmpty(), return true if the bag is empty add(scrabbleTile), inserts a scrabbleTile into the scrabbleBag remove(scrabbleTile), removes the passed scrabble Tile from the scrabbleBag draw(Integer), removes and returns either a scrabbleTile by index or at random (if no parameter is passed) from the scrabbleBag .find(scrabbleTile), returns index to the passed tile or npos if not found at(Integer) returns a constant scrabble Tile by index

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

8. Demonstrate aspects of assessing group performance

Answered: 1 week ago