| Traditional Programming Versus OOP |
|
|
| Wednesday, 31 January 2001 15:26 |
Traditional Programming Versus Object-Oriented ProgrammingThat’s about it for the general features of OOP. There are many other language-specific features that further the goals of handling complexity and enabling reuse, but with the tools from this primer, you’ve already tackled the hardest part: understanding the shift in programming philosophy that has led to OOP. Now that you understand the basic concepts of OOP, you can go ahead and learn an OOPL like Java or C++ and know how to use these languages to tackle problems from an object perspective.
Assignment
To somewhat simulate a real development project, assume that at first all you were assigned was #1 (rectangle and isosceles triangle), then later you were told to create a parallelogram. The best way to read the code will be to first read trad-shapes.cpp, the solution using traditional structured programming. Then next read oop-shapes.cpp, the object-oriented solution. Here’s the class hierarchyThis class hierarchy diagram is based on the universal modeling language (UML), a standard way to draw object-oriented class hierarchies; but it doesn’t follow UML exactly. that is used for the solution:
|
| Last Updated on Tuesday, 28 October 2008 14:32 |