Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions