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.
Problem 11
Write an enum type TrafficLight, whose constants (RED, GREEN, YELLOW) take one parameter - the duration of the light. Write a program to test the TrafficLight enum so that it displays the enum constants and their durations.