Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

I’ve never worked with GUI before. I’d like some help compiling this code.

I’ve never worked with GUI before. I’d like some help compiling this code.

1Project 2This project involves writing a program that implements an ATM machine. The interface to theprogram should be a Java GUI that looks similar to the following:The program should consist of three classes.1.The first class should define the GUI. In addition to the main method and a constructor tobuild the GUI, event handlers will be needed to handle each of the four buttons shownabove. When theWithdrawbutton is clicked, several checks must be made. The firstcheck is to ensure the value in the text field is numeric. Next a check must be made toensure the amount is in increments of $20. At that point an attempt to withdraw the fundsis made from the account selected by the radio buttons. The attempt might result in anexception being thrown for insufficient funds, If any of those three errors occur aJOptionPanewindow should be displayed explaining the error. Otherwise a windowshould be displayed confirming that the withdrawal has succeeded. When theDepositbutton is clicked the only necessary check is to ensure that the amount input in thetextfield is numeric. Clicking theTransferbutton signifies transferring funds to theselected account from the other account. The checks needed are to confirm that theamount supplied is numeric and that there are sufficient funds in the account from whichthe funds are being transferred. Clicking theBalancebutton will cause aJOptionPanewindow to be displayed showing the current balance in the selected account. The mainclass must contain twoAccountobjects, one for the checking account and another for thesavings account.2.The second class isAccount. It must have a constructor plus a method that correspondsto each of the four buttons in the GUI. It must also incorporate logic to deduct a servicecharge of $1.50 when more than four total withdrawals are made from either account.Note that this means, for example, if two withdrawals are made from the checking andtwo from the savings, any withdrawal from either account thereafter incurs the servicecharge. The method that performs the withdrawals must throw anInsufficientFundsexception whenever an attempt is made to withdraw more funds than are available in the
Background image of page 1
2account. Note that when service charges apply, there must also be sufficient funds to payfor that charge.3.The third class isInsufficientFunds, which is a user defined checked exception.The google recommended Java style guide, provided as link in the week 2 content, should be used toformat and document your code. Specifically, the following style guide attributes should be addressed:Header comments include filename, author, date and brief purpose of the program.In-line comments used to describe major functionality of the code.Meaningful variable names and prompts applied.Class names are written in UpperCamelCase.Variable names are written in lowerCamelCase.Constant names are in written in All Capitals.Braces use K&R style.In addition the following design constraints should be followed:Declare all instance variables privateAvoid the duplication of codeTest cases should be supplied in the form of table with columns indicating the input values, expectedoutput, actual output and if the test case passed or failed. This table should contain 4 columns withappropriate labels and a row for each test case.Note that the actual output should be the actual resultsyou receive when running your program and applying the input for the test record. Be sure to selectenough different scenarios to completely test the program.Submission requirementsDeliverables include all Java files (.java) and a single word (or PDF) document. The Java files should benamed appropriately for your applications. The word (or PDF) document should include screen capturesshowing the successful compiling and running of each of the test cases. Each screen capture should beproperly labeled clearly indicated what the screen capture represents. The test cases table should beincluded in your word or PDF document and properly labeled as well.Submit your files to the Project 2 assignment area no later than the due date listed in your LEO classroom.You should include your name and P2 in your word (or PDF) file submitted (e.g.firstnamelastnameP2.docx or firstnamelastnameP2.pdf).
Background image of page 2

Show 

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"