[solved]-Write Class Called Rectangle Represents Rectangular Two Dimensional Region Rectangle Objec Q39000989
Write a class called Rectangle that represents a rectangulartwo-dimensional region. Your Rectangle objects should have thefollowing fields: int width and height int x and y (top-left corneris specified by the given coordinates) And the following getmethods: public int getHeight() Returns the Rectangle’s height.public int getWidth() Returns the Rectangle’s width. public intgetX() Returns the Rectangle’s x-coordinate. public int getY()Returns this Rectangle’s y-coordinate. public int getArea() Returnsthis Rectangle’s area Also write the corresponding set methods:public void setHeight(int h) Sets height to h public voidsetWidth(int w) Sets height to w public void setX(int xcord) Sets xto xcord public void setY(int ycord) Sets y to ycord Also write asmall client program to test the methods of the class (i.e. use theclient program to create a rectangle object from this class, andcall the methods setHeight(),getHeight(), setWidth, getWidth()…etc.
Expert Answer
Answer to Write a class called Rectangle that represents a rectangular two-dimensional region. Your Rectangle objects should have … . . .
OR

