Select all that apply. Which of the following cause(s) a statement or set of statements to repeat as long as a condition is true?

a. While loops
b. Do-While loops
c. Do-Until loops
d. For loops


a. While loops, b. Do-While loops, d. For loops

Computer Science & Information Technology

You might also like to view...

Discuss why version management may be a useful facility for some applications.

What will be an ideal response?

Computer Science & Information Technology

What does the following code do? The first code listing contains the declaration of class Shape. Each Shape object represents a closed shape with a number of sides (a closed shape must have three or more sides). The second code listing contains a method (mystery) declared by a client of class Shape. What does this method do?

``` 1 public class Shape 2 { 3 // integer for storing number of sides 4 private int sides; 5 6 // Shape constructor, number of sides supplied 7 public Shape( int numSides ) 8 { 9 setSides( numSides ); 10 11 } // end constructor 12 13 // return sides value 14 public int getSides() 15 { 16 return sides; 17 18 } // end method getSides 19 20 // set sides value 21 public void setSides( int numSides ) 22 { 23 if ( numSides > 2 ) 24 { 25 sides = numSides; 26 } 27 else // set invalid input to 0 28 { 29 sides = 0; 30 } 31 32 } // end method setSides 33 34 } // end class Shape ``` ``` 1 public String mystery( Shape shape) 2 { 3 String shapeText; 4 5 // switch with number of shape’s sides 6 switch ( shape.getSides() ) 7 { 8 case 3: 9 shapeText = "Triangle"; 10 break; 11 12 case 4: 1 public String mystery( Shape shape) 2 { 3 String shapeText; 4 5 // switch with number of shape’s sides 6 switch ( shape.getSides() ) 7 { 8 case 3: 9 shapeText = "Triangle"; 10 break; 11 12 case 4: 13 shapeText = "Quadrilateral"; 14 break; 15 16 default: 17 shapeText = "Other polygon"; 18 19 } // end switch 20 21 return shapeText; 22 23 } // end method mystery ```

Computer Science & Information Technology

In the ____ letter style, all components of the letter begin flush with the left margin.

A. modified block style B. block style C. modified semi-block style D. all of the above

Computer Science & Information Technology

A(n) ________ is a report inserted into another report

Fill in the blank(s) with correct word

Computer Science & Information Technology