Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PROGRAM HAS TO BE IN JAVA Question: Aunt Vera in Vegas Before you start this program, you should be comfortab... Aunt Vera in Vegas Before

PROGRAM HAS TO BE IN JAVA

Question: Aunt Vera in Vegas Before you start this program, you should be comfortab...

Aunt Vera in Vegas

Before you start this program, you should be comfortable with the decision statement and loops.

Program Specification:

Vera takes a jar which contains exactly 100 quarters to the casino with the intention to win big. She plays three machines slot machines in sequence. Unknown to her, the machines are entirely predictable.

Each play costs one quarter.

The following are constants:

The first machine pays 25 quarters every 33th time it is played;

the second machine pays 75 quarters every 99th time it is played;

the third pays 7 quarters every 9th time it is played.

So she will always lose - eventually.

Notice that she plays the machines one at a time in sequence: the first one, then the second one, the third one, the first one, the second one

Your program will output the number of times Vera plays until she goes broke along with the result of each time she wins money. Besides main you must define and use at least 4 methods.

Your program will input the number of quarters in Veras jar (it could be any number but for this assignment make it 100).

Your program will output a statement EVERYTIME Vera wins money. The output will contain the following:

The Number of Machine (1, 2, or 3) that she just won on

The Amount she just won (formatted like dollars and cents)

The current number of quarters remaining in the jar immediately after the win and the amount of money in the jar (i.e. there are 47 quarters in the jar with equals $11.75.

Once Vera is broke, you will output put the total number of times she was able to play the machine.

IN THIS ASSIGNMENT, your output will be saved inside of a text file. The text file should be saved in the src folder.

Team Deliverables:

Team Assignment (only ONE MEMBER of the Team will submit the WHOLE assignment in BBONLY ONE)

A Good Design Tool

Well Documented Source Code

Everyone writes at least One Method

Be prepared to demonstrate or discuss in class

You CANNOT DO:

You cannot create an instance of a class that you have created.

You cannot create a class with instance variables

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

Step: 3

blur-text-image

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

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions