I'm looking to see what other's do in situations where a class is dependant on other classes. For instance if the class User needs to use the class Database.
For instance, do you first create an instance of Database and pass that into a User object via the constructor or create the instance of the Database class *in* User's constructor? Or something completely different.
It's obviously dependant on the project, but I'm just speaking generally on how you've done it in the past and how you came to that decision. Just looking to spur some discussion.