Monday, February 25, 2013

Project 5: Surture Packaging

Page 221, Problem 24

Due: next Monday midnight, 3/4/13


Suture Packaging. 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, 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 range of parameters for an acceptable seal, are the following:

Temperature: 150-170 degree C
Pressure: 60-70 psi
Dwell time: 2-2.5 s

24. A data file named suture.dat contains information on batches of suturtes
that have been rejected during a one-week period. Each line in the data file contains the batch
number, the temperature, the pressure, and the dwell time for a rejected batch. The quality
control engineer would like to analyze the information and needs a report that computes the
percent of the batches rejected due to pressure, due to temperature and the percent rejected due to dwell time. It is
possible that a specific batch may have been rejected for more than a reason and should be
counted in all acceptable totals. Write a program to compute and print these three percentages.
Use the following test data:
(The red numbers are what actually in your file.
-99s are sentinel signal for end checking.
You may want to use my class example(in dropbox) as your template)

(In order to make sure your program works properly, you could manually check out the results,
since the data file is very small.
For example, due to Temperature, it fails at batch 24551. So the percentage would be 1/5 = 20%
You could also check others)

Batch Number   Temperature   Pressure     Dwell Time

24551                145.5                62.3                2.23
24582                153.7                62.3                2.52
26553                160.3                62.3                2.51
26623                159.5                62.3                2.01
26642                160.3                62.3                1.98
-99                     -99                   -99                     -99

Monday, February 18, 2013

Announcement: Midterm time

The midterm date is
Wednesday Class time 03/06/13 10:10

The review data is
Monday Class time 03/04/13 10:10

Written Homework 4

Text book:
page 152 Practice 5,6
page 176 problem 1,2,7,8,9
page 177 problem 14,15,16

You should submit your answer through the Google form which is sent to you by Email.

Due: next Monday Class time 02/25/13 10:10





Wednesday, February 13, 2013

Project 4

Page 178 Problem 25  <--  You are required to use a while-loop to solve this problem
Page 179 Problem 29  <--  You are required to use a for-loop to solve this problem

Since you have 2 problems this time, you will need to upload two cpp files and two executable files for the corresponding problems.

Due: 2/20/13 Wednesday midnight





Friday, February 8, 2013

Written Homework 3

Text book:
page 135 problem 1,2,3,4,5,7
page 136 problem 8,9,10,14

You should submit your answer through the Google form which is sent to you by Email.

Due: next Friday Class time 02/15/13 10:10

Problem 14:

int a = 750;
if( a > 0 )
if(a >= 1000)
a=0;
else
a*=2;
else
a*=10;




Wednesday, February 6, 2013

Project 3: Age problem

Create an program that allows the user to input an age in years and then displays one of the following (or similar) responses. You program should be able to figure out how many years to display in some of the responses :


Age Range                    Response
0 < age <6 You are considered a young minor. But, in approximately ___ year(s) you will be able to attend school!
6<= age<16In approximately ___ year(s) you will be able to drive!
16<=age<21In approximately ___ year(s) you will be of legal drinking age.
21<=age<35You are of legal drinking age. In approximately ___ year(s) you will be able to run for president!
35<=age<120You are old enough to run for U.S. President.
age >= 120You are too enough to run for U.S. President.


Tip: the most suitable type of age is "int"
       "if-elseif-else" would be perfect for this program
       

Due: 2/13/13 midnight

Friday, February 1, 2013

Written Homework2

Text book
page 89. problem 1, 2, 5, 6, 7
page 90. problem 8,12,13,14,15

Due: next Friday 2/8/13 10:10 class time