I'm just looking for opinions on my situation in relation to oop. I'm a beginner at the moment. Basically in my site I have files, photos and I also have messages.
Therefore I currently have a "message" class and a "file" class. Both of these currently extend a class called "general" which has several methods, all of which both of these classes make use of hence the extension of the general class in each.
However the both of these classes now need to make use of another method called "getAuthor" which I haven't included anywhere just yet. The thing is I also have another class called "photo" which DOES NOT extend the general class (yet) however it DOES need to make use of the "getAuthor" method.
What is the best way of handling this situation? Perhaps by creating a new class called "Author" and instantiating that class inside the other classes wherever it is needed? The other option seems to be putting getAuthor in the general class and then extending the general class in the photo class but considering the fact that the photo class uses none of the other methods in the general class this seems bad practice?