Page 1 of 1

Create three constructors in java for these 3 classes: class called Boat: - has a private instance variable called priva

Posted: Tue Jul 12, 2022 8:04 am
by answerhappygod
Create three constructors in java for these 3 classes:
class called Boat:
- has a private instance variable called private boat[] which isan array that stores 4 tiles
- takes an array of strings of size 4, with each stringrepresenting a turbine (called blue turbine, red turbine, greenturbine, yellow turbine).
- the array boat[] , each of the turbine objects should bepassed one of the tires from the array of strings
class called Turbine:
- has one instance variable called private Stringturbine
- will take a string 'turbine', representing the colour ofturbine on that boat
class called Sail:
- has one instance variable called private Stringmodel
- also takes a string 'turbine' and sets its instance variable'turbine' to that parameter
please make all three constructors!