Reusability of Code
25 MARCH 2013 (Week 1)
Designing and coding a procedure, module, or object can be complex and time consuming. Once these elements of a computer program are working correctly, it makes sense to use the code as often as practical.
Code reusability has become a valuable part of adding efficiency to computer programming. When it comes to solving the problem of code/data separation, the use of Object –Oriented Programming has played a big role in the rising of object reusability.
An object is not considered a standalone program; instead it is the service being used in the programs. For example, Sharon is a programmer who has developed an object for rendering 3D images. She is a math whiz and has extensive knowledge about computer graphics, so her object is coded to perform the necessary 3D mathematical operations and handle the computer’s video hardware. Tom, who is writing a program for an architectural firm, needs his application to display 3D images of buildings. Because he is working under a tight deadline and does not possess a great deal of knowledge about computer graphics, he purchases the code from Sharon for a monetary value.
The programmer has his own way of adding his own security to his software,
for instance when one of his object’s internal information is hidden from the outside code and
another person is restricted to the object’s method, this way the program is protected from any
When the programmer are dealing with OOP code, the outside part does not need to
know what the format, or internal structure, and the data of that object consist of.
The only thing the code needs to do is interact with the objects method. Should the Programmer
decide to make other changes to the objects internal data, the changes will also be applied to the
objects methods, in order for properly...
Please join StudyMode to read the full document