Question: Help with completing these questions! Language: Java Assume you have written a class called 'Fan' and instantiated it in the main class with an object
Help with completing these questions!
Language: Java
Assume you have written a class called 'Fan' and instantiated it in the main class with an object variable (reference variable) named 'fan1'. Fan has a getter named 'getRadius' that has no parameters and returns the value of the primitive integer field 'radius'. Write a complete statement that gets the value of the radius and stores it in a new variable named 'fanRadius'.
Use proper spacing per the course style guide. Do not include additional spaces at the beginning or end.
_______________________________________
Assume you have written a class called 'Fan' and instantiated it in the main class with an object variable (reference variable) named 'fan1'. Fan has an instance method named 'powerOn' which takes a boolean as the only argument and returns nothing. Write a complete statement to turn fan1 on.
Use proper spacing per the course style guide. Do not include additional spaces at the beginning or end.
________________________________________
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
