The project is to write a program in **Java** . My program must use at least 5 processes or threads running simultaneously.
The processes or threads behave as follows:
The parent thread generates a number of child threads and thereafter behaves as a SERVER thread. Each child thread behaves as a CLIENT.
The SERVER reads in the ASCII text file which contains 100 lines, and stores each line of text in a data structure indexed by the line number. Then the SERVER accepts and responds to requests from the CLIENTs until 40 requests have been served. Then the SERVER terminates.
Each CLIENT thread sends requests to the SERVER at random intervals of real time between 1 and 5 seconds. The form of each request is an integer **n** where **n** is between zero and 101. Then the CLIENT waits for it's request to be served before sending the next request.
The SERVER serves a request by sending back to the requesting CLIENT the actual text of the ASCII file on the requested line number together with the number (from 1 to 40) of that request.
Once the SERVER has terminated each CLIENT gets a turn at printing its replies to the console window. Each client prints all the replies it received to its requests in order of service onto the console window. The output starts with an appropriate heading, contains an ordered list of replies, and finishes with a count of all replies. The client terminates after the output. There is a pause of ten seconds before the next client gets its turn to print.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
Has to run in Windows XP, and source should be in JBuilder or netbeans.