Computers and Technology

copy the files accountdriver. java (code listing 10.1) and bankaccount. java(code listing 10.2) from the student cd or as directed by your instructor. bankaccount. java is complete and will not need to be modified.

create a new class called checkingaccount that extends bankaccount.

it should contain a static constant fee that represents the cost of clearing one

check. set it equal to 15 cents.

write a constructor that takes a name and an initial amount as parameters. it

should call the constructor for the superclass. it should initializeaccountnumber to be the current value in accountnumber concatenated with –10 (all checking accounts at this bank are identified by the extension –10). there can be only one checking account for each account number. remember since accountnumber is a private member in bankaccount, it must be changed through a mutator method.

write a new instance method, withdraw, that overrides the withdraw method in the superclass. this method should take the amount to withdraw, add to it the fee for check clearing, and call the withdraw method from the superclass. remember that to override the method, it must have the same method heading. notice that the withdraw method from the superclass returns true or falsedepending if it was able to complete the withdrawal or not. the method that overrides it must also return the same true or false that was returned from the call to the withdraw method from the superclass.

compile and debug this class.

task #2 creating a second subclass

create a new class called savingsaccount that extends bankaccount.

it should contain an instance variable called rate that represents the annual

interest rate. set it equal to 2.5%.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:00, vane1161
Aletter or menu command that starts an action when the user presses the designated letter and the alt key together is called what?
Answers: 1
image
Computers and Technology, 22.06.2019 21:30, sunshinekisses
After you clean an engine with hot water spray, it seems to stall; when it doesn't stall, it's idling noisily. technician a says to check for loose bolts on the flex plate near the torque converter. technician b says to wipe down the spark plug wires and the distributor cap. who is correct? a. technician a b. both technicians a and b c. technician b
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, nsjcbdhcb
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
image
Computers and Technology, 23.06.2019 10:00, austintules2005
Whats three fourths of 15(this is supposed to be in math but i clicked too fast)
Answers: 1
Do you know the correct answer?
copy the files accountdriver. java (code listing 10.1) and bankaccount. java(code listing 10.2) from...

Questions in other subjects:

Konu
Mathematics, 12.07.2019 16:00
Konu
Mathematics, 12.07.2019 16:00
Konu
Mathematics, 12.07.2019 16:00