Annulleret

Threading

Objective: write multi-threaded server communicate with clients connected over a Socket and which objects are sent between client and the server.

You should create a task in a client / server application where the server generates mathematical expressions (eg 1 + 1) that is sent over the network to the client. Client consists of a graphical user interface where users can enter their response to expression then the expression is sent back to the server. The server calculates the expression and

checks if the user typed the correct answer. The result is sent back to the client.

You should start by writing a class to represent the mattematiska expression (mattetal). Matt majority consists of two integers (int), an operator (String) and a response (String). These should be kept as instance variables in the class. The class will also be a public static constant of valid operators. The valid operators are +

(addition), - (subtraction), / (division) and * (multiplication).

There should be two constructors. The first takes three arguments, namely the two centuries and operator. The second takes no arguments but randomly values (0 - 20) for the two centuries, and the operator, of the valid operators, which apply. There should be get-methods for all instance variables and a set method to change / set the value of answer. In addition to this, toString () superimposed so that the returned carpet century strict accordance with the form: number1 operator number2 (eg, 1 +1 or 88 / 4 etc).

Server to handle multiple simultaneous clients, and where communication with each client is in a separate thread. When the server starts you should be able to specify (as a arguments to the application) which port the server will listen on for connecting clients. Indicated no port is the port number of 10,005 used.

You should have a graphical user interface. It should be possible to see (get information on) when a client joins and the

address the client has, and when the client quit (disconnects).

The client must have a graphical user interface in which dull speeches from the server is displayed and in which the user must enter their response by then will be sent to the server calculation. You may choose the appropriate components for this. When the client starts to you can specify (as an argument to the application) the address and port server has. Listed no address and port to the address "localhost" and port number

10,005 used.

All communication between server and client is done with Object Input Stream and Object Output Stream. Communication can be described as:

1. The server starts and listens for clients to connect.

2nd When a client connects, a new thread to process the client.

3rd The server creates a new mattetal with random values and sends this

(objects) to the client.

4th The client receives the item, presenting most of the dull user and waits for the user to enter their response.

5th The user types the answer stored in the object (through the set method) whereupon the client sends the item back to the server.

6th The server receives the carpet's (which now contains the user's response)

7th The server calculates the response (using the GET method to retrieve the two rates and operator) and compare the response to the user specified.

8th The server sends the client a boolean indicating if the user's response is correct (true) or false (false).

9th The client receives the result (a boolean) and presents it in an appropriate manner for the user.

10th Repeat step 3 through step 9 until the user closes the client.

The user of the client shall be notified accordingly if any fault occurs in any of points or when establishing communication with the server (for example, the server does not reached or the input / output streams can not be created). Remember to close the open streams and / or socket in case something goes wrong or when the client ends. Create separate jar files

for server and client.

ALSO

Server and the client shall be extended by the following:

The user of the client is via a menu selection to choose (JFileChooser), a text file from the hard drive. The text file, we assume contains mattetal including responses to client sends to the server. The server notifies the numbers and send a new file showing the user's answer was correct or not. The file is saved with appropriate names the user's hard drive. This activity will take place in separate threads of both the server and

client (while the server notifies the user should be able to answer mattetal as usual).

The user sends text file looks like the following formats:

1 +1 = 2

2 * 2 = 4

10 / 4 = 2

100-80 = 15

The text file, the server sends back is as the following format:

1 +1 = 2 (right)

2 * 2 = 4 (right)

10 / 4 = 2 (right) NOTE: Integer division

10-80 = 15 (error)

When the server is started, a separate thread is created which is responsible for receiving files and correcting them. This thread does not need to cope with multiple simultaneous users. "Corrections" thread to listen for connections on a port number 10 higher than

server listens for clients. "Corrections"-thread is consciously pause at 5:00

milliseconds between each speech to simulate the correction takes a long time. The user shall be notified in an appropriate manner when the result of the fix is complete. You may choose the appropriate streams to transfer the file or content.

Færdigheder: Java

Se mere: writing to a file java, writing to a file in java, writing numbers 1 20, writing numbers 1 10, writing formats, writing for constant content, writing expressions, writing checks, writing an argument, using numbers in writing, using expressions, types of writing formats, types of arguments in writing, transfer methods, three step writing process, static interface, speech write, speeches on writing, see writing method, presents that start with c, object writing, namely, java writing to a file, integers form 1, integers and

Om arbejdsgiveren:
( 143 bedømmelser ) Norway, Sweden

Projekt-ID: #613000

22 freelancers are bidding on average $63 for this job

AshwinSen

Hello, Please view pmb. Ashwin

$100 USD in 3 dage
(40 bedømmelser)
5.7
kevinxiaozi

Sir, I can start the project right now. I am proficient in java programming and network programming. I have done similar project in java. I am convinced to finish the project with high efficiency and qual Mere

$50 USD in 5 dage
(25 bedømmelser)
5.3
srinichal

I can deliver this interesting project

$60 USD in 2 dage
(17 bedømmelser)
5.3
coderTim

I can complete and deliver it in 24 hours.

$70 USD på 1 dag
(50 bedømmelser)
5.2
arunjassiar

I can do this, I have over 9 years of experience in java and related technologies.

$100 USD in 5 dage
(5 bedømmelser)
3.8
webdesigner95

it can be done very easily. see pm

$50 USD in 4 dage
(7 bedømmelser)
3.1
siamsoft061

sir , i have a great experience in java and multi-threading. i am ready to work.....

$45 USD på 1 dag
(3 bedømmelser)
2.9
genti157

It can be done. Let me know if you are interested.

$60 USD in 2 dage
(3 bedømmelser)
2.2
azlinrahim

I've worked on several event management system in the past that have similar requirements to your project. I can definitely help you out. I could also provide you with some demo if required. PM me if you're interested. Mere

$50 USD in 2 dage
(3 bedømmelser)
2.1
uxo

3-4 days. I had written few client-server aplpications on java. Can show.

$200 USD in 4 dage
(2 bedømmelser)
1.8
gupring

i can do this [url removed, login to view] consider [url removed, login to view] check PMB

$55 USD in 4 dage
(0 bedømmelser)
0.0
remould

Cool project. I'm here to help you. Pls check the pmb.

$30 USD in 15 dage
(0 bedømmelser)
0.0
manishbhaumik

I am an experienced java programmer. See [url removed, login to view] I can start, if you agree.

$30 USD in 12 dage
(0 bedømmelser)
0.0
ducthuy

Ready to do it immediately.

$50 USD in 5 dage
(1 bedømmelse)
0.0
codewriters

Hi Sir, I will complete this project with good quality and up to you demand. I have completed many similar projects.

$45 USD in 8 dage
(0 bedømmelser)
0.0
gregoryP

I have java programming certuficate. I can help You with this project.

$30 USD in 2 dage
(0 bedømmelser)
0.0
javiddev

i have great passion for writing Multithreaded java programmes. i will give my 100%

$75 USD in 3 dage
(0 bedømmelser)
0.0
preethang

interested to do this project

$100 USD in 5 dage
(0 bedømmelser)
0.0
smvino

i Have done Similar web service Project .... I Will be recognized if I am given this project........

$75 USD in 3 dage
(0 bedømmelser)
0.0
programmercs2011

Hi,i make many softwares like this , and i am computer science student ,i will do all my best to produce maximum quality with low price.

$30 USD in 7 dage
(0 bedømmelser)
0.0