Question: Create 4 Dock objects: 1 ) Call the no argument constructor and then display the current state of the object. 2 ) Call the 3

Create 4 Dock objects:
1) Call the no argument constructor and then display the current state of the object.
2) Call the 3 argument constructor that accepts 2 strings and 1 boolean type variable. Set a new value for water and then display the current state of the object.
3) Call the 3 argument constructor that accepts 1 string and 2 boolean type variables. Set a new value for the location and display the current state of the object.
4) Call the 2 argument constructor. Set a new value for the location and electricity and display the current state of the object.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!