Universal Ltd. (UL) requires the development of a grant application system that will determine whether
a tertiary student will be able to receive an educational grant to assist with their tuition and other
expenses. The system should accept specific data on a student and his/her financial situation and then
determine if the student will be able to receive the grant, and how much grant aid will be provided. The
development of the system is to be done on a phased basis with specific requirements for each phase.
Part 1 of the project required you to simulate the processing for a single student to demonstrate your
understanding of the sequence and selection control structures. The requirements for Part 2 are below,
which requires you to demonstrate your understanding of the iteration control structure. Part 2 should
be considered as additional requirements to those which existed for Part 1. In one or two instances, you
may be asked to replace a specific requirement from the previous deliverable with an updated one ¡V
these will be specified.
The management of Universal Ltd. requires the IPO Chart, Pseudocode, Flowchart, Trace Table, and
Pascal code (including sample screenshots of the executable program) for the product as described
below. It will simulate the processing to be done for more than one student. In addition to the
requirements already provided in Part 1, please accomplish the following:
o The program should allow the user to enter any number of student applications. A value
of either XXX (or its lowercase equivalent) for the student name will indicate that no
more records are to be processed. (Note: do not use arrays).
o Previously UL required the program to accept the student¡¦s identification (ID) number.
Given that UL allows for students from various institutions to submit grant applications,
the possibility exists that a student¡¦s ID number could be duplicated in the program. In
anticipation of the processing of multiple students, UL has decided to create its own
unique way of identifying the students, as shown in the example below:
UL1000 ¡V Micky McKenzie
UL1001 ¡V Cherry Blossom
UL1002 ¡V Jamie Jamison
Rather than accept the students¡¦ ID number, you are required to automatically assign a
sequential ID number to a student¡¦s application (as in the example above). This now
becomes the application number. All other inputs, as outlined in Part 1, remain the
same.
2
o UL wants you to ensure that error-checking is done for all inputs of financial data. Recall that a zero value may be entered in the event a particular cost does not apply.
o Instead of the output requirements outlined in Part 1, UL now wants you to display for each valid application:
„X Application number
„X Student Name
„X Total Educational Expenses
„X Amount Paid
„X Shortfall
„X Application Status
o UL would like a menu-driven statistical summary of the information received from the processing of the applications. As soon as the information has been entered for all students, display the menu shown below and prompt the user to enter an option.
A. Ratio of Total Amount Paid to Total Educational Expenses
B. Ratio of Applications Being Considered for Grants to Applications Processed
C. Average Grant Amount Required per Eligible Student
X. Exit
The program should determine the results to display based on the respective menu options. After displaying the information to the user, the system should continue to re-display the menu to allow the user to make another choice until the user selects the option to exit. Thereafter, the program should terminate.
code for the part 1
Program grant_application (input,output);
USES CRT;
Var
id_num:string;
tertiary_institution :string;
gpa: real;
tuition_fee: real;
cost_texts: real;
misc_edu_cost: real;
total_amnt_paid: real;
acc_cost: real;
total_edu_expenses:real;
name: char ;
key:char;
acc_type: char;
Shortfall:real;
BEGIN
writeln('* * ');
writeln(' * ');
writeln(' * *');
writeln('**** ****');
writeln('Press Any Key to Continue');
Readln(key);
writeln('Please enter your ID number');
Readln(id_num);
writeln('Please enter you name');
Readln(name);
writeln('Please enter your GPA');
Readln(gpa);
IF GPA>4.0
Then
Begin
Writeln('Invalid GPA Entered');
End;
IF GPA<0.0
Then
Begin
Writeln('Invalid GPA Entered');
End;
IF GPA<2.7
Then
Begin
Writeln('GPA is less than whats Required for Grant');
End;
Writeln('Please enter your tertiary institution');
Readln(tertiary_institution);
Writeln('Please enter your tuition Fee');
Readln(tuition_fee);
Writeln('Please enter your textbooks cost');
Readln(cost_texts);
Writeln('Please enter your miscellaneous cost educational items');
Readln(misc_edu_cost);
Writeln('Please enter your accommodation type');
Readln(acc_type);
Writeln('Please Enter Total Amount Paid');
Readln(total_amnt_paid);
IF (acc_type = 'O') or (acc_type ='o') THEN
BEGIN
acc_cost:=0.15*tuition_fee;
END
ELSE
BEGIN
IF (acc_type = 'N') or (acc_type ='n') THEN
BEGIN
acc_cost:=0.20*tuition_fee;
END
ELSE
BEGIN
IF (acc_type = 'D') or (acc_type ='d') THEN
BEGIN
acc_cost:=0.30*tuition_fee;
END
ELSE
BEGIN
WRITELN('Invalid code of', acc_type );
WRITELN('Please enter O or N or D ')
END;
END;
END;
total_edu_expenses:= tuition_fee + cost_texts + misc_edu_cost + acc_cost;
Shortfall:= total_edu_expenses - total_amnt_paid;
WRITELN ('Students ID Number ',id_num);
WRITELN ('Students Name ',name);
WRITELN ('Tertiary Institution Attending ',tertiary_institution);
WRITELN ('Accommodation Type ',acc_type);
WRITELN ('Total Education Expenses $', total_edu_expenses:1:2);
WRITELN ('Total Amount Paid $', total_amnt_paid:1:2);
WRITELN ('Shortfall Amount $',Shortfall:1:2);
IF total_amnt_paid >= total_edu_expenses
Then
Begin
Writeln(name, ' Your is Application REJECTED');
End;
Readln;
while name: == xxx
END
where should part 2 code be written, what should be written?
It looks like you're new here. If you want to get involved, click one of these buttons!