From 80db02fdf19767f6c1d1aa5f1eddac0d9ef8f616 Mon Sep 17 00:00:00 2001
From: "james.timberlake" <james.timberlake@nps.edu>
Date: Wed, 21 Aug 2024 10:49:42 -0700
Subject: [PATCH] HW1 javadoc

---
 .../homework1/Timberlake/Client.java          | 50 ++++++++++++++++++-
 .../homework1/Timberlake/Server.java          | 50 ++++++++++++++++++-
 2 files changed, 96 insertions(+), 4 deletions(-)

diff --git a/assignments/src/MV3500Cohort2024JulySeptember/homework1/Timberlake/Client.java b/assignments/src/MV3500Cohort2024JulySeptember/homework1/Timberlake/Client.java
index d905f89d60..e5e366e172 100644
--- a/assignments/src/MV3500Cohort2024JulySeptember/homework1/Timberlake/Client.java
+++ b/assignments/src/MV3500Cohort2024JulySeptember/homework1/Timberlake/Client.java
@@ -6,10 +6,56 @@ import java.net.InetAddress;
 import java.util.Scanner;
 
 /**
- *
- * @author Jack
+ * <p>
+ * The simplest TCP network program, opening a socket between a client and server
+ * and send a message from the client to the server.
+ * It listens for any socket connection response, either from telnet (telnet localhost 2317)
+ * or another client program. 
+ * Once a socket connection is established, the client sends messages to the 
+ * server and the server echos the message back to the client.
+ * 
+ * <p>
+ * As an alternative to running the Windows (or other operating system) console, 
+ * you can instead run the NetBeans terminal window.  If you are on Windows,
+ * NetBeans is looking for Cygwin installation (for Unix-like compatibility)
+ * with details at <a href="https://savage.nps.edu/Savage/developers.html#Cygwin" target="blank">Savage Developers Guide: Cygwin</a>.
+ * Modifying this program is the basis for Assignment 1.
+ * </p>
+
+ * <p>
+ * Notice that "Client Received" matches 
+ * what is written by the code below, over the output stream.
+ * </p>
+ *  * <p>
+ * Notice that "Server Received" matches the string sent by the client.
+ * </p>
+ * <p>
+ * After the echoed message is received by the client, the program exits.
+ * For example:
+ * Enter message to send to server: hello
+ * Client received: Hello From Server, I received: hello
+ * [Program Exits]
+ * </p>
+ * 
+ * @see <a href="../../../src/TcpExamples/TcpExample1TerminalLog.txt" target="_blank">TcpExample1TerminalLog.txt</a>
+ * @see <a href="../../../src/TcpExamples/TcpExample1NetBeansConsoleTelnet.png" target="_blank">TcpExample1NetBeansConsoleTelnet.png</a>
+ * @see <a href="../../../src/TcpExamples/TcpExample1NetBeansConsoleTelnet.pdf" target="_blank">TcpExample1NetBeansConsoleTelnet.pdf</a>
+ * @see <a href="../../../src/TcpExamples/TcpExample1ScreenshotNetcat.png" target="_blank">TcpExample1ScreenshotNetcat.png</a>
+ * @see <a href="../../../src/TcpExamples/TcpExample1ScreenshotTelnet.png" target="_blank">TcpExample1ScreenshotTelnet.png</a>
+ * @see <a href="https://savage.nps.edu/Savage/developers.html#Cygwin" target="blank">Savage Developers Guide: Cygwin</a>
+ * @see <a href="https://savage.nps.edu/Savage/developers.html#telnet" target="blank">Savage Developers Guide: telnet</a>
+ * 
+ * @author mcgredo
+ * @author brutzman@nps.edu
+ * @author james.timberlake@nps.edu
  */
 public class Client {
+
+    /**
+     * Default constructor
+     * Program invocation, execution starts here
+     * @param args command-line arguments
+     */
     public static void main(String[] args) {
         DatagramSocket socket = null;
         Scanner scanner = new Scanner(System.in);
diff --git a/assignments/src/MV3500Cohort2024JulySeptember/homework1/Timberlake/Server.java b/assignments/src/MV3500Cohort2024JulySeptember/homework1/Timberlake/Server.java
index 54b88a994b..c9cae31dc1 100644
--- a/assignments/src/MV3500Cohort2024JulySeptember/homework1/Timberlake/Server.java
+++ b/assignments/src/MV3500Cohort2024JulySeptember/homework1/Timberlake/Server.java
@@ -5,10 +5,56 @@ import java.net.DatagramSocket;
 import java.net.InetAddress;
 
 /**
- *
- * @author Jack
+ * <p>
+ * The simplest TCP network program, opening a socket between a client and server
+ * and send a message from the client to the server.
+ * It listens for any socket connection response, either from telnet (telnet localhost 2317)
+ * or another client program. 
+ * Once a socket connection is established, the client sends messages to the 
+ * server and the server echos the message back to the client.
+ * 
+ * <p>
+ * As an alternative to running the Windows (or other operating system) console, 
+ * you can instead run the NetBeans terminal window.  If you are on Windows,
+ * NetBeans is looking for Cygwin installation (for Unix-like compatibility)
+ * with details at <a href="https://savage.nps.edu/Savage/developers.html#Cygwin" target="blank">Savage Developers Guide: Cygwin</a>.
+ * Modifying this program is the basis for Assignment 1.
+ * </p>
+
+ * <p>
+ * Notice that "Client Received" matches 
+ * what is written by the code below, over the output stream.
+ * </p>
+ *  * <p>
+ * Notice that "Server Received" matches the string sent by the client.
+ * </p>
+ * <p>
+ * After the echoed message is received by the client, the program exits.
+ * For example:
+ * Enter message to send to server: hello
+ * Client received: Hello From Server, I received: hello
+ * [Program Exits]
+ * </p>
+ * 
+ * @see <a href="../../../src/TcpExamples/TcpExample1TerminalLog.txt" target="_blank">TcpExample1TerminalLog.txt</a>
+ * @see <a href="../../../src/TcpExamples/TcpExample1NetBeansConsoleTelnet.png" target="_blank">TcpExample1NetBeansConsoleTelnet.png</a>
+ * @see <a href="../../../src/TcpExamples/TcpExample1NetBeansConsoleTelnet.pdf" target="_blank">TcpExample1NetBeansConsoleTelnet.pdf</a>
+ * @see <a href="../../../src/TcpExamples/TcpExample1ScreenshotNetcat.png" target="_blank">TcpExample1ScreenshotNetcat.png</a>
+ * @see <a href="../../../src/TcpExamples/TcpExample1ScreenshotTelnet.png" target="_blank">TcpExample1ScreenshotTelnet.png</a>
+ * @see <a href="https://savage.nps.edu/Savage/developers.html#Cygwin" target="blank">Savage Developers Guide: Cygwin</a>
+ * @see <a href="https://savage.nps.edu/Savage/developers.html#telnet" target="blank">Savage Developers Guide: telnet</a>
+ * 
+ * @author mcgredo
+ * @author brutzman@nps.edu
+ * @author james.timberlake@nps.edu
  */
 public class Server {
+
+    /**
+     * Default constructor
+     * Program invocation, execution starts here
+     * @param args none
+     */
     public static void main(String[] args) {
         DatagramSocket socket = null;
         
-- 
GitLab