Question: a) Create the following class using MATLAB Class name: myTrapezoid Properties: top-width, base-width, height, length Method: area, which will calculate the area of the trapezoid

a) Create the following class using MATLAB Class name: myTrapezoid Properties: top-width, base-width, height, length Method: area, which will calculate the area of the trapezoid A = 0.5*(top-width + base- width)* height volume, which will calculate the volume of the trapezoid = length* height*(top-width + base-width)/2 scale, which scale the trapezoid by a factor of n b) Using the myTrapezoid class, add the volume of two trapezoid with the following dimensions top-width = 2, base-width = 4, length = 6, height = 5 top-width = 4, base-width = 6, length = 8, height = 6 (Hint: obj.top_width = t; obj.base_width = b; obj.height = h; obj.length = 1;]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
