Simulating one of the popular scenes from Seinfeld, where Jerry, George, Marla and Stacy greet each other. The challenge is to create multiple threads and have each thread notify the next one. A fun way to practice multi-threaded programming!
Here is the scene:
https://www.youtube.com/watch?v=UMSW_v0apQY&t=60s
https://holyclip.net/clip/bkmmJFmS?end=4.9
And the code's output:
Jerry -> Hi Marla
Marla -> Jerry
Jerry -> George, Marla
George -> Marla
Marla -> George. Jerry, Stacy
Jerry -> Stacy
Stacy -> Jerry
Jerry -> George Stacy
George -> Stacy
Stacy -> George
Jerry -> George
George -> Jerry Marla Stacy