1. Suppose you are a design engineer for a company that manufactures consumer electronic devices and you are estimating the cost of producing a new product. The product has three components that are purchased from electronic parts suppliers and assembled in your factory. You have received cost information from your suppliers for each of the parts; as is typical in the electronics industry, the cost of a part depends on the number of parts you order from the supplier. The cost of each part depends on the number of parts purchased; we will use the variable n to represent the number of parts, and the variables CostB and Costc to represent the unit cost of each type of part. These costs are given in the following tables. CostPartB CostPartc 1-4 $16.00 1-9 $24.64 5-24 $14.00 10-49 $24.32 25-99 $12.70 50-99 $24.07 $11.00 $23.33 100 or more 100 or more TABLE 1: Unit cost of Part B TABLE 2: Unit cost of Part C In addition to the comnonent cnete VOIR actimate that the TABLE 1: Unit cost of Part B TABLE 2: Unit cost of Part C In addition to the component costs, you estimate that the assembly costs for each unit include the cost of labor and your assembly plant. You have estimated that these costs are CostAssm=$45.00/unit. The unit cost is CostUnit = CostAssm + CostParts + Costpartc. To find the unit cost to build one unit, we look in the above tables with a value of n=1; the unit cost is $45.00+$16.00+$24.64= $85.64 To find the unit cost to build 20 units, we look in the above tables with a value of n=20 and get $45.00+$14.00+$24.32 = $83.32 As expected, the unit cost for 20 units is lower than the unit cost for one unit. a. Create a function named calculateCost() that calculates the unit cost of the manufactured electronic device based on the number of units manufactured. The function will have one input (the number of units produced). b. Test your function for 10 units, 50 units, and 100 units (use the diary command to capture the results of these tests) 1. Suppose you are a design engineer for a company that manufactures consumer electronic devices and you are estimating the cost of producing a new product. The product has three components that are purchased from electronic parts suppliers and assembled in your factory. You have received cost information from your suppliers for each of the parts; as is typical in the electronics industry, the cost of a part depends on the number of parts you order from the supplier. The cost of each part depends on the number of parts purchased; we will use the variable n to represent the number of parts, and the variables CostB and Costc to represent the unit cost of each type of part. These costs are given in the following tables. CostPartB CostPartc 1-4 $16.00 1-9 $24.64 5-24 $14.00 10-49 $24.32 25-99 $12.70 50-99 $24.07 $11.00 $23.33 100 or more 100 or more TABLE 1: Unit cost of Part B TABLE 2: Unit cost of Part C In addition to the comnonent cnete VOIR actimate that the TABLE 1: Unit cost of Part B TABLE 2: Unit cost of Part C In addition to the component costs, you estimate that the assembly costs for each unit include the cost of labor and your assembly plant. You have estimated that these costs are CostAssm=$45.00/unit. The unit cost is CostUnit = CostAssm + CostParts + Costpartc. To find the unit cost to build one unit, we look in the above tables with a value of n=1; the unit cost is $45.00+$16.00+$24.64= $85.64 To find the unit cost to build 20 units, we look in the above tables with a value of n=20 and get $45.00+$14.00+$24.32 = $83.32 As expected, the unit cost for 20 units is lower than the unit cost for one unit. a. Create a function named calculateCost() that calculates the unit cost of the manufactured electronic device based on the number of units manufactured. The function will have one input (the number of units produced). b. Test your function for 10 units, 50 units, and 100 units (use the diary command to capture the results of these tests)