Question: Purpose: Practice with input/output using , storing data in variables, and arithmetic in C++ with .Assignment:You are a software engineer for a transcontinental shipping company

Purpose: Practice with input/output using , storing data in variables, and arithmetic in C++ with .Assignment:You are a software engineer for a transcontinental shipping company that ships crates across the ocean on large cargoships. Your company needs you to write a program to figure out some metrics on both shipping crates that will be storedon the ships, and storage rooms that will store the crates. Specifically they need you to find the volume, surface area, andspatial diagonal length of the crates and storage rooms. They also need you to figure out how many crates can fit into thestorage rooms. Write a complete program that:

1.Prompts the user to enter the dimensions of a shipping crate and reads in the dimensions and stores them intodoubles. The dimensions you will need to get are:

a.Length of the storage shipping crate.

b.Width of the storage shipping crate.

c.Height of the storage shipping crate.

2.Calculates the volume of the rectangular prism entered in (1).

(See equation below)

3.Calculates the surface area of the rectangular prism entered in (1).

(See equation below)

4.Calculates the diagonal of the rectangular prism entered in (1).

(See equation below)

5.Prompts the user to enter the dimensions of the storage space for shipping crates and reads in the dimensions andstores them into doubles. The dimensions you will need to get are:

a.Length of the storage space for the shipping crates.

b.Width of the storage space for the shipping crates.

c.Height of the storage space for the shipping crates.

6.Calculates the volume of the rectangular prism entered in (5).

(See equation below)

7.Calculates the surface area of the rectangular prism entered in (5).

(See equation below)

8.Calculates the diagonal of the rectangular prism entered in (5).

(See equation below)9.Finds out how many shipping crates can fit in the storage space. (See equation below)

10.Outputs the answers from (2), (3), (4), (6), (7), (8), and (9) nicely using iomanip. See the Example Executions forexample formatting.

The equation for volume of a rectangular prism is:olumev=w*h*l

The equation for surface area of a rectangular prism is:SurfaceArea=2(w*l+h*l+h*w)

The equation for the space diagonal of a rectangular prism is:diagonal=l2+w2+h2

The equation for how many shipping crates can fit in a storage space is:total=spaceL/crateL*spaceW/crateW*spaceH/crateH

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!