socket-programming-math-service
I want to do the attached word document assignment perfectly.
You are required to implement a math server and a math client. The client should allow the user to continuously issue requests until the user inputs “Quitâ€.
- A user will input some math expression, such as “2 + 3â€, “2 *3â€, “4/5â€, etc., in the client. The client will send the math expression to the server.
- The server will evaluate the result of the received math expression, and send back the result back to the requesting client. The result should be sent back as a string. For example, if the server receives “2 + 3â€, it will send back “5â€. If the server receives “2 *3â€, it will send back “6â€.
- The server should always be running, waiting to serve more clients, before it is manually terminated.
On the server side, you need some evaluation function to evaluate a math expression. You can implement your own, or you can use some existing library functions/methods. In either case, your server should support valid math expressions that involve the four basic operators: “+â€, “-â€, “*â€, and “/â€. The math expressions can have arbitrary number of spaces/tabs within them, and they should still be regarded as valid.”