Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

Play is as follows:

1.) Player places a bet

a. Bet is on one of three choice

i. "Player" will win

ii. "Banker" will win

iii. Tie between the "Player" and the "Banker"

2.) Cards are dealt face up

a. "Player" gets the first card and prints out suit and value, e.g., 2 of spades, or queen of clubs

b. "Banker" gets the second etc. "Player" gets the third etc.

c. "Banker" gets the fourth.

d. This ends the dealing of the cards for the round.

3.) Scores are calculated

a. Number cards are their numerical value

b. Face cards have no value

c. Aces are counted as 1

d. If the total is over 10, then divide the total by 10 (hint: use the MOD() function).

i. Example - 16 -> 6 ; 12 -> 2

4.) The higher score wins

5.) The player then receives their winnings at a 1:1 ratio. Thus if the player bet $10 they receive $20 (the original $10 bet plus $10 in winnings).

That's all there is to playing NCSU Bac.

Your program must do the following:

1.) Ask for the player's name

2.) Generate a file with the following information (the order of the information in the file is up to you):

a. Round Number

b. How much money the player has

c. Amount the player bet

d. Who did the player bet on?

e. "Player's" hand value

f. "Banker's" hand value

g. Which hand won? "Player" or "Banker"

h. How much did the player win

i. Sum of amount the player has won to this point

3.) Thus a sample of some of these values would be :

Hand # amt bet players value bankers value amt remaining

1 5 6 7 x-5

The game is quite simple, and played with a standard 52 count card deck. There are no jokers used. You will also have a standard starting amount of $1000.00 for the player to use during the game.

2 6 2 0 x+6

4. Your model and algorithm should also have a means to end the game. This could be done several ways which must include when the player has no more money, and then whatever else you decide such as after 50 rounds or  when the player has won double his starting amount.

Also, be sure to present the ending information to the user at the start of the game.

To do this program successfully you will need to call random numbers from the system, and understand how to model a card deck. Dr. Rodman's lecture notes on the subject should be used.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9522672

Have any Question?


Related Questions in Programming Language

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As