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

Sutures are strands or fibers used to sew living tissue together after an injury

ID: 1715806 • Letter: S

Question

Sutures are strands or fibers used to sew living tissue together after an injury or an operation. Packages of sutures must be sealed carefully before they are shipped to hospitals so that contaminants cannot enter the packages. The object that seals the package is referred to as a sealing die. Generally, sealing dies are heated with an electric heater. For the sealing process to be a success, the sealing die is maintained at an established temperature and must contact the package with a predetermined pressure for an established time period. The time period in which the sealing die contacts the package is called the dwell time. Assume that the acceptable ranges of parameters for an acceptable seal are the following:

Temperature: 150-170°C

Pressure: 60-70 psi (pound per square inch)

Dwell Time: 2-2.5s

A data file named suture.dat contains information on batches of sutures that have been rejected during a week period. Each line in the data file contains the batch number, the temperature, the pressure, and the dwell time for a rejected batch. As a quality control engineer, your goal is to analyze this information to determine the percentage of batches rejected due to temperature, the percentage rejected due to pressure, and the percentage rejected due to dwell time. If a specific batch is rejected for more than one reason, it should be counted in all applicable totals.

1. Provide the MATLAB statements to compute and print the percentages and the total number of batches rejected in each category.

2. Some of the batches were erroneously rejected. Provide the commands to determine those batches, return their batch numbers and the total number of batches that should have actually been rejected.

3. Some of the batches have duplicate entries (i.e. have the same values for temperature, pressure, and dwell time). Provide the commands to find the number of duplicate entries and the batch numbers of the entries that have been duplicated.

Suture.dat content:

24551 145.5 62.3 2.13

24582 153.7 63.0 2.52

25132 120.5 90.3 1.31

26553 160.4 58.8 2.51

26613 159.5 58.9 2.02

26615 160.0 60.0 2.20

26619 150.3 69.3 2.40

26624 160.5 61.5 1.98

27725 170.9 62.5 2.83

28151 160.3 40.2 2.19

28189 160.3 40.2 2.19

29551 170.1 49.3 3.19

30003 160.4 58.8 2.51

31503 165.1 68.2 2.12

32553 145.5 62.3 2.13

35001 155.5 67.3 2.13

37191 170.0 60.0 2.50

38091 179.0 90.0 2.50

Explanation / Answer

Try this:

#include<iostream>
#include<fstream>

using namespace std;

int main()
{
ifstream input;
ofstream output;

double batch, temperature, pressure, dwell, dwellfail, count, temperaturefail, pressurefail, sum;

string filename;

cout << "input file name please:";
cin >> filename;
input.open(filename.c_str());


if(input.fail())
{
cerr << "fatal error: no input files" << endl;
return -1;
}

output.open("suture.dats::app);

if
{
input >> batch >> temperature >> pressure >> dwell;

for(batch >= 24551; temperature < 150; temperature >170)
{


{
++count;
sum = temperaturefail;
}
}

end
elseif (batch >= 24551 && <= 38091 ; pressure < 60; pressure > 70);
{

{
++count;
sum = pressurefail;
}
}
for(batch >= 24551; dwell < 2; dwell < 2.5);
{
++count;
sum = dwellfail;
}



cout << "Defective batches due to temperature "<< temperaturefail/5*100 <<" percent"<< endl;
cout << "Defective batches due to pressure "<< pressurefail/5*100 <<" percent"<< endl;
cout << "Defective batches due to dwell time "<< dwellfail/5*100 <<" percent"<< endl;

elseif( temperature == -99 && dwell == -99)
break;

}


}