/* This class demonstrates a class that imports and uses the Boat class. The Boat class was edited to be compatible with this class. The Boat class is stored in a folder called Vehicle. That folder and this program are in the same parent folder. This program demonstrates an array of objects. We create and populate an array of Boat objects and call the printBoat method for the objects. */ import java.util.Scanner; import Vehicle.Boat; class ManyBoats { public static void main(String [] args) { int numBoats = 5; //The number of boats is being hardcoded here instead of being read in from the user. Scanner in = new Scanner (System.in); //temporary variables to read in values from the user to initialize the objects. String boatName; int boatLength; boolean boatHasSails; double boatEngine; boolean boatFloorIt; //declare an array of objects. This only creates an array of references. Boat [] boatArray = new Boat[numBoats]; //now, we need to create each object in the array separately. for(int i=0;i