Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using c++ class RECTANGLE private: float Length, Width; public: RECTANGLE ( // constructor to read the values of Length and Width // compute and return

Using c++
image text in transcribed
class RECTANGLE private: float Length, Width; public: RECTANGLE ( // constructor to read the values of Length and Width // compute and return area void computeArea( float& area) void computePerimeterl floar& perimeter); //compute and return perimeter void displayAreaPer(float area, float perimeter): //display area and perimeter RECTANGLEO 0 class TRIANGLE private: float sideA, sideB, sidC; public: TRIANGLE( float SA, float sB, float sC) /initialize sideA,sideB,sideC //compute and return perimeter float computePerimeter) float computeArea( float perimeter); I/use the perimeter to calculate area void displayAreaPer(float area, perimeter); TRIANGLEO 0 class TRAPEZOID private: float lowerBase, upperBase, height; float leftSise, rightSide; public: void readData(): void computeAreaPer (float& area, float& per ): void displayAreaPer[float area, float per); Write a program to use the above declarations and create the following VO. All class members must be defined after both classes Sample I/O Enter the values of width and length of a rectangle: 7.09 12.22 Areaz xx.xx Perimeter xx.xx Enter the values of all three of a triangle: 10.75 6.33 8.11 Area xx.xx Perimeter xx.xx Enter the lowerBase, upperBase, and Height: 18.93 9.33 5.60 Enter the values of left and right sides: 7.12 6.45 Areazxx.xx Preimetere xoX.xx or triangle with sides a, b, and c e(a+b+c)/2 Area:/p(p-a)(p-b)(p-c) a For trapezoid b Area-(a-b)h/2 Perimeter- (a+dic+b

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

Identify several parties likely to be helped and hurt by inflation

Answered: 1 week ago