CodeGym /Courses /Java Multithreading /Big task: Writing a chat application in Java

Big task: Writing a chat application in Java

Java Multithreading
Level 6 , Lesson 15
Available

"Hi, Amigo!"

"Hello, Captain Squirrels, sir!"

"We need an alternative communication channel in the event of a natural disaster."

"Is there something you're not telling me? What natural disaster?"

"Unlike civilians, we must always have a backup communication channel."

"Skype?"

"It's not very reliable, and we don't have control over their servers. We'll write a chat client with its own blackjack... I mean, with its own server and clients!"

"And will it have a graphical interface?"

"If you do exactly what Agent IntelliJ IDEA tells you to do, then there will be a graphical interface."

"Wow, finally! Can I ask another question?"

"Too many questions. As a bonus exercise, you can write a bot to answer your own questions. "Move out!"

"Yes, sir!"

Big task: Writing a chat application in Java - 1
8
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 1)
Chat (part 1)
14
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 2)
Chat (part 2)
8
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 3)
Chat (part 3)
8
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 4)
Chat (part 4)
28
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 5)
Chat (part 5)
28
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 6)
Chat (part 6)
14
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 7)
Chat (part 7)
28
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 8)
Chat (part 8)
14
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 9)
Chat (part 9)
14
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 10)
Chat (part 10)
28
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 11)
Chat (part 11)
14
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 12)
Chat (part 12)
14
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 13)
Chat (part 13)
28
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 14)
Chat (part 14)
14
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 15)
Chat (part 15)
28
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 16)
Chat (part 16)
8
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 17)
Chat (part 17)
14
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 18)
Chat (part 18)
28
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 19)
Chat (part 19)
14
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 20)
Chat (part 20)
28
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 21)
Chat (part 21)
8
Task
Java Multithreading, level 6, lesson 15
Locked
Chat (part 22)
Chat (part 22)
Comments (28)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Untitled by Anon Level 49, Germany
11 June 2023
Ugh...part 16 took me forever. An advice: no matter how hard intelliJ is goading you, don't use try-catch. It will fail the IOException requirements.
Alex Buyanov Level 47, Netherlands
4 November 2022
In part 16, switch statement (which you normally use to check enum values) isn't allowed. You have to use if instead
Maksim Krasnov Level 47, Kyiv, Ukraine
27 September 2022
An interesting task showing the architecture of a real application, nice.
阿狼 Level 32, Zhengzhou, China
26 July 2022
d41
TomL Level 30, Prague, Czech Republic
25 February 2022
Hey, love this Big Task! Super useful, codeGym!! 👍
Ibrahim Level 24, Sheffield, United Kingdom
21 February 2022
For more info on client server architecture and socket server architecture: https://codegym.cc/groups/posts/288-part-2-lets-talk-a-bit-about-software-architecture https://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html
Lisa Level 41
26 September 2021
Solving this task was really nice. Client and server are well designed and there are some smart ideas behind it. Much of what has been learned so far is realized here, but the difficulty level is very demanding in parts if you compare it with the last big task. The introduction to Swing, however, is pathetic. And a pity is that you can not use a switch statement to solve part 16. Why? It's the killer feature of an enum that you can use it in switch.
Andrei Level 41
7 May 2021
Nice, I liked it! Although quite difficult and I don't fully understand how it works.
5 April 2021
It's weird that in part 9: 1. In method notifyUsers, I really expected to send a name of new added user as message data, but instead it's required to send remote username that you notify. 2. Why is connection parameter needed in the method if I can get all connections from connectionMap field?
5 April 2021
Actually, I figured that it's about sending to new User information about other Users, which took me a while to get.
MaGaby2280 Level 41, Guatemala City, Guatemala
25 November 2020
Took me a week, but I am proud to have completed it!!!