Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CREATE A UML CLASS DIAGRAM FOR THE FOLLOWING SET OF REQUIREMENTS: Requirements When the application is started, the player may choose to (1) Play a

CREATE A UML CLASS DIAGRAM FOR THE FOLLOWING SET OF REQUIREMENTS:

Requirements

  1. When the application is started, the player may choose to (1) Play a word game, (2) View statistics, or (3) Adjust the game settings.

  2. When choosing to adjust the game settings, the player (1) may choose for the game to end after a certain number of minutes, from 1 to 5, defaulting to 3, (2) may adjust the size of the square board, between 4(x4) and 8(x8), defaulting to 4, and (3) may adjust the weights of the letters of the alphabet between 1 and 5, defaulting to 1.

  3. When choosing to play a word game, a player will:

    1. Be shown a board of randomly generated letters.

    2. Be shown a timer counting down the number of minutes available for the game, as set in the settings.

    3. Start with 0 points, which is not required to be displayed during the game.

    4. Until the game timer counts to zero and the game ends:

      1. Enter a unique word made up of two or more letters on the board. The word must contain only letters from the board that are each adjacent to the next (horizontally, vertically, or diagonally) and a single letter on the board may not be used twice. The word does not need to be checked against a dictionary (for simplicity, we will assume the player enters only real words that are spelled correctly).

or

  1. Choose to re-roll the board at a cost of 5 points. The board will be re-created in the same way it is generated at the start of each game, replacing each letter. The timer will not be reset or paused. The players score may go into negative values.

or

      1. Choose to exit the game early.

    1. At the end of the game, when the timer has run out or the player chooses to exit, the final score for the game will be displayed.

    2. Each word will score 1 point per letter (Qu will count as 2 letters), and the cost for each board reset will be subtracted.

    3. After the player views the score, they will continue back to the main menu.

  1. Whenever the board is generated, or re-generated it will meet the following criteria:

    1. The board will consist of a square full of letters. The square should have the number of letters, both horizontally and vertically, indicated by the size of the square board from the game settings (4x4, 5x5, 6x6, 7x7, or 8x8).

    2. (rounded up) of the letters will be vowels (a,e,i,o,u). will be consonants.

    3. The letter Q will be displayed as Qu (so that Q never appears alone).

    4. The location and particular letters should be randomly selected from a distribution of letters reflecting the weights of letters from the settings. A letter with a weight of 5 should be 5 times as likely to be chosen as a letter with a weight of 1 (assuming both are consonants or both are vowels). In this way, more common letters can be set to appear more often.

    5. A letter may appear on the board more than once.

  2. When choosing to view statistics, the player may view (1) game score statistics, or (2) word statistics.

  3. For game score statistics, the player will view the list of scores, in descending order by final game score, displaying:

    1. The final game score

    2. The number of times the board was reset

    3. The number of words entered in the game

The player may select any of the game scores from this list to view the settings for that games board size, number of minutes, and the highest scoring word played in the game (if multiple words score an equal number of points, the first played will be displayed).

  1. For the word statistics, the player will view the list of words used, starting from the most frequently played, displaying:

    1. The word

    2. The number of times the word has been played, across all games

  2. The user interface must be intuitive and responsive.

  3. The performance of the game should be such that students do not experience any considerable lag between their actions and the response of the application.

For simplicity, you may assume there is a single system running the application.

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

More Books

Students also viewed these Databases questions