Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA PROGRAMMING PLEASE AND THANK YOU! The New ACME Machines ATM Machine: Bank of America has decided to replace their old, COBOL programmed, ATM machines.

JAVA PROGRAMMING PLEASE AND THANK YOU!

The New ACME Machines ATM Machine:

Bank of America has decided to replace their old, COBOL programmed, ATM machines. ACME Machines, your employer, has won the contract to create and deliver the 500 new ATM machines that Bank of America is going to need. At the lead programmer for ACME Machines, it is going to be your responsibility to create the software that the new ATM machine will use.

Bank of America has provided an overview of how their customers typically interact with an ATM machine. The bank customer enters their card into the machine and then types in their PIN. Bank security then verifies the card. The user selects the account to use (e.g. checking or savings). They then select an amount to withdrawal. Security verifies if the amount is available. The system then makes a decision as to if it is going to provide the money. The ATM provides the funds if possible. The ATM provides a receipt and returns the card to the user.

The Java program that you will create to control this ATM machine will start with a main method; however, then control will be transferred to a series of classes. Your program will contain at least the following classes and methods:

Class: ATMCard

o (1) Variable: cardNumholds a single ATM card's ID number

o (1) Variable: cardPINholds a single ATM card's PIN number

o (1) Variable: checking balanceamount of money in this person's checking account

o (1) Variable: savings balanceamount of money in this person's savings account

Class: CardServices

o (2) Method: initializeCardDB creates an array containing ATM card numbers and PINs

o (3) Method: insertCard checks to see if the inserted card's ID number is recognized

o (6) Method: processCard allows a user to request funds to withdraw

o (12) Method: returnCard -- returns the inserted card to the user

Class: PIN

o (4) Method: processPIN compares the entered PIN to the PIN stored for this card

o (5) Method: eatCard if the PIN is incorrectly entered four times, this eats the card

Class: Security

o (9) Method: verityBalance ensure that the card owner's account has enough money

o (10) Method: verifyMachineBalance -- ensure that the ATM machine has enough money

Class: Account

o (7) Method: select determines if the user wants to withdraw from checking or savings

Class: Money

o (8) Method: enterAmount asks user to enter the amount that they want to withdraw

Class: Dispense

o (11) Method: ones dispenses ones

o (11) Method fives dispenses fives

o (11) Method: tens dispenses tens

o (11) Method: twenty's dispenses twenty's

You can assume that the ATM has been loaded with $1,000 in the following denominations: 25 $20 bills, 25 $10 bills, 40 $5 bills, and 50 $1 bills. The ATM machine will attempt to provide every customer with money using the largest available bills assuming that the machine still has enough money to fulfill the request denominations don't matter (i.e. it could use all $1 if that's all that it had left).

The ATM machine should be programmed to display "Wrong PIN", "Unrecognized card", and "Out of money cannot complete transaction" The machine should "eat" the ATM card if the PIN is entered incorrectly 4 times.

The machine will be preloaded to recognize the following ATM cards:

image text in transcribed

Note that " -1" means that an account does not exist.

Once you've created your ATM machine, simulate the following transactions:

1. John Smith has both a checking and a savings account with BoA. He uses the ATM with card 123456789 and enters PIN 1111. He then requests $250 from his checking account.

2. Amy Rain has accounts at Citi Bank. When he inserts his ATM card into the BoA ATM machine with card ID number 347821905 the ATM machine should reject it.

3. Paul Logan has both a checking and a savings account with BoA. He uses the ATM with card 675849302 and enters PIN 0071. He then requests $500 from his checking account.

4. Tammy Placard only has a checking account. She then uses the ATM with card 135792468, but can't remember her PIN. She tries 2000, 2090, 2077, and 2079.

5. Jill Holland only has a checking account with BoA. She uses the ATM with card 019283746 and enters PIN 6194. She then requests $300 from her checking account. This amount is refused because the machine does not have that much money. She then requests $250 and the machine completes the transaction.

Card Number 123456789 Savings $1,275 PIN 1111 2097 6194 135792468 019283746 675849302 checking $550 $90 $715 $790 $113 0071 $211 $78 347821904 9871 Card Number 123456789 Savings $1,275 PIN 1111 2097 6194 135792468 019283746 675849302 checking $550 $90 $715 $790 $113 0071 $211 $78 347821904 9871

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

Implementing Ai And Machine Learning For Business Optimization

Authors: Robert K Wiley

1st Edition

B0CPQJW72N, 979-8870675855

More Books

Students also viewed these Databases questions

Question

=+Does your conclusion change if a 5 .01 is used?

Answered: 1 week ago

Question

=+35-5 Discuss how smart thinkers use intuition.

Answered: 1 week ago