1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
timurjin [86]
4 years ago
9

This project involves writing a java program to simulate a blackjack card game. You will use a simple console-based user interfa

ce to implement this game.
A simple blackjack card game consists of a player and a dealer. A player is provided with a sum of money with which to play. A player can place a bet between $0 and the amount of money the player has. A player is dealt cards, called a hand. Each card in the hand has a point value. The objective of the game is to get as close to 21 points as possible without exceeding 21 points. A player that goes over is out of the game. The dealer deals cards to itself and a player. The dealer must play by slightly different rules than a player, and the dealer does not place bets. A game proceeds as follows:
A player is dealt two cards face up. If the point total is exactly 21 the player wins immediately. If the total is not 21, the dealer is dealt two cards, one face up and one face down. A player then determines whether to ask the dealer for another card (called a "hit") or to "stay" with his/her current hand. A player may ask for several "hits." When a player decides to "stay" the dealer begins to play. If the dealer has 21 it immediately wins the game. Otherwise, the dealer must take "hits" until the total points in its hand is 17 or over, at which point the dealer must "stay." If the dealer goes over 21 while taking "hits" the game is over and the player wins. If the dealer’s points total exactly 21, the dealer wins immediately. When the dealer and player have finished playing their hands, the one with the highest point total is the winner. Play is repeated until the player decides to quit or runs out of money to bet.
You must use an object-oriented solution for implementing this game.
Computers and Technology
1 answer:
coldgirl [10]4 years ago
8 0

Answer:i dont know sorry

Explanation:

You might be interested in
Define a method calcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a d
tamaranim1 [39]

The method calcPyramidVolume is an illustration of the java methods; where the methods are executed when called or evoked

<h3>The main program</h3>

The program written in Java, where comments are used to explain each action is as follows:

//This defines the calcPyramidVolume method

public static double calcPyramidVolume(double baseLength,double baseWidth, double pyramidHeight) {

//This calculates the volume of the pyramid

       double PyramidVolume = calcBaseArea(baseLength,baseWidth) * pyramidHeight;

//This returns the volume of the pyramid

       return PyramidVolume;

   }

Read more about java methods at:

brainly.com/question/19271625

7 0
3 years ago
What does this mean “Fatal error: Uncaught exception 'Thrift\Exception\TTransportException' with message 'THttpClient: Could not
hodyreva [135]
You could try turning your pc completely off then back on or redownloading your browser
3 0
4 years ago
Which aeronautical term is an aircraft that derives its lift from rotating lifting surfaces?
denis-greek [22]
<span>The answer is rotorcraft.

A rotorcraft uses lift generated by wings that revolve or rotates around a mast. Generally, rotorcraft includes aircraft such as helicopters, gyrodynes, cyclocopters, and autogyros that use one or more rotors to provide lift throughout the entire flight. For instance, on a helicopter, there is a left or right movement of cyclic which will command a roll motion from the rotor.</span>
3 0
3 years ago
Read 2 more answers
mips Write a program that asks the user for an integer between 0 and 100 that represents a number of cents. Convert that number
Mumz [18]

Answer:

Explanation:

The following code is written in python and divides the amount of cents enterred in as an input into the correct amount of quarters, dimes, nickels and pennies. Finally, printing out all the values.

import math

#First we need to define the value of each coin

penny = 1

nickel = 5

dime = 10

quarter = 25

#Here we define the variables to hold the max number of each coin

quarters = 0

dimes = 0

nickels = 0

pennys = 0

cents = int(input("Please enter an amount of money you have in cents: "))

if cents > 0 and cents <= 100:

   if cents >= 25:

       quarters = cents / quarter

       cents = cents % quarter

   if cents >= 10:

       dimes = cents/dime

       cents = cents % dime

   if cents >= 5:

       nickels = cents /nickel

       cents = cents % nickel

   if cents > 0:

       pennys = cents / penny

       cents = 0

   print("The coins are: "

       "\nQuarters", math.floor(quarters),

       "\nDimes", math.floor(dimes), "\nNickels", math.floor(nickels), "\nPennies", math.floor(pennys))

else:

   print("wrong value")

8 0
3 years ago
Sales and marketing users have similar roles, and use similar record types. However, sales uses 3 different fields and marketing
Olenka [21]

Answer:

B. 2 page layouts, 1 record type, 2 profiles

Explanation:

The most efficient way to setup the process is by setting 2 page layouts, 1 record type and also 2 profiles.

7 0
3 years ago
Other questions:
  • Why would you use a database system instead of traditional file system
    6·1 answer
  • Which technology uses regular phone lines and transmits at speeds up to 256 kbps?
    15·2 answers
  • What is the purpose of interrupts? What is a trap? Can traps be generated intentionally by a user program? If so, for what purpo
    13·1 answer
  • What analogy could you use to explain the hardware parts of a computer?
    11·1 answer
  • Websites whose URL’s contain tildes (~) are usually published by the government. True or false?
    8·2 answers
  • Find the simple interest Jay owes on a five-year student loan of $48,000 with an annual interest rate of 5%.
    6·1 answer
  • Which of the following statements is true?
    8·2 answers
  • What is responsible for recording an image of an object with camera <br> Pls I neeed it right know
    8·1 answer
  • Lindsey also needs to calculate the commissions earned each month. If the company earns $200,000 or more in a month, the commiss
    10·2 answers
  • The main technology for setting up a wireless local area network is​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!