Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started