You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-5Lines changed: 31 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,41 @@ Modify [App.java](src/main/java/com/cbfacademy/App.java) to connect to the main
16
16
17
17
You will need to use `HttpURLConnection`, `BufferedReader` and `InputStreamReader` classes.
18
18
19
-
Whenever possible, use the try-with-resources construct we saw earlier in the course, and ensure to release all resources.
19
+
Whenever possible, use the try-with-resources construct we saw earlier in the course, and ensure all resources are released.
20
+
21
+
## :white_check_mark: Verify Your Implementation
22
+
23
+
To verify that your code works as expected, run the tests. In your terminal, ensure that you are in the root of this repository, then run the following command:
24
+
25
+
```shell
26
+
./mvnw clean test
27
+
```
20
28
21
29
## :phone: Client & Server
22
30
23
-
Create a simple program with two classes:
24
-
- a `ExerciseServer` class which uses a `ServerSocket` to listen for connections on `localhost:4040`, then prints message it receives on the screen.
25
-
- a `ExerciseClient` class which requests a connection to server, sends a simple text message to the server.
31
+
Create two executable classes:
32
+
- a `SocketServer` class which uses a `ServerSocket` to listen for connections on `localhost:4040`, then prints message it receives on the screen.
33
+
- a `SocketClient` class which requests a connection to server, sends a simple text message to the server.
34
+
35
+
Ensure all resources created in your programmes are released appropriately. To test your code manually, you'll need to run each application in a separate terminal:
0 commit comments