Logout

Home OOP Option Last Next

D.2.8

Describe the disadvantages of OOP.

 

Teaching Note:

For example, increased complexity for small problems; unsuited to particular classes of problem.

AIM 9 Develop an appreciation of the limitations of OOP.


 

Sample Question:

sdfsdfsf

JSR Notes:

This is a curious assessment statement to note, since in a way it's counter to the whole purpose of the OOP Option. Never-the-less:

- When Not Working With Objects

Object-oriented programming suits situations where you are making instances of a certain class of object. So whenever you are programming and you come across a time where you are using data, and then using a slightly different set of that data again, OOP is well suited. But if you are doing something which does not work with "sets" of data, then there is no need for objects. Though do note that most of what we do with technology in a practical way takes advantage of a computer's ability to work with large sets of data, so OOP usually does makes sense.


- Too Much Bother for Simple Situations

The other case, as mentioned, is when it's just too much bother. There can be two reasons for this. It could still be an object oriented situation, but you are using only a few instances of something, so maybe you don't want a whole other class dedicated to those few items.

And also if the program itself is very short/"simple" - but it's still useful for a computer to do in instead of a human - then the bother of having separated classes may not be worth it.

 

- Projects tend to be Bigger, and so are Slower

There are simply more classes, and more interactions between object of those classes. And so, particularly on limited hardware, an OOP program will tend to run slower than its non-OOP equivalent.

 

 

 

(Of course, each one of these disadvantages suggests a corollary advantage for OOP, namely when it's not a simple situation you are programming for, and when the problem is big enough that it can most certainly be usefully decomposed and modularized. And further, with an OOP approach, even if initially simple or small, the program is ready for growth and extensibility. But, that's not the point of this particular assessment statement...)