Question: Add a rating handler proxy to Echo. A rating handler proxy allows clients to rate a service from 0 to 5 stars. Clients can rate

Add a rating handler proxy to Echo. A rating handler proxy allows clients to rate a service from 0 to 5 stars. Clients can rate a service with the command "rate N" where N is an integer between 0 and 5. Clients can see the average rating using the command "rating".
For example, here's the terminal for SimpleClient #1:And here's the terminal for SimpleClient #2:Hints:
The same client may rate the service multiple times. (Not ideal, but ...)
The rating command returns the average of the total number of stars awarded since the server began running. (Note that averages are doubles.)
Clients should not be allowed to update or access ratings simultaneously as this could lead to race condition.
Do not alter any existing Echo code.
 Add a rating handler proxy to Echo. A rating handler proxy

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!