Question: Please use java do this Program 3 (50 points) For this part of the assignment, you will create two files: one that contains the definition

Please use java do this

Please use java do this Program 3 (50 points) For this part

Program 3 (50 points) For this part of the assignment, you will create two files: one that contains the definition of a MotorBoat class and one that contains the main method and tests the MotorBoat class. Here are the specifications Create a class MotorBoat with the following attributes: . The capacity of the fuel tank (measured in gallons) . The amount of fuel in the tank (measured in gallons) . The maximum speed of the boat (measured in miles per hour) . The current speed of the boat (measured in miles per hour) .The efficiency of the boat motor (measures how many gallons are needed to travel one mile) .The distance traveled (measured in miles) Your class should implement the following methods .A constructor that takes three arguments that represent a boat's tank capacity, maximum speed, and motor efficiency. All other attributes should be set to 0 Inspector methods that return the values of distance traveled, current speed, amount of fuel in the tank, maximum speed, and tank capacity .A method that allows you to refuel the boat with some amount of fuel .A method to change the speed of the boat .A method that allows you to operate the boat for an amount of time at the current speed. Keep in mind that when you operate the boat, you will travel a certain distance (distance traveled ime travel speed, and in doing so, you will consume fuel. Both of those attributes will need to be updated by this method

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!