Create a class named **[login to view URL]** that is the template that will handle sales for the online book sales company named PhinneyBooks.com. You will be given the amount of the sale, any sale discount applicable will be subtracted, the tax is then added to the net sale amount, and a running total of all sales is kept.
For class **[login to view URL]:**
· Use a static variable that stores the **taxRate** that is used for all sales that are taxable.
· Use another static variable that stores the **saleRate** that is used to identify the sale discount rate.
· Each object of the **Customer** class has private instance variables for **customerName**, **listSaleAmount, saleDiscount, netSaleAmount, taxAmount**, **saleTotal,** and **taxable. Taxable** is a boolean variable that stores whether or not the customer pays taxes on their purchases. When books are purchased for re-sale, tax is not charged. A value of true for taxable means that the purchase is taxable; false means not taxable.
· A constructor for the class accepts and initializes the **customerName** and the value for **taxable**.
· The method called **calculateTax** accepts the **listSaleAmount** for the sale. If a sale is in progress, the **saleDiscount** is calculated, otherwise the **saleDiscount** is set to zero. The **netSaleAmount** is then calculated. If tax is to be charged, the calculation of the **taxAmount** is made, otherwise the **taxAmount** is set at zero. The **saleTotal** is calculated and returned from this method.
*continue*
## Deliverables
· Another method called **printRecord** returns a string with the **customerName, listSaleAmount, discountAmount, netSaleAmount, taxAmount,** and **saleTotal** for a record on separate lines. All currency fields are properly formatted, to include $ sign.
· A static method, **changeTaxAmount**, is sent the new tax amount and sets the tax to the new value.
· A static method, **changeSaleRate**, is sent the new sale rate and sets the rate to the new value.
· A static method, **printTaxRate**, returns a string with the tax rate in per cent (i.e., 05.55%).
· A static method, **printSaleRate**, returns a string with the sale rate in per cent (i.e., 05.55%).
Write a driver program named **[login to view URL]** to test the **Customer** class.
· Instantiate two **Customer** objects with this data:
· **customer1**is an instance of the **Customer** class. Initialize customer1 with data for Annie Smith who purchases book for personal reading and does pay tax.
· **customer2**is also an instance of the **Customer** class. Initialize customer2 with data for Bob Wilson who purchases books for re-sale and therefore does not pay tax.
· Declare a variable for the totalOfAllSales that will be used to keep a running total of all sales made.
Access the changeTaxAmount method to set the initial tax rate to be 8.25%. Access the printTaxRate method to add a line to the output.
Access the changeSaleRate method to set the initial discount to 0.00%.
Access the printSaleRate method to add a line to the output.
Annie Smith orders $65.00 worth of books. Bob Wilson purchases $52.00 worth of books.
Access the **calculateTax** method for each sale in order to calculate the net sale amount, tax, and sale total. Add each sale total into the **totalOfAllSales.**
Access the **printRecord** method for each sale in order to send a record of the sale to the output.
Access the **changeTaxAmount** method to change the tax rate to 8.5% because the county has increased their portion of the tax rate.
Access the **printTaxRate** method to add a line to the output.
Access the **changeSaleRate** method to change the sale discount to 7.5%, because we have too many books and need to move our inventory.
Access the **printSaleRate** method to add a line to the output.
Annie Smith makes a second purchase of $84.00. Calculate the tax for this sale and add the total into the **totalOfAllSales**.
Bob Wilson makes his second purchase and it’s for $105.00. Calculate the tax and add the total into the **totalOfAllSales**.
Access the **printRecord** method for this sale.
Add the overall total of sales, with a title, to the output.
Turn in a printout of all output produced and your two source code program listings, one for [login to view URL] and one for TestCustomer.java.
## Platform
that's all