Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Create a program that simulates a slot machine. When the program runs, it should do the following:

1. Asks the user to enter the amount of money he or she wants to enter into the slot machine.

2. Instead of displaying images, have the program randomly select a word from the following list:

Cherries, Oranges, Plums, Bells, Melons, Bars

To select a word, the program can generate a random number in the range of 0 through 5. If the number is 0, the selected word is Cherries, if the number is 1, the selected word is Oranges, and so forth. The program should randomly select a word from this list three times and display all three of the words.

3. If none of the randomly selected words match, the program informs the user that he or she has won $0. If two of the words match, the program informs the user that he or she has won two times the amount entered. If three of the words match, the program informs the user that he or she has won three times the amount entered.

4. The program asks if the user wants to play again. If so, these steps are repeated. If not, the program displays the total amount of money entered into the slot machine and the total amount won.

In addition, there are two additional requirements.

1. Create a UML diagram for the program.

2. Provide a list of tests to prove that the program works correctly. There should be at least 8 test cases.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9781084

Have any Question?


Related Questions in Computer Engineering

Systems and networksconsider sending a large file from a

(Systems and Networks) Consider sending a large file from a host to another host using a reliable connection such as TCP. Suppose the reliable connection uses additive-increase, multiplicative-decrease (AIMD) without slo ...

This chart lists the estimated lengths and arrival times

This chart lists the estimated lengths and arrival times for 5 jobs. In what order do these run using FCFS? What is the average turn-around time (difference in time between a job's arrival and its completion)? In what or ...

Access your browsers security settings and configure the

Access your browser's security settings and configure the browser to refuse all cookies or to prompt you before allowing a cookie. Restart the browser; then visit several different Web sites. Be sure to visit popular sit ...

The toronto blue jays raises ticket prices from 100 to 120

The Toronto Blue Jays raises ticket prices from $100 to $120 per seat and experience a decline in ticket sales from 12000 to 10000 per game. i) What is the elasticity of demand for tickets? ii) Assuming the marginal cost ...

Scenario 1 19500 ascii characters are transmitted over a 3

Scenario 1: 19,500 ASCII characters are transmitted over a 3 Mbps circuit. The protocol uses 8-bits to encode each ASCII character, and adds an additional parity bit to help detect errors. Calculate the transmission effi ...

A chemist weighed outnbsp779 g of calcium calculate the

A chemist weighed out 77.9 g of calcium. Calculate the number of moles of calcium she weighed out. Round your answer to 3 significant digits.

Wat type of malware do you think is the most destructive

What type of malware do you think is the most destructive : viruses, worms, trojan programs, spyware or adware.

On the below question how did they decided the two

On the below question, how did they decided the two probabilities of guessing the correct and wrong answer on a question? Where did the 0.25 and 0.75 come from? The probability of achieving exactly  k  successes in  n  t ...

Configuring name resolutionas the administrator of the

Configuring Name Resolution As the administrator of the Contoso Corporation, you manage an internal website that is often used by most users with the company. You try to connect to an internal website but cannot open the ...

You have been recently promoted to it security manager your

You have been recently promoted to IT Security Manager. Your first job is to document the older hardware and software your company is currently using in the IT department. State the strengths and weaknesses with the curr ...

  • 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