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 to stars. Clients can rate a service with the command "rate where is an integer between and Clients can see the average rating using the command "rating".
For example, here's the terminal for SimpleClient #:And here's the terminal for SimpleClient #: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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
