Data structure Idle 3.6

Use python idle 3.6 please 

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

  

Create a class called Rectangle to represent a rectangle. The class should contain:

· Two fields named width and height.

· A constructor that creates a rectangle with the specified width and height. The default values are 1 and 2 for width and height, respectively.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

· The accessor and mutator methods for width and height.

· A method named getArea() that returns the area of the rectangle.

· A method named getPerimeter() that returns the perimeter of the rectangle.

Once you have completed the class, write a program to test it. Be sure to test all methods in the class as well as test the default settings.

   

Still stressed with your coursework?
Get quality coursework help from an expert!