I've read Head First Java, and I understand how OOP works. Here's my problem: I'm a PHP programmer, and while I've used OOP in PHP, I'm having trouble figuring out what should be an object and what methods to give it.
For example, let's say I have a app that allows people to log in and edit a document. Why should the document be an object if there will ever only be one instance? Should I give the deleteDocument()
method to the document object or the admin object? The document is the one being deleted, but the admin is the one performing the action.
So my real question is, coming from a procedural background, how do I figure out what should be objects and what should have what methods?