Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science 1 Dice Project.

Similar presentations


Presentation on theme: "Computer Science 1 Dice Project."— Presentation transcript:

1 Computer Science 1 Dice Project

2 Learning Objectives Be able to develop a fairly large scale program meeting the needs of a client. Demonstrate how to understand the questions, develop a pseudo code, test the pseudo code, translate to code and communicate with the client throughout the development of the project.

3 Project West High Lottery has decided to create an ‘online fund raising’ service through games of chance. Below are the descriptions of the games that must be included and how the results must be formatted in order to get the most out of our valued donors.

4 Game 1 Friends Involved in Enabling Lots of Donations (or Field for short) Rules: Roll a pair of six sided dice If the donor rolls a 2 or a 12, they win twice their bet. If the donor rolls a 3, 4, 9, 10, or 11, they win the amount they bet. If they roll anything else, they lose their bet.

5 Game 2 Creative Raising of Additional Phinancial Securities (or Craps for short) Rules: Roll a pair of six sided dice If the donor rolls a 2, 3, or 12 on the first roll, they lose. If the donor rolls a 7 or an 11 on the first roll, they win. If the donor rolls anything else (4, 5, 6, 8, 9, 10) then this first roll is saved as the POINT and the game changes a little, but continues Now the donor continues to roll until they roll… a 7 and lose or the POINT and win

6 Required stuff Include a limit of $1000 bet. (Why?) No negative bets
Do not let the user bet more money than they have. Create a chart like Hands on. This is for the Parents Club and more details are coming.

7 Extensions: Put in additional games
Include giving gifts if they have played for a long period of time. Add graphics/animations Make it educational

8 Due Dates and Required Parts
Hands on: Thursday 11/29 (10 points) Thursday at the beginning of the period -1 point if late Pseudo code: Monday 12/3 (20 points) By the end of the period -2 points if late Dry Run: Tuesday 12/4 (10 points) Beginning of the period Code: Monday 12/10 (50 points) Monday at the end of the period -5 points if late

9 Partial Sample Hands On
For your hands-on you will need to demonstrate every first roll for each game Starting Balance Game Bet Roll Win/loss New Balance $ Field $ $ $ $ Field $ $ $ $ Field $ $ $ $ Craps $ $ $ $ Craps $ $ $ $ Craps $ 10 2 6 $ $ $ Craps $ 6 7 $ $850.00 You entered with $1000 and you left with $850. Thank you for your $ donation. This becomes the point. Don’t forget the closing comments. You will need to have different comments based on their winnings or losses.

10 Pseudo Code Psample (20 points)
Get the users choice (Craps, Field, Quit) While they did not chose quit If they chose Field Get the donors bet Until it is a valid bet (not > $1000, not negative, not more than they have) Roll the dice If the roll is a 2 or a 12 Winloss = twice the bet NewBalance = Balance + winloss Show Balance, ‘Field’, bet, roll, Winlosss, NewBalance Balance = newbalance If the roll is a … For your Pseudo Code it will need to handle all possibilities.

11 Dry Run (10 Points) This is where you test your Pseudo-code.
It will look like the hands on except it is testing the pseudo code… Use the pseudo code to determine what is shown It will only need to go through each path (win. loss, double win, …,) not every first roll. Variables Money Game Bet… But in showing the chart, it needs to be just like the client wants. For getting input from the user you can use shorthand……. Screen ………. Starting Balance Game Bet Roll Win/loss Amt New Balance $ Field $ $ $

12 “All for one, two for five, first to ten or last alive….”
Code (50 points) This is the program you will turn in. Be smart and lazy when implementing!! First write and test the menus Then Field be win Then field loss Always checking between … “All for one, two for five, first to ten or last alive….”

13 After you complete and check a section, bring it back to Mr
After you complete and check a section, bring it back to Mr. Smith for evaluation. Grading Sheet

14 Due Dates and Required Parts
Hands on: Thursday 11/29 (10 points) Thursday at the beginning of the period -1 point if late Pseudo code: Monday 12/3 (20 points) By the end of the period -2 points if late Dry Run: Tuesday 12/4 (10 points) Beginning of the period Code: Monday 12/10 (50 points) Monday at the end of the period -5 points if late


Download ppt "Computer Science 1 Dice Project."

Similar presentations


Ads by Google