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, 21.06.2019 23:30
4.11 painting a wall (1) prompt the user to input integers for a wall's height and width. calculate and output the wall's area (integer). note that in this case there is a new line after each prompt. (submit for 1 point). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet (2) extend to also calculate and output the amount of paint in gallons needed to paint the wall (floating point). assume a gallon of paint covers 350 square feet. store this value in a variable. output the amount of paint needed using the %f conversion specifier. (submit for 2 points, so 3 points total). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet paint needed: 0.471429 gallons (3) extend to also calculate and output the number of 1 gallon cans needed to paint the wall. hint: use a math function to round up to the nearest gallon. (submit for 2 points, so 5 points total). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet paint needed: 0.471429 gallons
Answers: 3
question
Computers and Technology, 22.06.2019 04:00
Which spereadsheet type will determine how well a bussiness has done over the past year
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
The graph shows median weekly earnings for full-time workers according to education level. which can you not conclude?
Answers: 2
question
Computers and Technology, 22.06.2019 23:20
How can you tell if someone sent you a text message to your email instead of a email
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, 28.06.2019 09:30
question
Mathematics, 28.06.2019 09:30
question
Mathematics, 28.06.2019 09:30
question
Mathematics, 28.06.2019 09:30
Questions on the website: 13722361