Object Oriented Programming in C++
- In our real life, we are used to deal with objects. If you want a toast, you use your toaster. For the dishes, you use your dishwasher. You use a TV, VCR, washing machine, and tools such as a drill. Do you know how your washing machine works in all detail? Think of all those applicances/devices as objects which are tools providing a service, usually without making you aware of their inner workings.
- If you transfer that tool concept to programming, you will want a file manager object if you deal with files, a display object to display your graphics, and so on. Like in your real life.
- Only years of procedural computer language training makes us perceive Fortran and C as the natural way of designing programs. It is really the way the F77 and C compilers need us to pre-arrange their work to make the job easier for them.
- After a while the natural way of thinking will come back and you will see OO as the natural way of attacking problems.
- Except for the small hurdle of learning a modest amount of new syntax constructs, C++ is a lot easier to master than Fortran (I hope that you will agree with me after this course).