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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started