subject

Bank accounts

look at the account class account. java and write a main method in a different class to briefly experiment with some instances of the account class.

• using the account class as a base class, write two derived classes called savingsaccount and checkingaccount. a savingsaccount object, in addition to the attributes of an account object, should have an interest variable and a method which adds interest to the account. a checkingaccount object, in addition to the attributes of an account object, should have an overdraft limit variable. ensure that you have overridden methods of the account class as necessary in both derived classes.

• now create a bank class, an object of which contains an array of account objects. accounts in the array could be instances of the account class, the savingsaccount class, or the checkingaccount class. create some test accounts (some of each type).

• the bank class requires a method for opening accounts, and to deposit and withdraw from accounts specified by their account number. account numbers are generated sequentially starting with 101.

hints:

• note that the balance of an account may only be modified through the deposit(double) and withdraw(double) methods.

• the account class should not need to be modified at all. • be sure to test what you have done after each step.

• use bankdemo. java to test your code.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
If your accelerator suddenly gets stuck what should you do
Answers: 2
question
Computers and Technology, 22.06.2019 19:20
Write a program that prompts the user to input a string. the program then uses the function substr to remove all the vowels from the string. for example, if str = "there", then after removing all the vowels, str = "thr". after removing all the vowels, output the string. your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
Answers: 2
question
Computers and Technology, 23.06.2019 12:30
What is the difference between the internet and the world wide web?
Answers: 1
question
Computers and Technology, 24.06.2019 23:00
People should never use telepresence when virtually meeting with a group of co-workers. true false
Answers: 1
You know the right answer?
Bank accounts

look at the account class account. java and write a main method in a diff...
Questions
question
SAT, 18.03.2021 02:40
question
Mathematics, 18.03.2021 02:40
question
Mathematics, 18.03.2021 02:40
question
Mathematics, 18.03.2021 02:40