Question: This program is in C++ This is the sample output: Length: 20 ft Width: 3.78 in Depth: 12 in Material: steel Name: Length: 40 ft
This program is in C++

This is the sample output:
| Length: 20 ft Width: 3.78 in Depth: 12 in Material: steel Name: Length: 40 ft Width: 4.41 in Depth: 14 in Material: Steel Name: Kevin |
In this assignment, you have to create a class and one object named beam. Beam has multiple properties such as length, width depth, and material. Width is a function of depth with the following relationship: width = 0. 315 * depth You need to write functions named setLength and setdepth for assigning the length and respectively (there must also be functions to return their values. Define getLength and getDepth functions) Material can be either "steel" or "aluminum" A new beam must be defined that consists of two original beam. For that purpose, you have to overload the operator to be able to add the beam object to each other, making a new object, then name this new beam as you wish. Finally, a function named printStats is required to display the class properties You will add some additional functionality the b to class adding additional functions and/or attributes to the files beam.cpp and beam.h. Your program must have or do the following: An additional (overloaded) constructor function that takes 2 float parameters of length and depth and sets those instead of the default values. Everything else will be the same as the default case. A new function called setDepth (float depth). Be sure to correctly set the width within this function. A new operator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
