Question: HOMEWORK Rectangle Class Length Width Area(Length, Width) 1- Given a class called rectangle, the class contains: 2 public instance variables: length(of the type double) and
HOMEWORK Rectangle Class Length Width Area(Length, Width) 1- Given a class called rectangle, the class contains: 2 public instance variables: length(of the type double) and width (of the type double). A method that calculate the area of a rectangle = length * width. 2- Given a class , called average, the class contains: Three public instance variables: X,Y,Z (of the type float) A method to print the result of the following operation: sum = x + y + z average = sum /3 Average Class Y Z AVG(X,Y,Z) 17)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
