Question
Help to complete this questions! Language: Java Assume you have written a class called 'Fan' with a constructor that has one parameter for the radius
Help to complete this questions!
Language: Java
Assume you have written a class called 'Fan' with a constructor that has one parameter for the radius of the fan. Write a complete statement that declares an object variable (reference variable) named 'fan1' of the Fan type and instantiates the Fan object with a radius of 12.
Use proper spacing per the course style guide. Do not include additional spaces at the beginning or end.
________________________________________
Assume you have written a class named 'Fan' with a primitive integer private field (instance variable) named 'speed'. Fill in the blank to complete the getter for this field. This method should be available to any calling method and should be named using standard Java conventions.
______________{
return speed;
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started