Learn Association — a key concept for LLD interviews.
Interactive — Try it yourself!
How to use
1See Teacher and Student boxes connected by a line
2Click "Delete Teacher" — Student still exists!
3Both objects have independent lifecycles
4Toggle code view to see the implementation
In a nutshell
Association is a "uses" relationship. Objects know about each other but exist independently. Teacher uses Student, but neither owns the other. Weakest relationship type.