Google Answers Logo
View Question
 
Q: c++ program ( No Answer,   3 Comments )
Question  
Subject: c++ program
Category: Computers > Programming
Asked by: fawad-ga
List Price: $5.00
Posted: 22 Dec 2002 06:59 PST
Expires: 21 Jan 2003 06:59 PST
Question ID: 132410
Your task for this is to develop some of the functionality required to
help play the game of Yahtzee on a computer.   you will finish off the
entire game so that you will have a fully playable version of computer
Yahtzee.

As such, you will be required to develop some functions to satisfy
specific requirements, and to develop a test harness that will allow
you to test and demonstrate the functions.

Your program should contain the following :

1.	Arrays and Data Types :
a.	Score_Category : an enumerated type which contains each of the 13
possible scoring categories along with items for the various bonus,
sub-total, and grand total categories.
b.	An array of the scores achieved for each scoring category.
c.	An array to determine which scoring categories have been used in
the current game.
d.	An array to contain the values of the 5 dice thrown for a
particular roll of the dice.

2.	Display_Score_Category : a function to display a meaningful
description for each item in the Score Category enum.

3.	Display_Score_Board : a function to display the current score in
each scoring category (along with the various sub-totals and totals
for the current game), and the values of the 5 dice thrown for the
current turn.  For example :

 ************************************************************
 **     Mike's        Y A H T Z E E         Challenge      **
 ************************************************************

  1.            Ones    1           10.  Small Straight   30
  2.            Twos                11.  Large Straight   40
  3.          Threes    6           12.         Yahtzee
  4.           Fours                13.          Chance
  5.           Fives                              Bonus    0
  6.           Sixes   18                   Upper Total   25
  7.     3 of a Kind                        Lower Total   70
  8.     4 of a Kind                        Grand Total   95
  9.      Full House

The 5 dice are :
      1      2      3      4      5
    -----  -----  -----  -----  -----
    | 1 |  | 4 |  | 4 |  | 4 |  | 4 |
    -----  -----  -----  -----  -----

4.	Sum_All_5_Dice : a function to return the sum of the values of all
5 dice.

5.	Calculate_Score : a function to calculate the score based on the
values of the 5 dice for the selected Scoring Category.  This function
also calculates the various bonus, sub-totals, and grand total for the
current game.   For this assignment, this function should assume that
the dice are sorted in ascending order.

In addition to the above, you should also develop a main program to
call the above functions (and any other relevant functions that you
develop) to provide a test harness so that you can thoroughly test and
demonstrate the above functions.  Your main program should ensure that
the dice are sorted in  ascending order before calling the
Calculate_Score function.  (See "Test Harnesses" below for further
information).

All of this code should be brought together within a DOS standard or
EasyWin EXEcutable or Windows Console Project.

Note: Answer is needed 10 hours if u could do thid, otherwise pls do
not do this question, thanks

Request for Question Clarification by answerguru-ga on 22 Dec 2002 11:15 PST
Hi fawad-ga,

Sounds like an interesting problem but its unlikely anyone will take
this on for $5....personally I would not take it on for any less than
$100.

answerguru-ga
Answer  
There is no answer at this time.

Comments  
Subject: Re: c++ program
From: lieten-ga on 02 Jan 2003 07:06 PST
 
Console output, basic data type requirements, short deadline, small award...

This sounds like a request to do a homework problem.
Subject: Re: c++ program
From: itonydev-ga on 10 Jan 2003 03:24 PST
 
It looks like it was cut and pasted verbatim from the actual
assignment.  I would only do this if i was on the streets. 8^P

~Will program for food....
Subject: Re: c++ program
From: rightintothesun-ga on 17 Jan 2003 08:17 PST
 
As far as I remember, there is a gnu'ed Yahtzee game...
So why you are not taking just that?

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy