Explain what a range check is and provide an example.
What will be an ideal response?
When you use a range check, you compare a variable to a series of values that mark the limiting ends of ranges. To perform a range check, make comparisons using either the lowest or highest value in each range of values.
An example would be: You can ask: Is itemQuantity less than 11? If not, is it less than 25? If not, is it less than 51? (If it's possible the value is negative, you would also check for a value less than 0 and take appropriate action if it is.)
You might also like to view...
The Java statement: g.draw3DRect(290, 100, 90, 55, true);
a. draws a rectangle that appears to be raised (the top and left edges of the rectangle are slightly darker than the rectangle). b. draws a rectangle that appears to be lowered (the bottom and right edges of the rectangle are slightly darker than the rectangle). c. draws a rectangle that appears to be raised (the bottom and right edges of the rectangle are slightly darker than the rectangle). d. draws a rectangle that appears to be lowered (the top and left edges of the rectangle are slightly darker than the rectangle).
Which if statement would be true if you needed to see if x (an int) is less than 25?
A. if( x > 26 ) B. if( x <= 25 ) C. if( x <= 24 ) D. if( x >0 && x < 25 )
Which technology puts stored data into RAM where it is retrieved faster?
A) CDFS B) Virtual memory C) Disk cache D) FAT32
To insert a blank page or page break tap CTRL + ENTER.
Answer the following statement true (T) or false (F)