An introduction to Object-Oriented Programming as Modeling

Ole Lehrmann Madsen
Aarhus University

Birger Møller-Pedersen
University of Oslo

OBS! This site is under construction. If you by coincidence arrive here, you are welcome to read the content, but be aware that everything including the structure, text, figures and layout are preliminary and may be changed.

This book is a general introduction to object-oriented programming with emphasis on modeling.

Most textbooks on object-oriented programming do not consider modeling but focus on the technical aspects of a programming language.  This is despite the fact that there is a large modeling community around UML and other modeling languages where focus is on modeling, but here the links to programming is often weak. In practice we have two more or less separate communities, one around programming and one around modeling. 

In this book, we provide an introduction to object-oriented programming as modeling. We thus emphasize modeling and we demonstrate that modeling can be done as part of programming.  This is not to say that UML should not be used, but our claim is that you can do without.

The first object-oriented language, SIMULA, was intended for programming as well as modeling, but unfortunately this is not central in mainstream object-oriented programming. 

We believe that the SIMULA approach is the right way to do it. The example programs in this book are therefore made in a simple modern language that also is intended for programming as well as modeling, that is we go back to the future as pioneered by SIMULA.

The language being used is called qBeta and is derived from the Beta language. A preliminary description of qBeta may be found here.

The plan is to supply descriptions of how to make such programs in mainstream languages like, C++, Java, C#, and Python. We do, however, think that the current version may be a useful supplement to most courses on object-oriented programming and we think most instructors should be able to build the bridge between this book and textbooks about a given programming language.

Some people may find it confusing that students may have to deal with syntax of the language in this book and then in addition the syntax of a language like C++, Java, C#, and Python. We do, however, think that it is essential that students are trained in understanding language mechanisms independent of syntax of mainstream languages.

The intended readers of this book are students and others that want to learn programming and more specifically object-oriented programming. No previously knowledge of programming is required. We expect the readers to be at the age of 17-19 or older.

Students should start reading the introduction and subsequent chapters on objects and classes. They may then alternate between reading about similar mechanism of a mainstream language and further chapters in this book. It is essential that they try out the examples provided in this book.

The preface is only relevant if you want to know the background/motivation for writing this book.

The field below is a simple preliminary search field that search the pages in this book.

© Copyright by Ole Lehrmann Madsen and Birger Møller-Pedersen 2023.