Current location: Hot Scripts Forums » Programming Languages » Everything Java » Please Help !

Please Help !

Reply
  #1 (permalink)  
Old 03-30-04, 10:47 PM
sweetgurl sweetgurl is offline
New Member
 
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Please Help !

I ahve this project due tomorrow and I dont know nuthing on this thing. Its 20% of final grade. Please help me here , I have been tryign ot learn this thing since last two days and cant get anythign. Please if somebody can help me , i wil be pleased to offer gift certificate(movies) or somethign in return please help. email me at christinajoinsu@yahoo.com.

*********************************************
Modify the Client-Server Application given at:
http://www.site.uottawa.ca/school/re...terial/source/
(You would need only the Files under OCSF and Simplechat1 to do this problem, everything else is unrelated)
Here are the things needed:
1. a) Currently if the server shuts down while the user is connected, the client does not respond, and continues to wait for messages. Modify the client so it responds to the shutdown of the server by printing message saying the server has shutdown and quitting.
(Hint: look at methods connectionClosed and connectionException .
b)Currently the client uses a default port. Modify the client so that it obtains the
port number from the command line.
(Hint : looks at the way it obtains the host name from the command line)
2. Currently the server ignores situations where clients connect or disconnect. Modify the server so that it prints a out a nice message whenever the a client connects or disconnects.
(Hint: write a code in EchoServer that overrides certain methods in AbstratcServer)


3. Add a mechanism so that the user of the client can type commands that perform special functions. Each command should stast with the # symbol.
a) #quit : cause the client to terminate gracefully. Make sure the connection to server is terminated before exiting the program.
b) #logoff : causes the client to disconnect fromt ht eserver, but not quit.
c) #sethost <host> :Calls the setHost method in the client. Only allowed if the client is logged off., displays an error message otherwise.
d) #setport<port> : Calls the setPort method in the client, with the same constraints as #sethost.
e) #login : Causes the client to connect to the server. Only allowed if the client is not already connected, displays and error message otherwise.
f) #gethost : Displays the current host name.
g) #getport : Dispalys the current port number.

Similar to above. Implement following commands for the user of the server.

a) #quit : causes the Server to terminate gracefully.
b) #Stop : causes the server to stop listening to new clients.
c) #close : Causes the server to stop listening for new clients, but also
to disconnect all existing clients.
d) #setport<port> : Calls the setPort method in the server, Only allowed
if the server is closed.
e) #start : Causes the server to start listening for new clients. Only valid
if the server is stopped.
f) #getport : Display the current port number.


4. Add a new class ServerConsole that also implements the ChatIF interface, Following the modification following should be true.
a) Anything typed in the server?s console by the end-user of the server should be echoed to the server?s console and to all clients.
b) Any message originating front he end-user of the server should be prefixed by the string ?SERVER MSG>?.



5. In the program cleints are always anonymous (When a message is sent from a client , it is echoed to all other clients, but nobody knows who sent it). So do the following
a) Add a new login i.d command to the argument in client. The login i.d should be mandatory , the client should immediately quit if it is not provided.
b) Whenever a client logins to the server it should acutomatically send the message ?#login<loginid>? (i.e the string with the login i.d appended to it) to the server. (Note the use of ?#?. The #login is sent to the server it is not handles like commands #quit , #logoff etc.)


Imp : **With all the above done I require a list of all files/classes modified in relation to each problem. For example :
For problem 1 a) Method connectionClosed in file:****.java modified .
**********email me at christinajoinsu@yahoo.com.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 03-31-04, 09:13 AM
Boton's Avatar
Boton Boton is offline
New Member
 
Join Date: Mar 2004
Location: UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by sweetgurl
I ahve this project due tomorrow and I dont know nuthing on this thing. Its 20% of final grade. Please help me here , I have been tryign ot learn this thing since last two days and cant get anythign.
If your project is due in the next two days then you should've started looking at it long ago and its not fair to ask someone else to do your assignment. We are here to LEARN from each other, NOT to do others jobs.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 04-13-04, 12:57 PM
hyjacked hyjacked is offline
Wannabe Coder
 
Join Date: Nov 2003
Location: New Brunswick, Canada
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
but she is offering us movie tickets? wonder if that meant she could go to?

wonder if she got it done by someone?
__________________
hyjacked
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 08:56 PM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.