fishysheep
Programmer
hi
I'm new to OOP and I've been working my way through the "Bank Account" class. Now i understand the logic of it all but what I can't grasp is its real-life use. All I can think when I'm doing the Bank Account class/derived classes is that this information belongs in a database. They only benefit I can see is that using classes could stop a programmer applying certain functions to an object. But surely that only applies if the original class is non-inheritable and doesn't that somewhat defeat the reasoning behind OOP?
I'd be grateful for any explanation of why (as an example) Bank Accounts are better held as classes then stored in a database. Apologies if this is a stupid newbie question.
I'm new to OOP and I've been working my way through the "Bank Account" class. Now i understand the logic of it all but what I can't grasp is its real-life use. All I can think when I'm doing the Bank Account class/derived classes is that this information belongs in a database. They only benefit I can see is that using classes could stop a programmer applying certain functions to an object. But surely that only applies if the original class is non-inheritable and doesn't that somewhat defeat the reasoning behind OOP?
I'd be grateful for any explanation of why (as an example) Bank Accounts are better held as classes then stored in a database. Apologies if this is a stupid newbie question.