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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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!
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply