Question: please kindly provide object oriented java code A hydrofoil is a lifting surface, or foil, that operates in water. They are similar in appearance and

please kindly provide object oriented java code A hydrofoil is a liftingsurface, or foil, that operates in water. They are similar in appearanceplease kindly provide object oriented java code

A hydrofoil is a lifting surface, or foil, that operates in water. They are similar in appearance and purpose to airfoils used by airplanes. Boats that use hydrofoil technology are also simply termed hydrofoils. As a hydrofoil craft gains speed, the hydrofoils lift the boat's hull out of the water, decreasing drag and allowing greater speeds. Write a class named hydrofoils that has the following fields. MANUFACTURER - The manufacturer field references a string object that holds the manufacturer of the hydrofoil. NAME - The name field references a String object that holds the name of the hydrofoil. YEAR_MADE- The year made field is an int that holds the manufacturing year when the hydrofoils were made. SPEED - The speed field is an int that holds the current speed of the hydrofoil. In addition, the class should have the following constructor and other methods. Constructor - The constructor should accept the hydrofoil's manufacturer, name, year made and initial speed as arguments. These values should be assigned to the object's manufacturer, name, and yearumade fields. The constructor should also assign a chosen initial speed to the speed field. Accessors and Mutators - Appropriate accessor and mutator methods should get and set the values stored in an object's manufacturer, name, seal made and speed fields. The accelerate method - The accelerate method should add 10 to the speed field each time it is called. The decelerate method - The decelerate method should subtract 5 from the speed field each time it is called The checklift method - The checklit check the current speed of the hydrofoil to determine whether the hull is in the water or lifted out of the water. Demonstrate the class in a program that creates these two hydrofoil objects: 1. Name: Freedom Manufacturer: Lockheed Year Made: 2008 Initial Speed (knots): 13 2. Name: Independence Manufacturer: General Dynamics Year Made: 2010 Initial Speed (knots): 12 Once the hydrofoils are created display their details and then call the accelerate method five times for each object. After each call to the accelerate method, get the current speed of the hydrofoils, and display it. Then call the decelerate method five times. After each call to the decelerate method, get the current speed of the hydrofoil, and display it. At the end of the test run, determine whether the hydrofoil hull is in the water of lifted above it. Assume that the minimum speed to lift the boat's hull out of the water is at least 30 knots. Here is a sample run

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!