Introduction to Programming

Red Sands University (RSU) is a popular brand of education in Bidiya. RSU offers business degree for undergraduate programs. It wants to have an information

system to calculate the GPA of the students appearing for the examination. Write a java program as per following scenario:

I. As a first step, you have been asked to develop a mini system in Java to read data of (n) students.

II. The program must read the student id, name and marks scored in 5 modules – module1, module2, module3, module4, and module5. Each module is of 10 credits.

III. The program must determine the grade based on the marks scored using table 1.1 given below:

Table 1.1: Determining grades

A A- B+ B B- C+ C C- D+ D D- F

91- 87- 84- 80- 77- 74- 70- 66- 60- 55- 50- 0- 100 90 86 83 79 76 73 69 65 59 54 49

IV. Based on the grade, the program must map the equivalent numerical value of grade for each module using table 1.2 given below:

Table 1.2: Mapping grades to numerical values Grade Numerical value

A 4.0

A- 3.67

B+ 3.33 B 3.0 B- 2.67 C+ 2.33 C 2.0 C- 1.67 D+ 1.33 D 1.0 D- 0.7 F0

Sample Solution