For this project, youll now get to write your own Java Server. Using what youve learned from the Activities, youre going to create two Java classes: A Server class and a Client class. The server will run first, set up a local connection, and wait for the client. The client will then connect to the server and send some data to be processed.The server will work as a conversion app. The client will ask for the user to enter a temperature in the form 80F or 16C to be converted. Note that the client should be able to enter either Fahrenheit or Celsius temperatures. Invalid entries (being anything not in the format xF or xC where x is any real float value) should be turned down by the client and the program should ask for new entry until the user enters a valid input. The server should then receive the users entry by any means and convert the given temperature into its counterpart, sending theconverted temperature back to the client. The formula for converting temperatures can be found below.If youre still not sure about Java programming or how to set up the server/client stuff, check the following two links:https://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.htmlhttp://www.javaworld.com/article/2077322/corejava/corejavasocketsprogramminginjavaatutorial.html When writing this program, heres some things to keep in mind: Code written and submitted must be entirely your own. While you may receive help from other students, tutors, TAs, textbooks, or online sources, the code in your project must be written by you and must be your own original code. Copying from any other source will result in a 0 grade and can potentially have further consequences. The nature of the app is to collect an entry from the user, send the data to the server, have the server convert the data, send the data back to the client, and display the converted data to the user. The program should run through only once, and both the client and server should terminate once finished. Keep in mind that its possible for either the server or the client to terminate while the other is sending data if this happens itll result in a Connection Reset error. If you encounter this error, make sure that both your classes stay connected beyond sending data. For this assignment, the program must be entirely consolebased.No GUI applications or standalone executables will be accepted for this submission. Make sure input is validated before it is sent. If invalid data is entered, the program should repeatedly ask the user for new input until the input entered is valid. Make sure you close your IO objects and all your sockets. Leaving them open is a security risk. While the risk is negligible on a local host, its still good practice to close them when theyre done receiving data. The server should send information to the console for good debugging to tell the programmer what its doing during RunTime. Keep in check with when connections are made and when data is sent. Good documentation is also important in this regard. This program will require you to compile and run two classes at the same time. Some compilers will not allow this; Eclipse and NetBeans will. If you have a different compiler, check to make sure it will run two main programs simultaneously. If it doesnt, Id recommend downloading one of the two compilers mentioned; a quick Google search will give you their websites. The formulas for converting temperatures are as follows:o C = (F 32) / 1.8o F = (C * 1.8) + 32o Keep in mind the order of operations! Finally, when youve finished your program, zip both the .java files and upload them to Moodle.
Programming
[Solved] ITCS 3166 Midterm Project
$25
File Name: ITCS_3166_Midterm_Project.zip
File Size: 235.5 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.