Question: Write a SalesTaxTester class. This will be very similar to the BankAccountTester on page 101 of your text. It will have a main. Create an

Write a SalesTaxTester class. This will be very similar to the BankAccountTester on page 101 of your text. It will have a main.

Create an object of type SalesTax using the default constructor.

Call the calculateTotal method. Use a purchase price of $50.

Print the results.

Create an object of type SalesTax and provide an argument of .08.

Call the calculateTotal method with a purchase price of $100.

Print the results.

 Write a SalesTaxTester class. This will be very similar to the

section 4/BankAccountTester.java 2 4 6 A class to test the BankAccount class. public class BankAccountTester 7 8 9 Tests the methods of the BankAccount class @param args not used 10 public static void main(String] args) 12 13 14 15 16 17 18 BankAccount harrysChecking new BankAccountO harrysChecking.deposit(2000); harrysChecking.withdraw(500) System.out.println(harrysChecking.getBalanceO); System.out.println("Expected: 1500")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!