26. How do you create an object of a class, in COBOL?
27. Write the code to test if ITEM contains both letters and numbers.
28. . Given the following code:
05 IMPATIENS-COLOR PIC 9.
88 RED VALUE 1.
88 PINK VALUE 2.
88 ORANGE VALUE 3.
Write the EVALUATE statement to validate this input.
29. The weekly payroll program for an Internet start-up company contains an input field, HOURS-IN with PIC 999. Employees routinely work long hours, but no one is permitted to work more than 150 hours in a week. Write the PROCEDURE DIVISION code to validate the data input. Use EVALUATE.
30. Write the code to count the number of occurrences of the digit 6 until the first space is encountered in ITEM. Use A-COUNT as the storage parameter.
31. Write the PROCEDURE DIVISION code segment to sum all the numbers from 1 through 100. Use an in-line PERFORM UNTIL.
32. . Write the PROCEDURE DIVISION code segment to sum all the numbers from 1 through 100. Use a PERFORM paragraph-name ..TIMES.
33. Given the following code:
MOVE 10 TO NUM
MOVE 1 TO TOTAL
a) Recode this using an in-line PERFORM N TIMES.
- b) What is output?
"96% of our customers have reported a 90% and above score. You might want to place an order with us."
