17.0k views
0 votes
Write a Java application that defines a class Boat. The Boat class should provide three fields/attributes: 1) name is a variable of type String, 2) sail position is a variable of type boolean, 3) speed is a variable of type float.

User Nirkov
by
6.8k points

1 Answer

3 votes

public class Boat {

String name;

boolean sailPosition;

float speed;

}

User Jmoneystl
by
7.5k points