Question: 2, (10 points) Given the Python class below, pertorm the folloving tasks: a. Name all mutator methods b. Give the output e. Give code to

 2, (10 points) Given the Python class below, pertorm the folloving

2, (10 points) Given the Python class below, pertorm the folloving tasks: a. Name all mutator methods b. Give the output e. Give code to create a sibling class to Rectangle named RightTriangle d. Give code to create a RightTriangle, RT, class Shape: def init_(self, width, height): self.w- width self,h = height def setwidth(self, width): self.w-width def setHeight (self, height): self.h- height class Rectangle (Shape): def name (self): return "rectangle" def area (self): return (self.w self.h) def main): r Rectangle (3, 6) r.setwidth (4) print ('The 'r.name ()+has an area of str(r.area())+ '.' main()

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!