Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 classStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started