(No Login on Secured Page)
|
|
Show Bid Request
server/client in JAVA
Bid Request Id: 60195
|
|
|
Description:
TO BE PROGRAMMED IN JAVA "JCREATOR" OR EQUIVILENT
use sockets to write a simple client-server application to play a Lottery. to select 6 distinct numbers in the range 1-100 and you win if any one of those numbers matches the single number generated at random by the Server.
The client/server action should proceed as follows: : Client c1. Connect to server via a connection-oriented socket. c2. Read (from socket) and display the prompt message sent (see step s2 in server) by the server. c3. Input your six lottery selections and send them to the server. [PREF. A SIMPLE LOOP PLS] c4.Read (from socket) and display the result of the game, or an error message that is returned by the server (see step s4 in server). c5. Close the connection
Server s0. [Initialization] Create a socket on one of the port numbers in the range above 1024. s1.Wait for a client connection on this socket s2.When a client connection is accepted send an acknowledgement as a sting of text. s3. Receive and read the list of numbers selected by the client. Check that this list is valid (distinct numbers in the range 1-100), if not, return an error message.
s4. Make the lottery draw and see if the client has any winning numbers. Return the result to the client. s5. Close the connection to the client and then loop back and wait for another connection.
[PLS PROGRAM IN SIMPLE TERMS, FULLY COMMENTED. PREFERBLY NO POINTERS OR STRUCTS INVOLVED]
Deliverables: 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
You must chose an unused server port number above 1024. For example, choose port 8888.
* The Server application listens on port 8888 and handles the incoming requests. It may consist of several classes, one to listen, accept connections and revert to listening, and one to draw the lottery number and check whether any client choices have won. The Server should print diagnostic information on the terminal (no GUI is required), listing the status of the server and details of each connection. For example: Server listening on Port 8888, IP number of Client, Connection accepted. It may be helpful to test your Server using telnet before attempting to connect to the client.
* In writing your code, make sure to check for an error return from your system calls or method invocations, and display an appropriate message. In Java, this means using IOException();
* i will be running both the client and server on the same machine. Start the server in one window, and then start the client in another window. In the socket, use ‘localhost&' as the name of the machine to connect to. [BASICALLY 2 TERMIANL PROMPTS, NO GUI PLEASE]
* Make sure you close every socket that you use in your program. If you abort your program, the socket may still hang around and the next time you try and bind a new socket to the port you previously used (but never closed), you may get an error. Also, please be aware that port ID's, when bound to sockets, are system-wide values and in the UNIX lab other students may be using the port number you are trying to use.
Submission Write a report on the design and implementation of your solution, showing code and results: (i) a class diagram outlining the class structure for your proposed solution. (ii) a set of summary tables describing the fields, constructors and methods for each class. (iii) a print out of the Java source code of your complete program.
Platform:
SUN SOLARIS UNIX AND WINDOWS (WIN98 & XP)
Must be 100% finished and received by buyer on:
May 14, 2003 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
No bidding allowed, because this bid request was cancelled.
|
Cancelled Date: |
5/19/2003 3:41:04 PM
|
Cancelled Reason: |
Cancelled by automated program due to time expiration
|
|
|
|
Credentials
|
Rent A Coder upholds the rigorous business practices required to be both a BBB member and Square Trade vendor.
- All customer issues addressed within 2 days
- Openly disclosed pricing and return policies
- Participation in mediation at buyer request
- Superior selling track record
This site is verified through its parent company, Exhedra Solutions, Inc.
|
|
See all top coders...
(What makes a top coder?)
Top Exam Scorers
Created in partnership with:
|
|