#java assignment on threads

1 messages · Page 1 of 1 (latest)

dim robin
#

could anyone help me with my java assignment on threads, i cant attach here all the classes i have and the teacher output but i could send in dms

atomic nimbusBOT
#

<@&987246399047479336> please have a look, thanks.

tropic verge
#

share it here pls

#

no dming

#

you can upload the files if you want

#

our bot will take care of it

dim robin
#

oki!

#

can i atttach zip file?

tropic verge
#

not preferred

dim robin
#

oki!

#

one second

tropic verge
#

and then also include more context, what is the task? what are you stuck on? any errors? etc

#

alternatively you can also upload the project to github and share the project here, if you know how to do that

dim robin
#

I did most of the code and it runs but i dont get the exact output as the teacher:

So this is the main instruction from the assignment im stuck on:

You need to complete the Java program that is provided by implementing 4
threads so that the client, the server and the network all run concurrently. The
client has 2 threads, one for sending the transactions and another for receiving
the completed transactions.
In case the input and output network buffers are full or empty each client or
server thread must yield the cpu using the Java method Thread.yield(). The
network thread executes an infinite loop that ends when both client and server
threads have disconnected. In case the client or sever threads are still connected
the network thread must continuously yield the cpu.
You must record the running times of both client threads and the server thread
using the Java method System.currentTimeMillis().
 You need to provide output test cases with the appropriate running times for the
client and the server threads. Change the size of the network buffers from 10 to
20 and explain why (if any) there is a significant difference in the running times.

It prints the client time but not the server time, and im not sure about the changing buffers size.

My output the end only has this:
Account number 12535 Account Balance 750.0 Message done
Client receiving time: 15 milliseconds

While his has this:
Terminating client receiving thread - Running time 45
DEBUG : Server.processTransactions() - 71 accounts updated
Terminating server thread - Running time 68 milliseconds
Terminating network thread - Client disconnected Server disconnected

I dont know how to upload it on git is it ok if i send the txt files of code here?

sacred vector
#

tldr?

tropic verge
atomic nimbusBOT
dim robin
sacred vector
#

you need to explain were you are stuck exactly, nobody is going look read through the output, look through your code and tell you the answer, can you break down the problem for us?