Question: Create a server process that accepts requests from a single client (non-threaded server). The client will send over grade information and the server will calculate

Create a server process that accepts requests from a single client (non-threaded server). The client will send over grade information and the server will calculate and return the semester GPA, the cumulative GPA and the total credit hours. Here is the protocol: After connecting, the client will send over a string with the number of grades, followed by grade and credit hour pairs, followed by current GPA, followed by current total credit hours. Each value is separated by a single comma. You do not have to check the input string for errors. Example: 5, A, 3, B+, 4, A, 1, C, 3, A- , 3, 3.12, 75 In this example, the student currently has a 3.12 GPA after taking 75 hours. Once the server receives the string of values, it will compute the semester GPA, cumulative GPA, total credit hours (89 in this example) and return these three values in a string separated by commas. After the client receives the result, it will output a message to the console with the results (labeled). Then the client will send the string OK back to the server. The server will then close the connection and terminate. For this problem, the server would send back the following string to the client: 3.307, 3.149,89

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!