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

  Create default constructor which invokes superclass

Create a (default) constructor which invokes superclass constructor with value 3 (law school is typically a three year program).

  Import the data in excel to the table in access.

There are 6 tables in Access (Contacts, Customer, Orders, Products, SalesRep and Territories) and I also created 6 sheets in Excel for the data for table

  Write program to caculate value of user-s stock

Write a program which caculates value of user's holding of a particular stock. Program asks for number of shares held, whole ¬dollar portion of price for one share, also the fraction portion.

  Create an example of a nested if structure

Create an example of a nested IF structure and build it into a small project. Compile and execute the program, and discuss any challenges you encountered. Post the code of the program

  Calculate the difference between the number and the average

Write a program that will input an array of 10 REAL4 numbers into an array, and that will calculate the average value of the array and the standard deviation.

  Modify the inventory program to include an add button

Modify the Inventory Program to include an add button, a delete button, and a modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each ..

  Program to calculate sum of squares using for loop

Given int variables k and total that have already been declared, use for loop to calculate sum of squares of first 50 counting numbers, and store this value in total.

  Calculate the average of the 5 grades passed and display

Calculate the average of the 5 grades passed in and display the average with 1 decimal place and also display the letter grade.

  Threads belonging to same process affected by page fault

Other user user threads belonging to the same process also be affected by the page fault - that is would they also have to wait for the faulting page to be brought into memory? Explain.

  Do comments explain processing that is not obvious

When reviewing a program, these are the four criteria for style: Do identifiers logically describe use? Is indentation used correctly to illustrate the structure of the program?

  Accuracy and completeness of computations

Analysis right and you have to develop a plausible argument to "prove" that your analysis is correct

  Create xml document to mark nutrition facts for cookies

Create an XML document that marks up the nutrition facts for a package of Grandma White's cookies. A package of cookies has a serving size of 1 package and the following nutritional value per serving.

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