Homework 7

 

 

1.  The below information is taken directly from the Academic Dean's Homepage describing criteria for the Superintendent's List and the Dean's List (slightly modified for clarity).

Superintendent's List. Midshipmen who meet the following criteria will be placed on the Superintendent's List 
 
SQPR of at least 3.4 with 
no grade of D, F, or I in any course, 
A in Conduct, 
A in Military Performance, and 
A or B in Physical Education and A or B on Physical Readiness Test. 
 
Dean's List. Midshipmen who meet the following criteria and are not on the Superintendent's     List will be placed on the Dean's List:
 
SQPR of at least 3.4 with 
no grade of D, F, or I in any course, 
B (or better) in Conduct, 
B (or better) in Military Performance, and 
C or better in Physical Education and C or better on Physical Readiness Test..

Assume the MIDS database can produce the following record:

(Name   SQPR   flag   conduct   MP   PE   PRT)

where:

Name: last name of midshipman
Sqpr: students quality point ratio
Flag: contains a 1 if midshipman has a D, F, or I in any course. Contains 0 otherwise.
Conduct: holds a character 'A' thru 'F' (excluding 'E') for conduct grade.
MP: Military performance (same as conduct)
PE: physical education (same as conduct)
PRT: physical readiness test (same as conduct)
 

Write a program that will query the user to type a record in the prescribed format and produce exactly one of "Superintendent's List", "Dean's List", and "NQ (not qualified)" based on the criteria described on the Dean's webpage. Here's some examples:

 

Sample Input

Sample Output

Jones 3.53 0 A B B A

Midshipman Jones: Dean's List

Smith 3.41 0 A A B A

Midshipman Smith: Superintendent's List

Brown 2.6 1 C C D A

Midshipman Brown: NQ (not qualified)

 

Turn in a copy of your source code and screen captures for the execution of all three sample inputs.

 

 




accidents.txt