Chapter 8: Problem 4
(Rectangle Class) Create a class Rectangle. The class has attributes length and width, each of which defaults to \(1 .\) It has methods that calculate the perimeter and the area of the rectangle. It has set and get methods for both Tength and width. The set methods should verify that 7 ength and width are each floating-point numbers larger than 0.0 and less than \(20.0 .\) Write a program to test class Rectangle.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.