Answered step by step
Verified Expert Solution
Link Copied!

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 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Describe the functions of a marketing MIS.

Answered: 1 week ago