Explain why the teller application can call the withdraw

Assignment Help JAVA Programming
Reference no: EM13809320

For this Programming activity, you will create the SavingAccount class, which inherits directly from the BankAccount class. The SavingsAccountclass inherits from the version ofthe BankAccountclass in which the balanceis declared to be private.The SavingsAccountsubclass adds an annual interestRateinstance variable,as well as supporting methods to access,change,and apply the interest rate to the account balance.

Instructions

Copy the source files in the Programming Activity 1 directory for this chap- When you have completed the six tasks,load,compile,and run the Teller application (Teller.java),which you will use to test your SavingsAccount class.When the Teller application begins,you will be prompted with a dialog box for a starting balance.Ifyou press "Enter"or the "OK"button without entering a balance, the Teller application will use the default constructor to instantiate a SavingsAccountobject.Ifyou enter a starting balance,the Teller application will prompt you for an interest rate and will instantiate a SavingsAccountobject using the overloaded constructor.Once the SavingsAccountobject has been instantiated,the Teller application will open the window shown in Figure10.10,which provides buttons you can use to call the SavingsAccountmethods to test your code. Below the buttons is a ledger that displays the current state ofthe savings account.As you click on the various buttons,the ledger will display the operation performed and the values ofthe balance and the interest rate when that operation is complete. The operations performed by each button are already coded for you and are the following:

IChange Interest Rate-prompts for a new interest rate and calls your set Interest Rate method

IApply Interest-calls your apply Interest method I Deposit-prompts for the deposit amount and calls the deposit method inherited from BankAccount I Withdraw-prompts for the withdrawal amount and calls the withdraw method inherited from BankAccount answer the following questions.

1. Explain why the Teller application can call the withdraw and deposit methods using a SavingsAccount object reference, even though we did not define these methods.

2. Explain why your applyInterest method in the SavingAccount class needs to call the deposit method of the BankAccount class.

Reference no: EM13809320

Questions Cloud

Write a gui-based program that analyzes a round of golf : Write a GUI-based program that analyzes a round of golf. You will retrieve the data for 18 holes from a text file. On each line in the file will be the par for that hole (3, 4, or 5) and your core for that hole should be displayed in a label
Write a critical essay about movie the man who was not there : Write a critical essay about the movie The Man Who Wasn't There and Tay Garnett's 1946 film noir classic The Postman Always Rings Twice.
Explanation of how assumptions of the test were met or not : Explanation of how assumptions of the test were met or not met
What is the best way to write a case study on one business i : What is the best way to write a case study on one business in the corporate scandals of 1980s and 1990s?
Explain why the teller application can call the withdraw : Explain why the Teller application can call the withdraw and deposit methods using a SavingsAccount object reference, even though we did not define these methods
Explain and discuss if the system failed to protect kristin : Was this the best way to go to protect Kristin. Do you suggest any other ways to go about it. What are your suggestions and why. Explain and discuss if the system failed to protect Kristin and if so why.
Explains the steps you will take in developing the new syste : Essay on the following: You have just graduated from Herzing University. As a result of having such wonderful credentials, you have subsequently landed a great new job in a large organization. Your new position is "Director of Knowledge Management". ..
Write a method insert at that takes an array of integers : Write a method, insertAt, that takes four parameters: an array of integers; the length of the array; an integer, say, insertItem; and an integer, say, index
Write a paper about animals do have rights : Write a paper about Animals do have rights.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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