I am still a rookie in Java programming. Lately I am struggling with class relationships, I know the theory part of dependency, aggregation and composition but not able to implement the same in my code correctly, especially in the object declaration part.
For example let's take a ticketing system where there is a passenger class and a ticket class. And ticket class is related to the train class. So how to move ahead. Plz help