Question: Please solve the problem 12. (30 pts) Right Triangle with Sides (Parts a - d). Let's say we need to design two classes, one Side

 Please solve the problem 12. (30 pts) Right Triangle with Sides
(Parts a - d). Let's say we need to design two classes,
Please solve the problem

12. (30 pts) Right Triangle with Sides (Parts a - d). Let's say we need to design two classes, one Side and one named RightTriangle. Each Side consists of one double precision mLength, which is stored in centimeters (cm). A RightTriangle is defined by three sides. We assume that the sides always form a RightTriangle (i.e. two of the sides form a 90-degree angte value representing will a. (7 pts) Declare the Side class based on the description abov e. There are many operations that we could define for a side, but we are only going to look at a subset for this problem. attributes/data members should be private. The class should declare the following public member operations/functions only: i. (2 pts) A constructor that specifies one arguments newlength sets it by default to o. i. (2 pts) A const function called getLength() for getting the miength. ii. (2 pts) A function called displayLength() for displaying to the screen the length of the side in the form: mlength inches. Note you need to display the length in inches! Recall, 1 inch-2.54 cm class Side public:// Should contain three prototypes/declarations Rashenal C) private: // Should contain one attributes Joublt side 3

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!