So the pdf fike has the specifications. The zip file submitted has the UDP Clinet and UDP Server java class as mentioned in the assignment. The text file has got the phone number and the gui. Please...

1 answer below »
So the pdf fike has the specifications. The zip file submitted has the UDP Clinet and UDP Server java class as mentioned in the assignment. The text file has got the phone number and the gui. Please go through the specifications and it clearly has whatever needs to done with designing gui for the UDP server and client java. Please only use the UDP server and Client files in the zip folder and then design the gui for hills public school as mentioned in the specifications. Please use the text file as details. Also go through the interface design of the gui as mentioned in the specifications.


COIT13229, 2018 Term One - Page 1 of 8 Applied Distributed Systems COIT 13229 Assessment item 1—Java UDP Client Server Application Due date: Week 5 T1-18 – 11.45PM AEST, Friday 6th April 2018 ASSESSMENT Weighting: 20% Length: N/A 1 Objectives This assessment item is designed to test your understanding in Java UDP networking, file reading and writing using client/server application development. Assessment task Your task for this assignment is, to design and implement UDP (User Datagram Protocol) API Socket in a client/server model. In java Datagram Socket uses connectionless protocol with basic send and receive methods. This assignment is built on the learning outcomes from the supplied code for UDPClient and UDPServer from week2 lecture and tutorial materials. The UDPClient can send offline text messages to the UDP server and because this protocol is not reliable the server should acknowledge the sender that it has received the message. Multiple clients should be able to send messages to the server and no threading is required on the server. The server waits constantly receiving and acknowledging the clients for the messages it receives. When a message is received by the server the IP address of the client socket is used to determine the client’s location. However multiple clients can also connect from same location when all the clients and the server are running locally on the same machine. So we distinguish each of them by a location which the user needs to enter before the interaction can start with the server. The client should only be able to transmit messages after entering a valid location. A valid name can be any alphanumeric but cannot be empty. The UDPClient should be able to continuously chat to the UDPServer. The server should store all the messages received in to an ArrayList and a timer should be set up to write contents of the ArrayList to a file. COIT13229, 2018 Term One - Page 2 of 8 The timer Schedule can be implemented in java as follows: eg) class WriteToFile extends TimeTask and overrides run() method to do the file writing. Timer tm=new Timer(); tm.schedule(new WriteToFile(),long delay, long period); java inbuilt Collections.sort() can be used to sort the ArrayList before writing to the file. Since the contents of the input and output file is in text format, Java IO classes Scanner and PrintWriter can be used for simplicity. Case Study The Hills School is a leading private educational institution providing primary school education for children across three major cities (Melbourne, Sydney and Brisbane) in Australia. Currently each school maintains a manual log book which each parent/guardian need to sign in and sign off when they drop and pick up their children from school. The school would like to have a centralised system to keep track of this process electronically. When a child is enrolled the school registers a mobile number and a pin which the parent need to use to sign in and sign off. A Kiosk will be set up to run the UDPClient. When the kiosk is powered up in the morning, the school location need to be entered. However in reality this is not required because when the server receives a message from the kiosk the client socket address is used to determine the location. For simplicity and testing since multiple clients can run locally, we are required to enter the location when the client starts and this cannot be empty. The server should persist the client sign in and sign off details to a log file and also display this information on the server side screen. Part 1 Design: Java UDP Networking, and writing to a text file A simple GUI (Graphical User Interface) java application needs to be developed for UDPClient and UDPServer. A JOptionPane can be used to get the location at the start of the Client application and this cannot be empty. A better way is to use a dropdown box for location as in sample screens provided, this eliminated data entry errors. The message to be transmitted consists of mobile number, pin and reason (Sign In/Sign Out). The message fields need to be separated by a colon “:” before dispatching to the server, this is not entered by the user. No information need to be stored on the client side and all validations need to be done on the server side. Client sends to UDP Server a message consisting of: Location: Mobile Number: Pin: Reason: Time UDPServer stamps this message with the IP address from the received client and adds this to an ArrayList : COIT13229, 2018 Term One - Page 3 of 8 Location: Mobile Number: Pin: Reason: Time: IP address of the client socket The server should initially load from an existing text file with a list of phone numbers and pin’s which the admin staff always keep up to date. You can implement this in two parallel String arrays containing mobile numbers and pin’s or use two separate Array Lists. This text file with phone numbers and pin numbers will be provided. Also Java provides String. Split (“:”) to break up the incoming sentence in to an array of Strings On the client side after the message is sent a Status with single (“*”) and when acknowledged by the server should be shown as (“**”) along with any error message if the phone number and pin’s do not match up with the server’s list. Possible states include (“Success”, “Invalid number”, “Invalid Pin”). The server first validates phone number before proceeding to validate the pin number. Every 2 seconds the server should sort the list on the school location and over writes the entire list to a file User should have an option to clear the Array List on the server. Class Diagram SERVERNAME=”localhost” SERVERPORT=8888 COIT13229, 2018 Term One - Page 4 of 8 User Interface Screens Starting Server Starting Clients’ COIT13229, 2018 Term One - Page 5 of 8 COIT13229, 2018 Term One - Page 6 of 8 Error Screens COIT13229, 2018 Term One - Page 7 of 8 Note: since all the applications are running on the same machine locally, the local host IP address (127.0.0.1) is same for every client. Part 2: Program use and test instruction After the implementing the framework, prepare an end user instruction manual about how to use your software along with a brief description where this technology can be used and what happens to the messages if the server is dead or not running. Submission You need to provide the following files in your submission. 1. All java files mentioned in class diagram. In-line comments on the data structures and control statements used in the programs are required. These source code files must be able to be compiled by the standard JDK (Java Development Kit). (http://www.oracle.com/technetwork/java/index.html). 2. A Microsoft Word document to address the issues as specified in the Part 2 above. All the required files must be compressed into a zip file for submission. You must submit your assignment via the unit web site. Any hardcopy or email submission will not be accepted. After the marked assignments are returned, any late submissions will not be accepted. COIT13229, 2018 Term One - Page 8 of 8 Marking Guide
Answered Same DayApr 04, 2020COIT13229Central Queensland University

Answer To: So the pdf fike has the specifications. The zip file submitted has the UDP Clinet and UDP Server...

Snehil answered on Apr 05 2020
155 Votes
1.JPG
2.JPG
3.JPG
4.JPG
5.JPG
6.JPG
7.JPG
8.JPG
Documentation.docx
Server
The server runs in the background when you start the server GUI. Make sure that the file containing the username and password is provided to the server. The name and contents of the file should be in the required order as coded in the server.
The Server continuously waits for clients to send requests and provides appropriate response.
The Server maintains a log of events which are written to a log file every 2 seconds. The user can clear the log using the “Clear Log” button on the UI if needed.
Client
When you start the client UI, it will inquire about the user’s location. The program cannot continue without this information, so it will repeatedly prompt user to enter location if user cancels the request.
Once the client has the users location, it will be displayed on the title bar of the following window. This window contains the main interface of the program.
The user is able to enter Mobile number, pin, reason and then send the information to the server for validation.
Once the request has been sent to the server, its status is displayed so that the user can see if the request is under process or if its processed with the success or failure.
If the server is dead or not running, when client sends the request, it will keep waiting for a response indefinitely unless a timeout was set. If the timeout was set, then the client will stop waiting for a response from server when the timeout expires.
UDP Client/build.xml

Builds, tests, and runs the project UDP Client.


UDP Client/build/built-jar.properties
#Thu, 05 Apr 2018 11:48:39 +0530
C\:\\Programming\\TFTH\\29019\\My\ Work\\UDP\ Client=
UDP Client/build/classes/.netbeans_automatic_build
UDP Client/build/classes/.netbeans_update_resources
UDP Client/build/classes/UDPClient$1.class
synchronized class UDPClient$1 implements java.awt.event.ActionListener {
void UDPClient$1(UDPClient);
public void actionPerformed(java.awt.event.ActionEvent);
}
UDP Client/build/classes/UDPClient$2.class
synchronized class UDPClient$2 implements java.awt.event.ActionListener {
void UDPClient$2(UDPClient);
public void actionPerformed(java.awt.event.ActionEvent);
}
UDP Client/build/classes/UDPClient$3.class
final synchronized class UDPClient$3 implements Runnable {
void UDPClient$3();
public void run();
}
UDP Client/build/cla
sses/UDPClient.class
public synchronized class UDPClient extends javax.swing.JFrame {
private static final String SERVERNAME = localhost;
private static final int SERVERPORT = 8888;
private static String location;
private javax.swing.JButton clearButton;
private javax.swing.JComboBox comboBox;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JTextField mobileTF;
private javax.swing.JTextField pinTF;
private javax.swing.JButton sendButton;
private javax.swing.JLabel statusLabel;
public void UDPClient();
private void initComponents();
private void sendButtonActionPerformed(java.awt.event.ActionEvent);
private void clearButtonActionPerformed(java.awt.event.ActionEvent);
public static void main(String[]);
}
UDP Client/build/classes/UDPClient.form






























































































































UDP Client/dist/README.TXT
========================
BUILD OUTPUT DESCRIPTION
========================
When you build an Java application project that has a main class, the IDE
automatically copies all of the JAR
files on the projects classpath to your projects dist/lib folder. The IDE
also adds each of the JAR files to the Class-Path element in the application
JAR files manifest file (MANIFEST.MF).
To run the project from the command line, go to the dist folder and
type the following:
java -jar "UDP_Client.jar"
To distribute this project, zip up the dist folder (including the lib folder)
and distribute the ZIP file.
Notes:
* If two JAR files on the project classpath have the same name, only the first
JAR file is copied to the lib folder.
* Only JAR files are copied to the lib folder.
If the classpath contains other types of files or folders, these files (folders)
are not copied.
* If a library on the projects classpath also has a Class-Path element
specified in the manifest,the content of the Class-Path element has to be on
the projects runtime path.
* To set a main class in a standard Java project, right-click the project node
in the Projects window and choose Properties. Then click Run and enter the
class name in the Main Class field. Alternatively, you can manually type the
class name in the manifest Main-Class element.
UDP Client/dist/UDP_Client.jar
META-INF/MANIFEST.MF
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.7
Created-By: 1.8.0_92-b14 (Oracle Corporation)
Class-Path:
X-COMMENT: Main-Class will be added automatically by build
Main-Class: UDPClient
UDPClient$1.class
synchronized class UDPClient$1 implements java.awt.event.ActionListener {
void UDPClient$1(UDPClient);
public void actionPerformed(java.awt.event.ActionEvent);
}
UDPClient$2.class
final synchronized class UDPClient$2 implements Runnable {
void UDPClient$2();
public void run();
}
UDPClient.class
public synchronized class UDPClient extends javax.swing.JFrame {
private static final String SERVERNAME = localhost;
private static final int SERVERPORT = 8888;
private static String location;
private javax.swing.JButton clearButton;
private javax.swing.JComboBox comboBox;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JTextField mobileTF;
private javax.swing.JTextField pinTF;
private javax.swing.JButton sendButton;
private javax.swing.JLabel statusLabel;
public void UDPClient();
private void initComponents();
private void sendButtonActionPerformed(java.awt.event.ActionEvent);
public static void main(String[]);
}
UDP Client/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
UDP Client/nbproject/build-impl.xml















































































































































































































Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar




































































































Must set javac.includes
































































































































No tests executed.























































































































































































































































Must set JVM to use for profiling in profiler.info.jvm
Must set profiler agent JVM arguments in profiler.info.jvmargs.agent





























































































































































































































Must select some files in the IDE or set javac.includes













































To run this application from the command line without Ant, try:

java -jar "${dist.jar.resolved}"










































Must select one file in the IDE or set run.class



Must select one file in the IDE or set run.class






















Must select one file in the IDE or set debug.class




Must select one file in the IDE or set debug.class




Must set fix.includes









This target only works when run from inside the NetBeans IDE.








Must select one file in the IDE or set profile.class
This target only works when run from inside the NetBeans IDE.








This target only works when run from inside the NetBeans IDE.






...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here