Question: Please answer and write comment in this ... thank you 1. Consider a class that keeps track of the sales of an item. An object

Please answer and write comment in this ... thank you

Please answer and write comment in this ... thank you 1. Consider

1. 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 and the following methods: displaySales displays the number sold, the total sales, and total discount a. Implement the class in Java. b. Write some Java statements that test the class. 2. Consider a class MotorBoat that represents motorboats. A motorboat has attributes for The capacity of the fuel tank The amount of fuel in the tank The maximum speed of the boat The current speed of the boat The efficiency of the boat's motor The distance traveled The class has methods to Change the speed of the boat Refuel the boat with some amount of fuel If the boat has efficiency e, the amount of fuel used when traveling at a speed s for time t is ex sa x t. The distance traveled in that time is $xt. a. Implement the class in Java. b. Write some Java statements that test the class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!