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
Three - Object-Oriented Programming Concepts
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
The use of object-oriented (OO) design and object-oriented programming (OOP) methods is becoming increasingly popular. Thus, it is useful to have an introductory understanding of OOP and some of the programming features of OO languages. You can develop OO software in any high-level language like C or Pascal. However, newer languages such as Ada, C++, and F90 have enhanced features that make OOP much more natural, practical, and maintainable. Appearing before F90, C++ currently is probably the most popular OOP language, yet F90 was clearly designed to have almost all of the abilities of C++. However, rather than study the new standards, many authors simply refer to the two-decade-old F77 standard and declare that Fortran can not be used for OOP. Here we will overcome that misinformed point of view.
Modern OO languages provide the programmer with three capabilities that improve and simplify the design of such programs: encapsulation, inheritance, and polymorphism (or generic functionality). Related topics involve objects, classes, and data hiding. An object combines various classical data types into a set that defines a new variable type or structure. A class unifies the new entity types and supporting data that represent its state with routines (functions and subroutines) that access or modify those data, or both. Every object created from a class, by providing the necessary data, is called an instance of the class. In older languages like C and F77, the data and functions are separate entities.
- Type
- Chapter
- Information
- Object-Oriented Programming via Fortran 90/95 , pp. 36 - 55Publisher: Cambridge University PressPrint publication year: 2003