Designing and Developing Object-Oriented Computer Programs : Language Trainer

Introduction
The mind is like any part of the body – it needs exercise to stay healthy. There are many
cognitive training regimes that exist for that, but one of the most effective for memory is
the game known as ‘concentration’. In this game, fifty-two cards are laid face down on a
table. Each player takes a turn flipping over a card and then attempting to flip over a
second card with the same colour and value. For example, if we flip over the five of hearts
we would want to flip over the five of diamonds as our secondary selection. If we make a
match, the cards are removed and added to our score. If they don’t match, they are flipped
back face down and the other player is given an opportunity to flip two matching cards.
Players continue taking turns until all cards have been matched.
This is a powerful technique for training observational faculties and short-term memory,
and it’s your job for this assessment to write a piece of software that implements this
system with a difference – you’ll be looking to match English words and their translation for
several languages (two for the purposes of this assessment). For example, we might want
to match the English word ‘Hot’ with the French word ‘chaud’. For the purposes of this
assessment, it does not matter what language you use but the flashcards presented at
https://www.studystack.com/ would be an appropriate place to find suitable pairings. You
can use whatever language you like otherwise.
Your application should present players with a grid of fifty-two buttons, and each of those
will map on to a word or its translation. Each player will select a button, which will reveal its
contents, and a second button which will do the same. If there is a match, the buttons
should disappear, and the player should get a point. If not, the contents should be hidden,
and control should go to the next player.
The system then needs to allow the following:
• It needs to permit for players to choose a word set.
• It needs to create a grid of twenty-six words and their translations and map those to the
UI
• It needs to keep track of turn order and player actions within a turn
• It needs to eliminate used words from the UI
• It needs to track score and matches of buttons.
• A high score table of players and scores for each language should be retained
The program will also need to store user data such as name, success rates with particular
words, average score and average time to complete a game.
Your program then will need to perform the following operations:
• Set up the GUI
• Provide a way to add, modify and delete word sets.
• Provide players a way to choose word sets
• Set up an internal representation of words to their translation
• Map UI buttons to the words in the word set
• Implement a turn order for players
• Award points based on matching words and their translation
• Disable UI elements based on correctness of matches.
• Save the user data and statistics of each user along with the high score table.

Task 1

For a program which fully meets the requirements of the brief as
outlined above.

Class

dB connection

Db Connection 1
DB Connection 2
DB Connection 3
DB Connection 4

Player

Player Class

Word

Word Class

Forms

Add Player

Insert form 1
Insert Form 2
Insert Form 3

Game

GameForm 1
Game Form 2
Game Form 3
Game Form 4
Game Form 5
Game Form 6
Game Form 7
Game Form 8
Game Form 9

Dash

Dash Form 1
Dash Form 2
Dash Form 3

Insert

Insert form 1
Insert form 2
Insert Form 3

Update

Update Form1
Update Form 2
Update from 3

View

View Form 1
View Form 2

Task 2- Testing

Black Box

IdFormDescriptionTest ValuesExpectedActualResult
1Insert PlayerInserting player namePlayer1: test Player2: testGame form should be opened and insert player form should be closedGame form is opened and insert player form is closedPass
2Insert PlayerTesting Back button Insertplayer form should be closed and dash should be openedInsertplayer is closed and dash is openedPass
3GameTesting loading of player name from insert player formPlayer1:test Player2:testGame should load with player1 and player 2 nameGame is loaded with player1 and player2 namePass
4GameTesting English button click at first Button should display English language wordButton displays English language wordPass
5GameTesting Nepali button at first Messagebox showing “Please select English word first” should be displayedMessagebox showing “Please select English word first” is displayedPass
6DashTesting start button click Dash should be closed and insertplayer form should be loadedDash is closed and insertplayer form should be loadedPass
7UpdateTesting update buttonId:25 Word1: Test Word2:TestMessagebox showing “Updated” should be displayedMessagebox showing “Updated” is displayedPass
8UpdateTesting delete buttonId:25Messagebox showing “Deleted” should be displayedMessagebox showing “Deleted” is displayedPass
Black box test

Whitebox

White Box 1
White Box 2
White Box 3
White Box 4
White Box 5
White Box 6
White Box 7
White Box 8
White box all

Task 3- Class Diagram

Class Diagram

Leave a Comment