This is a programming idea / style that we are going over in my Pascal class. Basically put you use only a set number of subroutines that actually knows the internal workings of your type (ie a struct (record in pacal), array, linked list, etc). All other subroutines use this set of routines to put data in and get data out.
The idea behind it is that if you needed to change how the data was being stored you just have to change these routines without having to change the entire program.
The real life example we were given was that of a TV and it's remote. The user knows how to use the remote to change the channel but has no idea how the TV actually changes the channel. So that if you were to change the TV you wouldn't have to change anything with the user interface (the buttons on the remote).
Without getting into ADT vs OOP what are your thoughts on this style?



LinkBack URL
About LinkBacks


