Question: Write a java program for your friend who works at the superstore is urgently in need of your help with some basic sales records. Consider

Write a java program for your friend who works at the superstore is urgently in need of your help with some basic sales records. Consider a class Sales that keeps track of the sales of one item in the store. An object of this class will have the attributes Name of the item Cost of the item - Bulk quantity (to qualify for discount) - Discount (percentage) - Number sold - Total amount Total discount and the following methods - Constructor that sets the cost, bulk quantity and the discount -Get and set methods for cost, bulk quantity and discount registerSale lint n) records the sale of n items. If n is larger than the bulk quantity, the cost will be reduced by the discount displaySales displays the name of the item, number sold, the total amount, and total discount. lgnore sales tax. Implement the class and test it. For example, for Item: Shampoo Cost: 2.50 Bulk quantity (to qualify for discount): 4 Discount: 10 percent Number sold: 10 The output would be Shampoo Number sold: 10 Total amount: $ 22.50 Total discount: $ 2.50 Example Item: Toothpaste Cost: 1.99 Bulk quantity: 20 Discount: 15 Number sold: 10 The output would be Toothpaste Number sold: 10 Total amount: 19.90 Total discount: 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
