Mobile Applications and Systems MAS Assignment

Mobile Applications and Systems MAS Assignment

You are required to develop a card game application for use on a mobile phone. The application has several components. To achieve the maximum number of marks the application must be well tested. The work you produce MUST be your own work. If two or more students produce similar code they may be reported for suspected plagiarism.

The card game consists an opening screen which invites the player to play the game or view the Scores, you need to add commands “Scores” and “Start” to the opening screen (10 marks)

When the Start button is pressed the following screen is displayed.

 When the Start button is pressedThe cards must be randomly chosen from the deck of 52 cards. The card images are available from Blackboard.  You need to add the commands Stick and Twist to your screen  (30 marks)

You need to display the current score for both the Computer hand and Player hand (in this case 10 and 15.)  The scoring systems works with the cards having their face values apart from Aces which are worth 11 and Jack, Queen and King which are worth 10.     (10 marks)

Once a card is displayed the same card cannot appear again (5 marks) 

If the command Twist is selected:

Another Player Hand card is chosen at random and displayed and the Player’s score is updated. If the computer hand score is less than or equal to the player hand score another Computer Hand card is chosen at random and displayed and the Computer score is updated.

If any of the scores add up to 21 then the game is won either by the Computer or the Player and the game is over. If any of the scores are greater than 21 then the game is lost by either the computer or player (whoever scored more than 21) . If the game is not over the player can select Twist or stick and so on.  (10 marks) 

If the command Stick is selected:

A Computer Hand card is chosen at random and displayed and the Computer score is updated. If the Computer hand is greater than or equal to the player and less or equal to 21 then the computer wins else the player wins.  (5 marks) 

If the game is over and the computer has won a ticker is displayed saying the computer has won else if the player has won a ticker saying the player has won. Also the stick and twist commands  are replaced with a PlayAgain command which returns the player to the opening screen and an exit command which just exits the game (see screen shot below) (10 marks)

As a result of playingAs a result of playing several times the no of wins by the computer and player are stored in the rms database. These score are displayed when the score command is selected from the opening screen (see screen shot above)  (15 marks)

The report must contain print out of the source code                                          

The report must contain screen shots of the application running (5 marks)

The report must contain a CD with all your work on and a project that can be dropped into the WTK20/apps folder (which will run when the Ktoolbar is loaded) OR a project that runs in netbeans. The program must run! or you may not receive any mark.

Leave a Reply

Your email address will not be published. Required fields are marked *