Question: C++ Program. Description: Rupert Crane, an employee with SpaceMiser Materials, has hired you to write a program that wil help him decide whether a certain
C++ Program.


Description: Rupert Crane, an employee with SpaceMiser Materials, has hired you to write a program that wil help him decide whether a certain layout for cutting shapes out of a piece of material meets the company's requirements for efficiency. Below is an example using 5 shapes, Rupert want to check 10 shapes. Shape 1: 0,0 0,5 14,5 14,0 Shape 2: 0,10 5,10 5,5 0,5 Shape 3: 10,10, 10,5 5,5 5,10 Shape 4: 13,7 10,7 10,8 13,8 Shape 5: 10,5 10,7 15,7 15,5 Data entered into the program like this: 000 5 14 5 14 0 0 10 5 10 55 05 10 10 10 5 555 10 13 7 10 7 10 8 13 8 10 5 10 7 15 7 15 5 The pairs of numbers are coordinates on a grid. AFTER ENTERING THE DATA FOR ALL 10 OBJECTS, you will use the data to provide the following information: 1. The type and area of each shape. Shapes should be identified as either a Square or a Rectangle. You must use the format below to provide the information (Shape and Type column are left justified, Area is right justified). Area(sq/units) Type Rectangle Square Square Rectangle Rectangle Shape# 70 25 25 2 3 10 2. The total area of the combined shapes, in this format: The total area of the shapes is: ### sq/units. cribec 3. The specifications for the smallest piece of material from which shapes laid out as des can be obtained, in this format: Minimum material specifications: Length: ## Width: ## Area: ## sq/units 4. Determine whether the layo ut meets the SpaceMiser Logistics efficiency requirement which is to use at least 90% of the material from which the shapes will be cut. If the layout meets the requirement, print the following message: The layout is efficient, it uses ###% of the space. If the layout does not meet the requirement, print the following message: The layout is not efficient, it wastes ###% of the space. Put it all together and the output should have this format (Last line is only if the efficiency threshold is met otherwise last line would be different): Area(sq/units) Type Rectangle Square Square Rectangle Rectangle Shape# 70 25 25 2 3 10 5 The total area of the shapes is: ### sq/units. Minimum material specifications: Length: ## Width: ## Area: ## sq/units The layout is efficient, it uses ###% of the space
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
