Page 1 Computer Science 255 First Hour Exam Name _____________________________ Friday, Sept. 22 100 pts. I. (15 pts.) Name the four divisions of a COBOL program, giving a brief description of each. II. (15 pts.) A STUDENT record consists of the following fields (in the following order): A STUDENT-NUMBER field which is nine characters (numeric). A STUDENT-NAME field which consists of the following three sub fields: a LNAME field 15 characters alphanumeric a FNAME field, also 15 characters alphanumeric a MI (middle initial) field, one character alphanumeric A MAJOR field which is ten characters alphanumeric An ADVISOR field, which is nine characters numeric (the SSN of the student's advisor, though we don't need to know this for this problem) Given these facts, write a complete COBOL record description for this record. III. (15 pts.) Suppose that we have the following: 01 STUFF. 02 FLD-A PIC X(3) VALUE "ABC". 02 FLD-B PIC X(4). 02 FLD-C PIC X(4) JUSTIFIED RIGHT. 02 FLD-D PIC X(2). 02 FLD-E PIC X(2) JUSTIFIED RIGHT. What would be the effect of the following MOVE statements? Be sure to indicate any spaces by using a check mark. MOVE FLD-A TO FLD-B. FLD-B = _______________ MOVE FLD-A TO FLD-C. FLD-C = _______________ MOVE FLD-A TO FLD-D. FLD-D = _______________ MOVE FLD-A TO FLD-E. FLD-E = _______________ IV. (15 pts.) Suppose that we have the following: 01 STUFF. 02 FLD-A PIC 99V99 VALUE 12.34. 02 FLD-B PIC 9.9. 02 FLD-C PIC $$$9.99. 02 FLD-D PIC ZZZ9.99. What would be the effect of the following MOVE statements? Be sure to indicate any spaces by using a check mark. MOVE FLD-A TO FLD-B. FLD-B = _______________ MOVE FLD-A TO FLD-C. FLD-C = _______________ MOVE FLD-A TO FLD-D. FLD-D = _______________ MOVE FLD-A TO FLD-E. FLD-E = _______________ V. (40 pts.) On this and the following page, write a complete COBOL program which will read records described in problem II (the STUDENT-REC question) and which will print a report with one line for each student, printing the student's STUDENT- NUMBER, STUDENT-NAME, and MAJOR. No headers or footers are required for this exercise. additional workspace for problem (V)