Download as:
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Language:EN
Pages: 3

The second integer representing the port number

Problem Statement
You are to write two programs: a server program and a client program. The server program will receive commands to return, clear, or add a value to an integer accumulator within the server.

• add, the the server should read the next string found in the character string sent by the client. This second string will represent an integer number that should be added to the accumulator. The server should then return a string containing (only) the new value of the accumulator in a message to the connected client.

• clear, then the server should simply set the accumulator to 0. No message should be returned to the connected client.

Example Execution
Suppose you invoked the server on machine with IP address alderaan.lindenwood.edu (this is one on the machines in the lab in front of my office) as follows:

./proj3server 50000

Suppose that next, another machine (in Young Hall) ran the following:

./proj3client alderaan.lindenwood.edu 50000

add -13
29

In the above example, the server was told to add -13 to its accumulator and return a string representing the new value of the accumulator. The client then prints the string that was returned.

Then suppose the following is run:

./proj3client alderaan.lindenwood.edu 50000

In the above example, the server was told to a return a string representing the value of the accumulator. The client then prints the string that was returned.

Note that these tests are nowhere near exhaustive. It is 100% up to you to come up with more exhaustive tests than the above!

Correct Submission

10%

Code Compiles

20%
20%
40%
10%
5%

Final Notes & Warnings

Copyright © 2009-2023 UrgentHomework.com, All right reserved.