A start_new_page module is added to handle the paging. This module is called from the detail_processing module whenever the line_count has previously exceeded the lines_per_page. To insure that the line limit will never be exceeded, the test is made immediately before each name is printed in the report. Notice that the first page is forced by initializing line_count to 99. Because lines_per_page
includes the title and spacing lines, line_count is reset to 2 at the start of each new page, not zero. For now, the summary line continues to print just below the final detail line, regardless of whether the page is full. A blank spacing line is part of starting a new page. This is handled by a blank line variable set to the null string ("”) in the initial-processing module.
What will be an ideal response?
```
produce_report
CALL initial_processing
DO WHILE name < > "End of Data" CALL detail_processing
LOOP
CALL final_processing
initial_processing
LET count = 0
LET lines_per_page = 50
LET page_break = Chr(12)
LET blank line =
LET line_count = 99
INPUT name, sex_code, status_code
detail_processing
IF sex_code = "F" AND status_code = "F" THEN
IF line_count > lines_per_page THEN CALL start_new_page OUTPUT name
LET count = count + 1
END IF
INPUT name, sex_code, status_code
final_processing
OUTPUT "total number of students reported is ", count
start_new_page
OUTPUT page_break
OUTPUT "Full-time Female Students" OUTPUT blank lice
LET line_count = 2
```
You might also like to view...
Which statement is false?
a. An enum declaration is a comma-separated list of enum constants and may optionally include other components of traditional classes, such as constructors, fields and methods. b. Any attempt to create an object of an enum type with operator new results in a compilation error. c. An enum constructor cannot be overloaded. d. enum constants are implicitly final and static.
When removing an element from a binary search tree that has two children, _______________________ will ensure that the resulting tree is still a binary search tree.
a) replacing it with its only child b) replacing it with its inorder successor c) simply deleting it d) all of the above e) neither a, b, nor c
A(n) ____ corresponds to a window pane.
A. JPanel B. JButton C. JSpinner D. JMenuBar
If you want more freedom as to where your controls are located on a form you need to remove the ________ control
Fill in the blank(s) with correct word