Book contents
- Frontmatter
- Contents
- Preface
- One Program Design
- Two Data Types
- Three Object-Oriented Programming Concepts
- Four Features of Programming Languages
- Five Object-Oriented Methods
- Six Inheritance and Polymorphism
- Seven OO Data Structures
- Eight Arrays and Matrices
- Nine Advanced Topics
- Appendix A Fortran 90 Overview
- Appendix B Selected Exercise Solutions
- Appendix C Companion C++ Examples
- Bibliography
- Glossary of Object-Oriented Terms
- Index
Five - Object-Oriented Methods
Published online by Cambridge University Press: 15 October 2009
- Frontmatter
- Contents
- Preface
- One Program Design
- Two Data Types
- Three Object-Oriented Programming Concepts
- Four Features of Programming Languages
- Five Object-Oriented Methods
- Six Inheritance and Polymorphism
- Seven OO Data Structures
- Eight Arrays and Matrices
- Nine Advanced Topics
- Appendix A Fortran 90 Overview
- Appendix B Selected Exercise Solutions
- Appendix C Companion C++ Examples
- Bibliography
- Glossary of Object-Oriented Terms
- Index
Summary
Introduction
In Section 1.7 we outlined procedures that should be considered while conducting the object-oriented analysis and object-oriented design phases that are necessary before the OOP can begin. Here we will expand on those concepts, but the reader is encouraged to read some of the books on those subjects. Many of the references on OOA and OOD rely heavily on detailed graphical diagrams to describe the classes, their attributes and states, and how they interact with other classes. Often those OO methods do not go into any programming language–specific approaches. Our interest is on OOP, and so we usually will assume that the OOA and OOD have been completed and supplied to us as a set of tables that describe the application and possibly a software interface contract. Sometimes we will use a subset of the common OO methods diagrams to represent the attributes and members of our classes graphically. Since they are being used for OOP, the graphical representations will contain, in part, the intrinsic-data type descriptions of the language being employed as well as the derived types created with them.
The Drill Class
Our first illustration of typical OO methods will be to apply them to a common electric drill. It feeds a rotating cutting bit through a workpiece, thereby removing a volume of material. The effort (power or torque) required to make the hole clearly depends on the material of the workpiece as well as the attributes of the drill.
- Type
- Chapter
- Information
- Object-Oriented Programming via Fortran 90/95 , pp. 119 - 136Publisher: Cambridge University PressPrint publication year: 2003