Design a gui class that should be hand-coded

Assignment Help Programming Languages
Reference no: EM13968905

The program should consist of three classes. The first class should define the GUI and should be hand-coded and not generated by a GUI generator. 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 window should 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 a JOptionPane window to be displayed showing the current balance in the selected account. The main class must contain two Account objects, one for the checking account and another for the savings account. The second class is Account. 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 an InsufficientFunds 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. The third class is Insufficient Funds, which is a user defined checked exception.

Be sure to follow good programming style, which means making all instance and class variables private, naming all constants and avoiding the duplication of code. Furthermore you must select enough scenarios to completely test the program.

Reference no: EM13968905

Questions Cloud

Compare circuit and packet-switched networks. : Provide examples of what currently available systems can be enhanced and where additional opportunities exist.
How a lot of employees cheat a little at work : How a Lot of Employees Cheat a Little at Work. Take your inspiration from Dan Ariely's Ted Talk, "Our Buggy Moral Code" and concepts from Chapters 1-4 to create a Slideshare about unethical workplace behavior. You may focus on one or several uneth..
Name two of the computer components and their functions : Use two resources (Wikipedia sources are not permitted) and list each resource used at the end of paper in the reference list section.
Create an object-oriented application to handle inventory : Working at the GMU Used Car Dealership, you need to create an object-oriented application to handle inventory. To start, you create a detailed UML diagram that helps to plan your solution.
Design a gui class that should be hand-coded : The program should consist of three classes. The first class should define the GUI and should be hand-coded and not generated by a GUI generator.
How does policy impact the discussion to disclose a breach : What does the current law say about companies having to release information / statements on a security breach?
Describe some important sources of conflict : In an essay, describe some important sources of conflict and the effects they can have on team performance. Then explain what you would do as a team leader to manage conflict in order to help your team achieve its goals
Problem regarding the negative exponential distribution : Suppose that the life expectancy X of each member of a certain group of people is an r.v. having the Negative Exponential distribution with parameter l = 1/50 (years). For an individual from the group in question, compute the probability that
Describe the general characteristics of oligopolies : Describe the general characteristics of oligopolies. Describe the economic characteristics unique to the airlines

Reviews

Write a Review

Programming Languages Questions & Answers

  Poduce an html form with a textarea, text boxes n button

Produce an HTML form with a textarea, 5 text boxes and a button.Invite the user to type 10 or more characters in the textarea and then click the button.

  Write function that produces a stream prime numbers

Write a function that produces a stream of positive prime numbers . Use that stream to create a list of the product of all pairs of consecutive prime numbers up to a given value.

  Program to calculate area of two-dimensional shape

Implement the Shape hierarchy shown in following figure. Each TwoDimensionalShape should contain method getArea to calculate the area of the two-dimensional shape.

  Abebooks is an online bookseller it carries a

abebooks is an online bookseller. it carries a product-specific amount of safety stock for each of its products. the

  Write computer code to compute determinant of matrix

Write computer code to compute the determinant of matrix for all n between 2 and 9. Use factoriadic numbers to create all permutations.

  Create visual basic windows application

Create Visual Basic Windows application. Use following names for solution and project, respectively: Raise Solution and Raise Project.

  What are the consequences of not citing computer programs

Review the document on code citation and documentation guidelines in the Course Materials section of your student Web site and the Avoiding Plagiarism tutorial available on your student Web site. Discuss the issues of proper citation as they apply..

  Create classes for account and savingsaccount

Create and write three classes - Account, CheckingAccount, and SavingsAccount. Have CheckingAccount and SavingsAccount inherit from Account.

  Write program to enter number of packages purchased

Write a program that asks the user to enter the number of packages purchased.The program should then display the amount of the discount.

  Write program to merge two files that contain polynomials

Write a program that merges two files that contain polynomials. To merge two files, the input files must be in sorted order.

  Create security code program-display digit-ascii character

You have been hired to create the security code program. Program must permit user to enter message, one character at a time.

  Designing the site links

Company needs to be able to schedule the time of day when the connections are available for replication. Replication should not occur during peak business hours. When designing the site links, which of the following options should you use?

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