Write a program that implements an atm machine

Assignment Help JAVA Programming
Reference no: EM131719374

Assignment

This project involves writing a program that implements an ATM machine. The interface to the program 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 to build the GUI, event handlers will be needed to handle each of the four buttons shown above. When the Withdraw button is clicked, several checks must be made. The first check is to ensure the value in the text field is numeric. Next a check must be made to ensure the amount is in increments of $20. At that point an attempt to withdraw the funds is made from the account selected by the radio buttons. The attempt might result in an exception being thrown for insufficient funds, If any of those three errors occur a JOptionPane window should be displayed explaining the error. Otherwise a windowshould be displayed confirming that the withdrawal has succeeded. When the Deposit button is clicked the only necessary check is to ensure that the amount input in the textfield is numeric. Clicking the Transfer button signifies transferring funds to the selected account from the other account. The checks needed are to confirm that the amount supplied is numeric and that there are sufficient funds in the account from which the funds are being transferred. Clicking the Balance button will cause aJOptionPane window to be displayed showing the current balance in the selected account. The main class must contain twoAccount objects, one for the checking account and another for the savings account.

1. The second class isAccount. It must have a constructor plus a method that corresponds to each of the four buttons in the GUI. It must also incorporate logic to deduct a service charge 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 and two from the savings, any withdrawal from either account thereafter incurs the service charge. The method that performs the withdrawals must throw anInsufficientFunds exception whenever an attempt is made to withdraw more funds than are available in the account. Note that when service charges apply, there must also be sufficient funds to pay for 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 to format 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 private Avoid the duplication of code

Test cases should be supplied in the form of table with columns indicating the input values, expected output, actual output and if the test case passed or failed. This table should contain 4 columns with appropriate labels and a row for each test case. Note that the actual output should be the actual results you receive when running your program and applying the input for the test record. Be sure to select enough different scenarios to completely test the program.

Note: All code should compile and run without issue.

Submission requirements

Deliverables include all Java files (.java) and a single word (or PDF) document. The Java files should be named appropriately for your applications. The word (or PDF) document should include screen captures showing the successful compiling and running of each of the test cases. Each screen capture should be properly labeled clearly indicated what the screen capture represents. The test cases table should be included 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).

Reference no: EM131719374

Questions Cloud

Gaining market share and hiring : Sears is losing market share, has been acquired by K-Mart, and is eliminating jobs; Walmart is gaining market share and hiring.
Some kids sell lemonade : Please read the article from the New York Times on 2/28/2016 titled "Some Kids Sell Lemonade.
What is impact of all these dead-beat relatives occupying : What is the impact of all these dead-beat relatives occupying the place? What is the impact of spending a lot of time making repairs while at the vacation home?
How does knowing the customer drive business success : How does knowing the customer drive business success? What types of products do you think would benefit most through VALS use
Write a program that implements an atm machine : This project involves writing a program that implements an ATM machine. The interface to the program should be a Java GUI.
Computing the effective leadership : As a leader of an organization, it will be up to you to discover/determine the best strategies for balancing the different beliefs and practices of employees.
How might this process be improved to avoid delays : Create a flowchart of the passenger arriving at an airport for departure process. How might this process be improved to avoid delays?
Compose an objective statement for your career path : Compose an objective statement for your career path that you can use on your résumé.
Effective customer service manager : What skills do you possess that would make you an effective customer service manager? Describe in a short paragraph how you would apply

Reviews

Write a Review

JAVA Programming Questions & Answers

  Developing prototype applet for web inventory management

As a lead systems developer for iDev3, you have been assigned as a consultant to work with Wrigley Inc (the gum company). Your project consists of developing a prototype applet for web-based inventory management

  Implement client-server communication

Write a java program implementing Client-Server communication using Remote Method Invocation.

  What are the benefits of the improvements made to program

Write a 1-2 page paper explaining what are the benefits of the improvements made to the program and the meaning behind each improvement. Please do not forget to include any references if used.

  How many variables can be held in the local variable array

One byte is used for the opcode, the other indicates the offset into the array. How many variables can be held in the local variable array? What do you think happens when this number is exceeded?

  Write a java program that finds the temperature

Write a JAVA program that finds the temperature that is the same in both Celsius and Fahrenheit

  A this adds storage of the maindata as an external random

a. this adds storage of the maindata as an external random access file with id as key to allow listall and query

  Run on ethanol and gas

Suppose a car can run on ethanol and gas and you have a 15 gallons tank to fill. You can buy fuel that is either 30 percent ethanol or 80 percent ethanol. How much of each type of fuel should you mix so that the mixture is 40 percent ethanol?

  Write a program to manage a book catalog

CSC 143 PROGRAMMING - Write a program to manage a Book Catalog. The catalog would contain a collection of books, with following fields of informatio

  Write a custom java exception class named badarrayexception

A constructor taking a String parameter (the exception message) that must be passed to the parent Exception(String) constructor.

  Fix the error in personal names

Write a program which will get the personal names from the user and store them in an array list called "personalNames". If there is any other character besides "a-z" or "A-Z" in a record, those should be flagged as ill-defined data.

  Write a program that reads numbers from the keyboard

Write a program that reads numbers from the keyboard into an array of type int[] - Your program should allow any number of numbers to be entered

  Program that computes and prints the value of 6!/5! using

Write a Java program that computes and prints the  value of 6!/5! using Scanner.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd