if
block must be utilized in the
toString
method as specified in the textbook so that it returns
speed, radius and color when
the variable on equals true
and radius,
color and the message "Fan is off" when the variable on
equals false
as per the image of the terminal window output below:
( This is the partial credit assignment--the maximum grade for completing this assignment is 9 out of ten (10) points )
if
statement within the set
method for the instance variable speed
if
validation in the set
methods so that instance variable n is always 3 or greater
and instance variable side is always 1 or greater; from
the Math
class of the java.lang
package of the Java
API use the Math.PI
constant and the Math.tan(double)
method in the calculation of the area of the polygon
(this is the full credit credit
assignment--the maximum grade for completing this assignment is 10
out of ten (10) points)this
reference when assigning
parameters to instance variables in set methods
this
reference when calling overloaded constructors as follows:this
to pass all four default values
(3 for n
(number) of sides, 1 for
side
length, 0 for x
-coordinate and
0 for y
-coordinate) to the four-argument constructor
this
to pass the two parameters for the
number of sides (n
) and length of side
, and its two default
values 0 for x
-coordinate and 0 for
y
-coordinate to the four-argument constructor
int, double, double, double
) constructor takes parameters
for the four instance variables and calls the set methods
to initialize their values
- Including a substantive comment statement that describes the class's purpose, as well as substituting your name for the existing
@author
comment and the assignment due date for the@version
comment that already exist at the top of the new class- Entering a substantive comment before each method (including the constructor) to describe its function
main()
method that includes the test operations.
main()
method