Think of three classes that would be used in a Mahjong solitaire game. At least
ID: 3594634 • Letter: T
Question
Think of three classes that would be used in a Mahjong solitaire game. At least one of these classes must have multiple instances in the game. For each of these classes, describe two attributes (instance variables) and two operations (methods). A one line, simple description is sufficient for each attribute and operation. Do not worry about all the details that would be involved in finally implementing these classes in C++. Concentrate on modeling the objects. Represent each class using the class diagram (box) notation described during lecture. If you are not familiar with Mahjong Solitaire, here is a brief description: Mahjong is a single-play tile game played in turns. The object of Mahjong is to remove all the tiles from the board, a pair at a time by matching tiles. Remove all tiles from the board by finding matching pairs of free tiles. Two tiles match if they have the same picture and number. However, only "free" tiles can be removed by a player during their turn. A free tile is one that has no other tiles on top of it, and is unblocked on either its right or left side. The game also includes a time and turn counter. Players should try to finish as quickly as they can in as few turns as possible. To help you, a screen shot of Mahjong is shown below. Look at the items in the picture. Almost anything you see on the screen could be an object. Reread the above description of the game. Objects are frequently nouns in the specification of a program.
Explanation / Answer
Code:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.