A Java-based mobile phone virus simulation using Swing and Multithreading. Phones move randomly on the screen and an infection spreads when an infected phone gets close to a healthy phone. The repair shop helps infected phones recover.
This was a 2nd-year university project I made, focusing on DSA tecnhniques.
- Phones move randomly on the screen.
- Infection spreads if a healthy phone is near an infected phone (note proximity is base on black dot and is a very near distance for infection).
- A repair shop heals infected phones.
- Multithreaded simulation to handle phone movement independently.
- Synchronization techniques to prevent race conditions.
- Controls:
- β¬οΈ β Add a new phone.
- V β Infect a random phone.
