Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello. C++ Question Help Please Thanks. Suppose you own a small plastics company

ID: 3889819 • Letter: H

Question

Hello. C++ Question Help Please Thanks.

Suppose you own a small plastics company that specializes in manufacturing plastic containers. You would like to have a program that will help you provide estimates for potential customers. You have decided to implement the portion of the program that will estimate the cost of making plastic boxes. Here are some basic facts. • The shape of the boxes will be rectangular. • Each box will have 4 sides and a bottom. • The exterior (outside) length and width of the box will be specified in centimeters. • The exterior (outside) height of the sides of the box will be specified in centimeters and will include the thickness of the bottom. • The thickness of the sides and bottom of the box will be the same and will be specified in centimeters. • The current cost of the plastic used is half a cent ($0.005) per cubic centimeter. • Overhead and other costs are estimated to be 25% of the cost of the plastic. Design a C++ program that will • Use named constants to represent fixed values (at least 2). • Interactively prompt the user for and read the data listed below. The values must be read in the order shown. Declare all variables as double type values except for the number of boxes being ordered, which should be an int. the number of boxes to be manufactured (int) the exterior length of the box (in centimeters) the exterior width of the box (in centimeters) the exterior height of the box (in centimeters) the thickness of the sides and bottom (in centimeters) • Determine the amount of plastic needed in cubic centimeters. • Determine the estimated cost of the plastic needed. • Determine the estimated overhead cost. • Determine the estimated total cost for the job. • Display a job estimate formatted as in the examples shown below. The first line(s) of the job estimate must include your name, lecture and lab section #s, and assignment #. The job estimate must include the dimensions of the box (in cm) the number of boxes to be made (as an integer) the total amount of plastic needed (in cubic centimeters) the cost of the plastic the cost of overhead the total cost of the job

Sample Terminal Session:

Sample terminal session: [joj5ebobby 17FAl$ g*+ assign81.cpp [joj5@bobby 17FA]s ./a.out How many boxes are to be made? 1 what is the exterior length of a box (in cm)? 15.0 What is the exterior width of a box (in cm)? 12.0 What is the exterior height of a box (in cn) 6.0 What is the thickness of the sides and bottom (in cm)? Juyeon Jo, Lec #1019, Lab #1021, Assignment #1 J0B COST ESTIMATE Box Dimensions- Exterior length: Exterior width: Exterior height: Side/Bottom ThicknesS: 15.000 cm 12.000 cm 6.000 cm 1.800 cnm Boxes ordered: Plastic needed: 430,000 cu Cost of plastic: Overhead: Total estimate: $ S 2.15 0.54 2.69 [joj5ebobby 17FAl$ [joj5@bobby 17FA]s./a.out How many boxes are to be made? 100 what is the exterior length of a box (in cm)? 80.0 What is the exterior width of a box (in cm)? 50.0 What is the exterior height of a box (in cm)? 10.125 what is the thickness of the sides and bottom (in cm)? Juyeon Jo, Lec #1019, Lab #1021, Assignment #1 0B COST ESTIMATE Box Dinensions- Exterior length: Exterior width: Exterior height: Side/Bottom Thickness: 80.000 cm 50.000 cm 10.125 cm 2.125 cm Boxes ordered: Plastic needed: 100 1277550.080 cu cm Cost of plastic: Overhead: Total estimate: 6387.75 1596.94 7984.69

Explanation / Answer

#include<iostream>
#include<iomanip>

using namespace std;

int main(){

   float length, width, height, thickness;
   int n;
   cout << "How many boxes are to be made? ";
   cin >> n;
   cout << "What is the exterior length of a box (in cm)? ";
   cin >> length;
   cout << "What is the exterior width of a box (in cm)? ";
   cin >> width;
   cout << "What is the exterior height of a box (in cm)? ";
   cin >> height;
   cout << "What is the thickness of the side and bottom (in cm)? ";
   cin >> thickness;
   double vol = (length * width * height) - ((height-thickness) * (length - 2* thickness) * (width - 2*thickness));

   cout << "JOB COST ESTIMATE ";
   cout << "Box Dimensions--- ";
   cout << "Exterior length:                           " << length << " " << "cm" <<endl;
   cout << "Exterior width:                            " << width << " " << "cm" <<endl;
   cout << "Exterior height:                           " << height << " " << "cm" <<endl;
   cout << "Side/Bottom Thickness:                     " << thickness << " " << "cm" <<endl << endl;

   cout << "Boxes ordered:                             " << n << endl;
   cout << "Plastic needed:                            " << vol << " cu cm" << endl << endl;

  
   cout << "Cost of plastic:                           $" << vol *0.005 << endl;
   cout << "Overhead:                                  $" << vol *0.005 * 0.25 << endl;
   cout << "Total estimate:                            $" << vol * 0.005 + vol *0.005 * 0.25 << endl;
  
   return 0;
}