Question: Old MathJax webview (b) You are required to develop a Grade Point Average system (GPA) to calculate GPA for the registered courses for each semester.

Old MathJax webview

Old MathJax webview (b) You are required to develop a Grade Point

Average system (GPA) to calculate GPA for the registered courses for each

(b) You are required to develop a Grade Point Average system (GPA) to calculate GPA for the registered courses for each semester. GPA is calculated based on the number of courses registered, course units (U), and grade point (GP) for each course. Table 1 shows the equivalence alphabetical grade and grade points. Figure 2 illustrates on how GPA is calculated. The formula to calculate GPA is as follow: Anda dikehendaki membangunkan suatu sistem Purata Mata Gred (GPA) untuk mengira GPA bagi kursus-kursus berdaftar setiap semester. GPA dikira berdasarkan bilangan kursus berdaftar, unit kursus (U), dan mata gred (GP) bagi setiap kursus. Jadual 1 menunjukkan gred dan mata gred setara. Rajah 2 menunjuk cara bagaimana GPA dikira. Formula untuk mengira GPA adalah seperti di bawah: GPA = n U, GP, i=1 n U, i=1 U = Course unit for course i Unit kursus untuk kursus i GP; = Grade point for course i Mata gred untuk kursus i n = number of courses registered bilangan kursus-kursus berdaftar Table 1: Alphabetical grade and grade points Jadual 1: Gred abjad dan mata gred Alphabetical Grade Grade points A B D 4.00 3.00 2.00 1.00 F 0 Course code CPT111 CST131 CPT114 LKM400 LSP300 SHEXX U 3 4 4 2 2 2 Grade A B A B GP 4.00 3.00 4.00 3.00 2.00 3.00 Total GP 12.00 12.00 16.00 6.00 4.00 6.00 B Total 17 56.00 GPA (Total GP of all registered courses/Total course Units) 3.29 Figure 1: Illustration of how GPA is calculated Gambar rajah 1: Ilustrasi bagaimana GPA dikira. Course Code Unit CPT114 4 CPT113 3 CST132 4 LSP300 2 grade A B B B Total registered units:13 GPA is: 3.31 Press any key to continue Figure 2: Sample of output Gambar rajah 2: Contoh output Given the following main () program: Diberi atur cara main() berikut: #include #include #include using namespace std; int user Input (int, string[], int [], char[]); double calculateGPA (int,char[], int [], double[]); int main() double GPA, TotalGP, GP[5]; string courseCode [5]; char grade (5); int totalUnits, t_course, courseUnit [5]; cout 5, ask a user to input again. totalUnits=user Input (t_course, courseCode, courseUnit,grade); TotalGP=calculateGPA (t_course, grade, courseUnit, GP); (2) //C++ statements to calculate GPA and store into variable GPA. (3) //C++ statements to display the output as shown in figure 2. system("pause"); return 0; }//main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!