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 12:30
What characteristic of long period comets suggest they come directly from the oort cloud?
Answers: 2
question
Computers and Technology, 22.06.2019 21:10
Dameas communication challenge is due to which factor
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Ramona enjoys her job because she is able to kids in an after school program. the work value ramona feels strongest about is a. leadership b. risk c. independence d. work with people select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
How do you share someone else’s tweet with your own twitter followers?
Answers: 1
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
Social Studies, 19.05.2020 03:05
question
Mathematics, 19.05.2020 03:05
question
Mathematics, 19.05.2020 03:05