So there are 3 circle constructors. What does a constructor of overloaded one(th
ID: 3773464 • Letter: S
Question
So there are 3 circle constructors.
What does a constructor of overloaded one(the one that has 3 parameters) does? and what does a empty parametor one does?
I am confused which one does what.
Explanation / Answer
What does a constructor of overloaded one(the one that has 3 parameters) does? and what does a empty parametor one does?
1. Constructor overloaded with 3 parameters:
This function takes a total of 3 parameters: double radius, String color, boolean filled.
The variable radius is assigned to the class private variable, radius.
The variable color is set to the variable color, using the mutator setColor() of the parent class SimpleGeometricObject.
The variable filled is set to the variable filled, using the mutator setFilled() of the parent class again.
The default constructor will set the radius to 0.0, color to white, and filled to false.
If you need any further clarifications, just get back to me.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.