Find Jobs
Hire Freelancers

Customer template

$30-60 USD

Imekamilika
Imechapishwa over 19 years ago

$30-60 USD

Kulipwa wakati wa kufikishwa
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
Kitambulisho cha mradi: 3428047

Kuhusu mradi

7 mapendekezo
Mradi wa mbali
Inatumika 20 yrs ago

Unatafuta kupata pesa?

Faida za kutoa zabuni kwenye Freelancer

Weka bajeti yako na muda uliopangwa
Pata malipo kwa kazi yako
Eleza pendekezo lako
Ni bure kujiandikisha na kutoa zabuni kwa kazi
Imetolewa kwa:
Picha ya Mtumiaji
See private message.
$21.24 USD ndani ya siku 4
5.0 (4 hakiki)
1.8
1.8
7 wafanyakazi huru wana zabuni kwa wastani $33 USD kwa kazi hii
Picha ya Mtumiaji
See private message.
$51 USD ndani ya siku 4
5.0 (4 hakiki)
4.1
4.1
Picha ya Mtumiaji
See private message.
$42.50 USD ndani ya siku 4
3.3 (8 hakiki)
4.3
4.3
Picha ya Mtumiaji
See private message.
$25 USD ndani ya siku 4
4.9 (3 hakiki)
2.3
2.3
Picha ya Mtumiaji
See private message.
$29.75 USD ndani ya siku 4
5.0 (4 hakiki)
1.7
1.7
Picha ya Mtumiaji
See private message.
$34 USD ndani ya siku 4
5.0 (3 hakiki)
1.3
1.3
Picha ya Mtumiaji
See private message.
$25.50 USD ndani ya siku 4
0.0 (0 hakiki)
0.0
0.0

Kuhusu mteja

Bedera ya UNITED STATES
United States
5.0
3
Mwanachama tangu Nov 11, 2004

Uthibitishaji wa Mteja

Asante! Tumekutumia kiungo cha kudai mkopo wako bila malipo kwa barua pepe.
Hitilafu fulani imetokea wakati wa kutuma barua pepe yako. Tafadhali jaribu tena.
Watumiaji Waliosajiliwa Jumla ya Kazi Zilizochapishwa
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Onyesho la kukagua linapakia
Ruhusa imetolewa kwa Uwekaji wa Kijiografia.
Muda wako wa kuingia umeisha na umetoka nje. Tafadhali ingia tena.