Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Java You are helping a corporation create a new system for keeping track of casinos and customers. The system will be able to record

Using Java

You are helping a corporation create a new system for keeping track of casinos and customers. The system will be able to record and modify customer and casino information. It will also be able to simulate games in the casino.

Customer-specific requirements

You can create new customers

All new customers have a new customerID assigned to them, starting with 1 for the first, 2 for the second, 3 for the third, ect.

New customers have names and monetary balances

Default values are default customer for name and 1000 for balance

You can add or subtract from a customers balance

Customer balances cannot go below 0

You can change a customers name

You can display a customers name and his or her balance

Casino-specific requirements

You can create a new casino

All new casinos have a new casinoID assigned to them, starting with 1 for the first, 2 for the second, 3 for the third, ect.

New casinos have names and monetary balances

Default values are default casino for name and 50000 for balance

You can add or subtract from a casinos balance

Casino balances cannot go below 0

Casinos offer 4 different games that customers can play

Twenty-one

High Low

Seven-Eleven

Slots

You can change a casinos name

Changing a casinos name subtracts the casinos balance by 15000

You can display a casinos name and its balance

Game requirements

All casino games are played by a customer against the casino. In games with dealers, the dealers represent the casino.

Any bets placed by the user and casino are deducted from the respective balances of both parties

Lost bets are added to the casino balance.

Amounts lost by the casino are deducted from the casino balance and added to the customers balance.

If a bet would cause either a casino or customer balance to go negative, that bet cannot be placed.

Bets cannot be 0 or negative.

Seven-Eleven

The game is played with dice. The objective of the game is to roll a seven or an eleven first.

Gameplay as follows:

The user makes a bet, the casino matches the amount to create the pot

The user and the casino each roll 2 six-sided dice simultaneously. The sum of both die is that player's total

If a player rolls a 7 or 11 and the other does not, the player with the 7 or 11 wins

If neither player rolls a 7 or 11, roll again

If both players roll a 7 or if both players roll an 11, roll again

If one player rolls a 7 and the other rolls an 11, the one who rolled an 11 wins

The winner wins the pot and adds the money to their balance

Twenty-One

The game is played with cards. Number cards (2,3,4,5,6,7,8,9,10) are worth their shown values. Other cards (Jack, Queen, King, Ace) are worth 10. The objectives of the game are to get cards as close to the value of 21 without going over and to beat the dealer. Assume the casino is using multiple decks for Twenty-One. Duplicates can be drawn in the same game.

Gameplay is as follows:

The user makes a bet, the casino matches the amount to create the pot

2 cards are dealt to the player, 2 cards are dealt to the dealer

The user can see both of their cards and one of the dealers cards

The user can choose to either draw a new card or stay with their current hand

If a user chooses to draw and their hand total exceeds 21, the casino wins

Once the user chooses to stay, the dealer will either draw a new card or stay

If the dealers hand is 17 or higher, they stay. If it is lower than 17, they draw

If the dealer draws and their hand total exceeds 21, the user wins

If both the dealer and the user stay, the totals are compared and the higher total wins

In case of a tie, the customer receives the initial bet back

The winner wins the pot and adds the money to their balance

Slots

Gameplay as follows:

The user is asked for the number of spins

Every spin costs the customer 5, this is added to the casino balance

Each spin, one of the following outcomes occurs:

70% chance to win 1 from the casino

20% chance to win 5 from the casino

9% chance to win 10 from the casino

1% chance to win 100 from the casino

Display the amount the user won

Repeat steps 2 to 4 until the number of spins are complete

High Low

The game is played with cards. The rank of the cards from low to high is as follows: A,2,3,4,5,6,7,8,9,10, Jack, Queen, King. The objective of the game is to guess whether the next card is going to be higher or lower than the current card. Assume the casino is using one deck for High Low, so no duplicates of cards can be drawn in the same game.

Gameplay as follows:

The user makes a bet, the casino matches the amount to create the pot

If this is not the first round, the new pot is combined with the previous pot

A card is drawn and shown to the user, the user guesses if the next card will be high or low. Ties are considered high

If incorrect, the casino wins

If the user is correct, ask if they want to continue or if they want to stop.

If the user continues, repeat steps 1 through 4

If the user stops, the user wins

The winner wins the pot and adds the money to their balance

If the user won and guessed correctly at least 4 times, they win the pot and an additional 50 from the casino

Program requirements

In your main method, create a menu that a user can navigate through. Create the options to complete the following tasks:

Create a new customer

Create a new casino

Change a customers name

Change a casinos name

Play games as a customer

Display customer details

Display casino details

Project Checklist

Submissions should include the following:

Project .java files

2 Flowcharts

UML Diagram

Test cases

Group feedback

.java Files

Initialize your program with 3 customers and 3 casinos. Set different names and money amounts for each. Your program should be clearly labeled throughout with pseudo-code. Comments are not only a component of your grade, but will also give me a better understanding of your program if it crashes at any point.

Flowchart and UML Diagrams

Create 2 flowcharts representing the flows of any 2 of the games. The UML diagram should represent the entire program and clearly indicate classes, class variables, and methods

Test Cases

Create screenshots that demonstrate the following requirements:

1.)Creating a new customer

2.)Creating a new casino

3.)Changing a customer name

4.)Changing a casino name

5.)1 game of twenty-one where the customer wins

6.)1 game of twenty-one where the casino wins

7.)1 game of high low where the customer wins (any amount)

8.)1 game of high low where the customer loses

9.)1 game of seven eleven where the customer wins

10.)1 game of seven eleven where the customer loses

11.) 1 game of slots with 5 spins

Display the name and bankroll of the customer and the casino interacting before and after games for cases 5 through 11. Label all screenshots and organize them into a word document

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2016 Riva Del Garda Italy September 19 23 2016 Proceedings Part 3 Lnai 9853

Authors: Bettina Berendt ,Bjorn Bringmann ,Elisa Fromont ,Gemma Garriga ,Pauli Miettinen ,Nikolaj Tatti ,Volker Tresp

1st Edition

3319461303, 978-3319461304

More Books

Students also viewed these Databases questions

Question

How to reverse a Armstrong number by using double linked list ?

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago