Task #1: Extending BankAccount 1. Copy the files AccountDriver.java (code listing 11.1) and BankAccount.java (code listing 11.2) from www.aw.com/cssupport or as directed by your instructor. BankAccount.java is complete and will not need to be modified. 2. Create a new class called CheckingAccount that extends BankAccount. 3. It should contain a static constant FEE that represents the cost of clearing one check. Set it equal to 15 cents. 4. Write a constructor that takes a name and an initial amount as parameters. It should call the constructor for the superclass. It should initialize accountNumber to be the current value in accountNumber concatenated with...
Added by Nerea W.
Step 1
java and BankAccount.java from the given source. Show more…
Show all steps
Your feedback will help us improve your experience
Gokul R Nair and 50 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
thoughtful
Christian O.
Write a program with four methods for calculating the cost of a yearly auto service visit. The methods will be titled yearlyService. - yearlyService(no parameters) - Will return the standard service charge. - yearlyService(one parameter) - Will return the standard service charge with an added oil change fee. - yearlyService(two parameters) - Will return the standard service charge with an added oil change fee and a tire rotation charge. - yearlyService(three parameters) - Will return the standard service charge with an added oil change fee, a tire rotation charge, along with a coupon amount that will be deducted from the total cost. Write a main method that will test each of these methods two times.
Aarya B.
Run the app displayed for the av. Exercise 2-3 100 Enter subtotal: 10.0 Discount amount: 90.0 Invoice total: Continue? (y/n): y 500 Enter subtotal: Discount amount: 125.0 Invoice total: 375.0 Continue? (y/n): n Number of invoices: 2 Average invoice: 232.5 Average discount: 67.5 Open the project named ch02_ex3_Invoice that's in the ex_starts directory. Then, open the file named InvoiceApp.java. 2. Modify the code so the application ends only when the user enters "n" or "N". As it is now, the application ends when the user enters anything other than "y" or "Y". To do this, you need to use a not operator (!) with the equalsIgnoreCase() method. Then, test this change. 3. Modify the code so it provides a discount of 25 percent when the subtotal is greater than or equal to 500. Then, test this change. 4. Modify the code so it displays the number of invoices, the average invoice amount, and the average discount amount when the user ends the program. Then, test this change. Code: Change any comments that are no longer accurate.
Supreeta N.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD