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 11:30
Awell-diversified portfolio needs about 20-25 stocks from different categories.
Answers: 2
question
Computers and Technology, 22.06.2019 15:10
Which activity should be part of a long-term plan to positively affect yourhealth? oa. wearing regular clothing when handling toxinsob. not worrying about secondhand smokeoc. avoiding excessive exposure to sunlightod. drinking only well water
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
question
Computers and Technology, 23.06.2019 19:40
Use a physical stopwatch to record the length of time it takes to run the program. calculate the difference obtained by calls to the method system.currenttimemillis() just before the start of the algorithm and just after the end of the algorithm. calculate the difference obtained by calls to the method system.currenttimemillis() at the start of the program and at the end of the program so that the elapsed time includes the display of the result. use the value returned by the method system.currenttimemillis() just after the end of the algorithm as the elapsed time.
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, 10.03.2021 23:50
question
Mathematics, 10.03.2021 23:50
question
English, 10.03.2021 23:50
question
Physics, 10.03.2021 23:50
question
Mathematics, 10.03.2021 23:50
Questions on the website: 13722363