subject

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%.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, blackjack73
3. (6 pts) internally in the computer, with few exceptions, all numerical computation is done using binary numbers. output, however, often uses ascii, which is formed by appending 011 to the left of a bcd code. thus, an algorithm that directly converts a binary integer to a bcd integer is very useful. here is one such algorithm 1) draw lines to the left of the binary number to bound the expected bcd decades. (each decade is a group of 4 bits.) move the binary number one bit to the left. add 0011 to each bcd decade containing a binary value> 0100 repeat steps 2-3 until the last bit in the binary number has been moved into the least significant decade position. (note that when the last bit has been shifted into bcd decade, step 3 is not repeated.) read the bcd result. 2) 3) 4) 5) a) execute the algorithm for the binary number 1101101 b) execute the algorithm for the binary number 01110101110 4. (4 pts) represent the decimal number 3568 in bcd; excess-3 code; ascil; and hex.
Answers: 1
image
Computers and Technology, 22.06.2019 19:00, detrickboucicaut
The fourth generation of computers emerged between 1970s and 1980s. which technological advancement brought about this generation of computers? which computer architecture was used most in this generation?
Answers: 3
image
Computers and Technology, 23.06.2019 08:30, mai1261
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
image
Computers and Technology, 23.06.2019 15:00, MalikaJones
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
Answers: 3
You know the right answer?
copy the files accountdriver. java (code listing 10.1) and bankaccount. java(code listing 10.2) from...

Questions in other subjects:

Konu
Mathematics, 17.10.2020 04:01