Archive for November, 2007




6.5

1. a) out puts will be 2,3 run for three times which is 23 23 23     b) out puts will be  1,2,3 , 1,2,3 ,1,2,3 run for three times  2.     a.Output the numbers 1 to 25 in consecutive order, using five rows of five numbers each.- for(i=1, i<=5, i++)for(j=1, j<=25, j++)System.out.print(k + “”)System.out.println(””)

Add comment November 30, 2007

6.4

1. it should be grater than equal or less than and equal2. if (income > 10000)rate =0.10;else if (income > 20000 && income <= 50000)rate=0.18;else if (income >  50000)rate = 0.40;elserate =0.0;     

Add comment November 30, 2007

6.3

1. The time is before noon   The day is Monday     Outcome      True                                      true                  take a computer quiz        True                                    False             throw a Frisbee in the quad    False                                  True               go to gym class    False                                 False                 None  2.  Nest if statements offer an alternative                                                                                                  

Add comment November 29, 2007

6.2

1.a)if the # is > 0 , action 1 will work, if # is < 0, action 2 will work.  b) if the # is > 0 and < 100, action 1 will work. If # is < 0 or > 100, action 2 will work. 2.When we complete code coverage, that every line in a program is executed at least once.3. Equivalence class – they are equivalent from the perspective of testing the same path through the program. ex) when the employee type is 1, test data for the payroll program fall into just two equivalence class: o hours between 0 and 40 and hours greater than 40.  4. Boundary Condition – on or near the boundaries between equivalence classes. ex) for the payroll program, this requirement means testing with hours equal to 39, 40, and 41.5. extreme conditions – that is what data at the limits of validity. ex) we choose hours worked equal to 0 to 168 hours.  6. equivalence  class When the teacher type is 1, grades data fall into two equivalence class grades between 0 to 60 and grades greater than 60. boundary condition – 59, 60 and 61 extreme condition – 0 to 100  

Add comment November 28, 2007

6.1

P     Q           ! ((P//Q) && (P&&Q)T     T           FalseT      F          TrueF      T          FalseF      F          True  2a) Trueb) Falsec)Trued)False 4. ! > && >|| 5.  Construct a Boolean expression that tets whether the value of variable x is within the range specified by the variables min (the smallest) and max (the largest).

- if (min<= x && x<=max)System.out.println (”x is within the min and the max. “)

 

Add comment November 28, 2007

Pages

Categories

Links

Meta

Calendar

November 2007
M T W T F S S
« Oct   Dec »
 1234
567891011
12131415161718
19202122232425
2627282930  

Posts by Month

Posts by Category