Your cart is currently empty!
Note: In order to have your work on the extra points taken into account, you need to work on the regular points first; only working on the extra part without working on the regular part will lead to the 0 grade for this entire assignment. The goal of this assignment is to gain experience…
Note: In order to have your work on the extra points taken into account, you need to work on the regular points first; only working on the extra part without working on the regular part will lead to the 0 grade for this entire assignment.
The goal of this assignment is to gain experience with network programming, specifically with sockets in Java. This assignment will also require you to develop a server and a client simultaneously. The client will allow the user to enter an arbitrary list of integers to be sent to the server. The server will then return a list of prime integers contained in the original list.
Your client output should look something like:
Enter an integer (“!” to send):
3
Enter an integer (“!” to send):
4
Enter an integer (“!” to send):
5
Enter an integer (“!” to send):
7
Enter an integer (“!” to send):
!
Send: [3, 4, 5, 7]
Receive: [3, 5, 7]
4 [10] Write code that is clear and efficient. Specifically, your code should be indented with respect to code blocks, avoid unnecessarily repetitive code, avoid code that is commented out or otherwise unused, use descriptive and consistent class/method/variable names, etc.
Your input/output should look something like:
Enter “!” to start and stop, “#” to quit:
!
Send: [12, 18, 32, 50, 82]
Receive: []
Send: [3, 62, 15, 10, 71]
Receive: [3, 71]
!
Enter “!” to start and stop, “#” to quit:
!
Send: [18, 24, 5, 99, 20]
Receive: [5]
Send: [42, 12, 32, 59, 97]
Receive: [59, 97]
Send: [2, 9, 41, 98, 10]
Receive: [41]
!
Enter “!” to start and stop, “#” to quit:
!
Send: [21, 92, 40, 7, 10]
Receive: [7]
#
Note: If you choose not to work on the extra points, please use one folder, put your Java source file(s), i.e., .java file(s), into that folder, rename that folder as [YourName]Assignment8Regular, e.g., BillGatesAssignment8Regular, and then zip the folder into a single zipped file. If you choose to work on the extra points as well, in addition to the folder mentioned above, please have another folder, put your Java source file(s), i.e., .java file(s), on the extra points into that folder, rename that folder as [YourName]Assignment8Extra, e.g., BillGatesAssignment8Extra, and then select both folders and zip both of them altogether into a single zipped file. Finally, you rename your zipped file as [YourName]Assignment8.zip, e.g., BillGatesAssignment8.zip, and then upload it to Canvas. Please do not use the “package” keyword in any of your source file.