Question: Create a Rectangle class that models a Rectangle. It should have integer length and width attributes. The Rectangle class should also be able to draw

Create a Rectangle class that models a Rectangle. It should have integer length and width attributes. The Rectangle class should also be able to draw a rectangle on the standard output device, using a single character that is specified by the user, and should compute the area and perimeter of rectangles. Valid values for length and width are integers in the range 1-30.

Include appropriate get and set methods, and other methods that may be required to adequately model rectangles.

Create a program called TestRectangle that tests the methods in the Rectangle class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!