subject

Consider a class that keeps track of sales of an item. An object of this class will have the following attribute. Number sold Total sales Total discounts Cost per item Bulk quantity Bulk discount percentage/amount and the following methods registerSale(n) records the sale of n items. If n is larger than the bulk quantity, the cost per item will be reduced by the bulk discount. displaySales displays the number sold, total sales and total discount. a. Implement the class in Java
b. Write some java statements that test the class.

Define a method initialize inside the class to initialize the item cost, bulk quantity and bulk discount(if items are ordered in bulk). For example, Let us say customer is purchasing laptops.

1. You initialize the cost of each item with $500 and a discount of $100 is applied for every 10 laptops ordered.
2. Register the sale of 20 items and check for bulk discount
3. Your total order will be $8000 with a discount of $2000

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
The two main ways in which marketers address the competition with their strategies are by satisfying a need better than a competition and by
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
When is it appropriate to use an absolute reference
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
question
Computers and Technology, 23.06.2019 00:50
Representa os dados de um banco de dados como uma coleç? o de tabelas constituídas por um conjunto de atributos, que definem as propriedades ou características relevantes da entidade que representam. marque a alternativa que representa o modelo descrito no enunciado. escolha uma:
Answers: 3
You know the right answer?
Consider a class that keeps track of sales of an item. An object of this class will have the followi...
Questions
question
Mathematics, 12.03.2021 23:30
question
Mathematics, 12.03.2021 23:30
Questions on the website: 13722359