Question: please Javascript programming: Create a Web page named gpa.html that can be used to compute your grade point average given grades and hours for courses

please Javascript programming:

please Javascript programming: Create a Web page named gpa.html that can be

used to compute your grade point average given grades and hours for

Create a Web page named gpa.html that can be used to compute your grade point average given grades and hours for courses completed. The page should repeatedly prompt the user for course information, reading the course name, grade received, and credit hours for a particular course in a single dialog box. The program should continue prompting and reading in grades until the user enters an empty string to signify the end. For example, x OK Explorer User Prompt Script Prompt: Enter course name, grade, and credit hours (e.g., "CSC551 B+ 3"), or click OK with no data to terminate. MTH245 A4 Cancel Once the course grades have been stored, the page should compute the student's overall GPA. The grade point averages are computed as follows: 1. Grade points (a.k.a. quality points) are assigned to each course based on the grade and number of credit hours: O A yields 4 points for each hour o B+ yields 3.5 points for each hour o B yields 3 points for each hour C+ yields 2.5 points for each hour Cyields 2 points for each hour o Dyields 1 point for each hour o F. AF. and WF yield 0 points for each hour 2. The grade point average (a.k.a. quality point average) is computed by dividing the total number of grade points eamed by the total number of credit hours. For example, suppose a student entered the following course information (with each line entered in a different dialog box): 0 THL100 PHL107 ENG120 MTH245 CSC221 B+ A C+ A A The total number of grade points eamed by this student is (3.5 * 3) + (4 * 3) + (2.5 * 3) + (4 * 4) + (4 * 3) = 10.5 + 12 + 7.5 + 16 + 12 = 58 Dividing this total by the number of credit hours completed yields a GPA of 58/16 = 3.625. Your page should display the total number of grade points, number or hours, and GPA, as well as all of the course information in a readable form. This information should not be displayed in the page until all user input has been processed. For example, COURSE THL100 PHL107 ENG120 MTH245 CSC221 GRADE HOURS B+ 3 A 3 C+ 3 A 4 A 3 Total grade points = 58 Number of hours = 16 GPA = 3.625 Hint: For processing the information on each course, you should utilize the string method split, which splits a string into an array of substrings. For example, line.split(/[\s]/) will retum an array of substrings of line, using whitespace (13) as a delimiter

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!