Design a program that produces a "Parts to Reorder" report. Data for the report should be read in pairs from a data list. Each pair of data items includes a part ID followed by the number of that part in stock. Assume that the data list gives the part IDs in ascending order in the range 1000 to 5999. The data include parts that need to be reordered as well as parts that do not. The final part ID,

9999, is a sentinel value. A sample data list looks like this: 1001, 50, 1002, 120, 1003, 5, ... 9999, 0.

The report should include: (1) report title on the first line, (2) reorder information, showing ID and number on hand, one ID per line, for those parts that have fewer than 20 in stock, and (3) message on the last line telling the number of IDs in the report.
There is no need to handle page breaks. Let the report run over as many pages as needed without printing additional headings.

What will be an ideal response?


```
produce_reorder_report
CALL initial_processing
DO WHILE part_id< 9999
CALL detail_processing
LOOP
CALL final_processing
initial_processing
LET count = 0
OUTPUT "Parts to Reorder" INPUT part_id, num
detail_processing
IF num < 20 THEN
OUTPUT part id, num LET count = count + 1 END IF
INPUT part_id, num
final_processing
OUTPUT "Total IDs in this report are ", count
```

Computer Science & Information Technology

You might also like to view...

A string object's ____________ method returns true if the sub string being searched for is contained within the string; otherwise it returns false.

a. Contains b. Sub string c. Index Of d. Insert

Computer Science & Information Technology

The command cat Afile >> Xfile

a: copies the Afile to Xfile and overwrites Xfile b: appends the Afile to Xfile c: terminates the command if Xfile already exists d: Saves Xfile before copying the files e: displays an error message if Xfile exists

Computer Science & Information Technology

What is the output of the following code?

``` public class Test { public static void main(String[] args) { int[][] matrix = {{1, 2, 3, 4}, {4, 5, 6, 7}, {8, 9, 10, 11}, {12, 13, 14, 15}}; for (int i = 0; i < 4; i++) System.out.print(matrix[i][1] + " "); } } ``` a. 1 2 3 4 b. 4 5 6 7 c. 1 3 8 12 d. 2 5 9 13 e. 3 6 10 14

Computer Science & Information Technology

A cookie is a(n) ________

A) example of a Java applet B) small text file placed on your computer C) small version of EDI D) example of an Active X control

Computer Science & Information Technology