let's say i want to create a movie database software.
i need a class Actor that will have attribute as name, surname, dob, awards, and it should also have an array of "movie" object.
i also need the class Movie, that will have attribute as title, duration, year, but it should also have an array of "actor" object. to represent the cast of the movie.
Actor object need a list of all the movie done by that actor, just as the movie object need a list of all the actors that played in it. that gets quite messy cause it's a class containing another one and viceversa, the compiler get stuck.
which would be the right way to represent this situation?