Question: Question 2 5 Marks The following codes define a Java class Rectangle with data members length, width and suitable methods to set/get data members, as



Question 2 5 Marks The following codes define a Java class Rectangle with data members length, width and suitable methods to set/get data members, as well as a method to calculate the area. public class Rectangle private int length private int width; public Rectangle ( length-O width-0 public void setLength (int 1) length-li public void setWidth (int w width=w; publie int getiength 0 return length Question 2 continued over next page
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
