Design an algorithm that will read through the file and calculate the numbers of married men, single men, married women and single women.
Print these numbers on a student summary report.
If any single men are over 30 years of age, print their names and ages on a separate eligible bachelors report.
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.Design of Algorithm
As main structures we’ll use a DOWHILE to cover the entire file (until EOF), regular IF statements for querying marital status and indexes to compute the requested number of students.
BACHELOR REPORT & SUMMARY REPORT
PRINT_’STUDENT SUMMARY REPORT’ heading
PRINT ‘ELIGIBLE BACHELOR REPORT’ heading
SET TOTAL_STUDENTS ->0
DOWHILE (NOT EOF)
IF FILE_STUDENT_RECORD= ‘S’ THEN...