Problem
price(int)
methods
Create a method setPrice which is an abstract method. Save the file as Vehicle.java.
2. Create a class Sailboat by extending the abstract class Vehicle. Include a data field length (int). Create a constructor. The constructor has no parameters and calls two methods. The first method call is to the parent constructor. It has two actual parameters: "wind" and 0. The second method, setLength, has no parameters. Create a get method that returns the value of the data field. Create a set method that assigns a value to the length field. Use the method JOptionPane.showInputDialog to take inputs from the user. Save the file as Sailboat.java.
Create a class Bicycle by extending the abstract class Vehicle. Create a constructor. The constructor has no parameters and calls its parent constructor. The first method call is to the parent constructor. It has two actual parameters: "a person" and 2. Create a get method that returns the value of the data field. Create a set method that assigns a value to the length field. Use the method JOptionPane.showInputDialog to take inputs from the user. Save the file as Bicycle.java.