Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

About java programing - someone can write program? Consider a class that keeps track of the sales of an item. An object of this class

About java programing - someone can write program?

Consider a class that keeps track of the sales of an item. An object of this class will have the attributes

Number sold

Total sales

Total discounts

Cost per item

Bulk quantity

Bulk discount percentage 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, the total sales, and total discount.

a. Implement the class in Java.

b. Test your class with user given inputs.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

What are the disadvantages of using a client/server approach?

Answered: 1 week ago

Question

How significant is this initiative/project to the company?

Answered: 1 week ago

Question

What are the weaknesses of each one?

Answered: 1 week ago

Question

What are the consequences of each one?

Answered: 1 week ago

Question

How can you be sure that it does not meet the criteria?

Answered: 1 week ago