[Solved] SOLVED:a program that implements an ATM machine

30 $

File Name: SOLVED:a_program_that_implements_an_ATM_machine.zip
File Size: 442.74 KB

SKU: [Solved] SOLVED:a program that implements an ATM machine Category: Tag:

Or Upload Your Assignment Here:


The second project involves writing a program that implements an ATM machine. Theinterface to the program should be a GUI that looks similar to the following:

The program should consist of three classes. The first class should define theGUI and should be hand-coded and not generated by a GUI generator. Inaddition to the main method and a constructor to build the GUI, eventhandlers will be needed to handle each of the four buttons shown above. Whenthe Withdraw button is clicked, several checks must be made. The firstcheck is to ensure the value in the text field is numeric. Next a check mustbe made to ensure the amount is in increments of $20. At that point anattempt to withdraw the funds is made from the account selected by the radiobuttons. The attempt might result in an exception being thrown forinsufficient funds, If any of those three errors occur a JOptionPane windowshould be displayed explaining the error. Otherwise a window should bedisplayed confirming that the withdrawal has succeeded. When the Deposit buttonis clicked the only necessary check is to ensure that the amount input in thetextfield is numeric. Clicking the Transfer button signifiestransferring funds to the selected account from the other account. The checksneeded are to confirm that the amount supplied is numeric and that there aresufficient funds in the account from which the funds are being transferred.Clicking the Balance button will cause a JOptionPane window to bedisplayed showing the current balance in the selected account. The main classmust contain two Account objects, one for the checking account and anotherfor the savings account.The second class is Account.It must have a constructor plus a method thatcorresponds to each of the four buttons in the GUI. It must also incorporatelogic to deduct a service charge of $1.50 when more than four totalwithdrawals are made from either account. Note that this means, for example,if two withdrawals are made from the checking and two from the savings, anywithdrawal from either account thereafter incurs the service charge. Themethod that performs the withdrawals must throw an InsufficientFundsexception whenever an attempt is made to withdraw more funds than areavailable in the account. Note that when service charges apply, there mustalso be sufficient funds to pay for that charge.The third class is InsufficientFunds, which is a user defined checked exception.Be sure to follow good programming style, which means making all instance andclass variables private, naming all constants and avoiding the duplication ofcode. Furthermore you must select enough scenarios to completely test theprogram.The projects has to contain:The implementation of solution as a Javasource files.The documentation as a separately .doc fileexpect to find:First, the program has to be compiled without error andhas to be run.Second is necessary to prepare a documentation that hasto contain:Analyze the problemDesign the program to solve the problemCode the programTest the program (input data and expectedoutput data)1. Analyze the problem1.1. Youranalysis should be clearly written and demonstrate your thought process andsteps used to analyze the problem.1.2. Include what is the required output?1.3. What is the necessary inputs?1.4. Include your variable names and definitions.1.5. Describe the necessary formulas and samplecalculations that might be needed.Pseudocode and UML is welcome.2. Design theprogram to solve the problemProvide your algorithm design for the program youanalyzed3. Code the program in Javalanguage ( include comments inside the code and at beginning ofeach class)4. Test planPrepare necessarysets of input data (Test data) along with their expected output for testingyour program.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED:a program that implements an ATM machine
30 $