[comp.lang.eiffel] Teaching object oriented programming

mikpa@massormetrix.ida.liu.se (Mikael Patel) (08/01/89)

Dear Object-Oriented Programmers out there in Net-Land. I need your help!

I am working on a course on Object Oriented Programming (OOP) for third and 
fourth year students on our civil engineer lines. I'd like some advice
and help on some problems:

1. Are there any classical examples (such as the Dining Philosofers, and
the Readers-Writers Problem from Concurrent Programming) that well 
illustrate the problems and ideas behind OOP?

2. What are the landmark publications within this area? 

3. Teaching OOP seems easy when it comes to concept as there exists a
number of well established metaphors. The real problem seems to be
methodology. Does anyone have any pointer to object oriented 
programming methodologies?

4. When teaching functional programming languages such as Lisp the
interpreter (eval, apply) is often used to better understand the
execution model and how it may be altered. Is it essential to explain
the virtual machine of an object oriented language in the same manor? 
And if so what depth? The Smalltalk execution model is quite complex
in detail.

Mikael R.K. Patel
Researcher and Lecturer
Computer Aided Design Laboratory
Department of Computer and Information Science
Linkoeping University, S-581 83  LINKOEPING, SWEDEN

Phone: +46 13281821
Telex: 8155076 LIUIDA S			Telefax: +46 13142231
Internet: mip@ida.liu.se		UUCP: ...!sunic!liuida!mip
Bitnet: MIP@SELIUIDA			SUNET: LIUIDA::MIP

eberard@ajpo.sei.cmu.edu (Edward Berard) (08/02/89)

In article <1318@massormetrix.ida.liu.se>, mikpa@massormetrix.ida.liu.se (Mikael Patel) writes:
> Dear Object-Oriented Programmers out there in Net-Land. I need your help!
> 
> I am working on a course on Object Oriented Programming (OOP) for third and 
> fourth year students on our civil engineer lines. I'd like some advice
> and help on some problems:
> 
> 1. Are there any classical examples (such as the Dining Philosofers, and
> the Readers-Writers Problem from Concurrent Programming) that well 
> illustrate the problems and ideas behind OOP?
> 
There seem to be three classes of example problems:

	- Classroom Exercises/Book Examples: These are usually small,
	  and are often programming language specific. Examples
	  include the five design problems in Booch's book: "Software
	  Engineering With Ada, 2nd Edition," Benjamin-Cummings, Menlo
	  Park, California, 1987, the "Cruise Control" and "Host at
	  Sea Buoys" problems in Booch's February 1986 IEEE article
	  (see answer to next question), and the case studies in
	  chapter 12 of Bertrand Meyer's book on "Object-Oriented
	  Software Construction" (see answer to next question).

	- Real-Time Object-Oriented Development Examples: See, for
	  example the work done at the Software Engineering Institute
	  in Pittsburgh, Pennsylvania by Mike Rissman's group "An OOD
	  Paradigm for Flight Simulators," Technical Report
	  CMU/SEI-87-TR-43 (ESD-TR-87-206). [Phone number for the SEI
	  is (412) 268-7700.] There is also the ever popular "elevator
	  scheduler and controller" example which is often used to
	  compare methodologies. You may find complete examples of
	  this in past professional seminars conducted by the ACM.

	  Remember that there is a significan difference between
	  real-time and non-real-time object-oriented problems. For
	  example, "objects with life" (objects which are capable of
	  spontaneously changing their own state) are much more
	  prevalent in real-time systems, as are concurrency and
	  synchronization issues.

	- Information Systems (IS)/Non-Real-Time Examples: Although IS
	  systems are concpetually easier to create than are their
	  real-time counterparts, relatively few public domain
	  examples exist. You might check out some of the OODBMS
	  references in the answer to the next question.

One of the major failings of university software engineering education
is its lack of methodology training. While there is plenty of
object-oriented programming (read "object-oriented coding"), there is
very little attention paid to non-coding parts of the life-cycle. 

If you find any object-oriented examples of any size, you will find
that they often address such issues as "object-oriented domain
analysis," "object-oriented requirements analysis," and
"object-oriented design." Unfortunately you will find precious few
references to "object-oriented development in the large" (OODIL) --
but there are a few.

> 2. What are the landmark publications within this area?

                Readings In Object-Oriented Technology
                         by Edward V. Berard
                  Berard Software Engineering, Inc.

If you are interested in reading about any rapidly evolving
technology, it is best to keep the following in mind:

%       Read more than one source. Look for sources which have
	different, and possibly conflicting, views of the material.
	It is often difficult to determine fundamental facts when
	only one viewpoint is present.

%       Very often, authors confuse concepts with implementations. Ask
        yourself if the author is discussing a concept, or a
        particular implementation of the concept.

%       Always be on the lookout for new sources. In the software
        technology arena in particular, significant changes can take
        place in less than a month.

%       Take care to distinguish between differing viewpoints and
        conflicting viewpoints.

There are many topic areas in object-oriented software technology, and
literally thousands of books, articles, tutorials, and proceedings
devoted, in whole, or in part, to object-oriented software concepts.
What we will present here is some of the representative reading
material. Just because an item is included in this reading list does
not mean that it is recommended without qualifications, nor does it
mean that it is an authoritative source on a topic. However, the
material listed here is intended to help you understand more about the
technology.

                     Object-Oriented Programming

Object-oriented programming books most often tend to focus on
programming language aspects of object-oriented technology. However,
many fundamental concepts can be found in the books mentioned below:

[Cox, 1986]. B.J. Cox, Object Oriented Programming: An Evolutionary
Approach, Addison-Wesley, Reading, Massachusetts, 1986.

[Goldberg and Robson, 1983]. A. Goldberg and D. Robson, Smalltalk-80:
The Language and Its Implementation, Addison-Wesley, Reading,
Massachusetts, 1983.

[Meyer, 1988]. B. Meyer, Object-Oriented Software Construction,
Prentice-Hall, Englewood Cliffs, New Jersey, 1988.

[Keene, 1989]. S.E.Keene, Object-Oriented Programming in Common Lisp,
Addison-Wesley, Reading, Massachusetts, 1989.

[Stroustrup, 1986a]. B. Stroustrup, The C++ Programming Language,
Addison-Wesley, Reading, Massachusetts, 1986.

                Object-Oriented Requirements Analysis

There are a number of publicly available courses on object-oriented
requirements analysis. Since the technology is still new, these
courses present many differing viewpoints and approaches.  There is,
however, one book on the topic:

[Shlaer and Mellor, 1988]. S. Shlaer and S.J. Mellor, Object-Oriented
Systems Analysis: Modeling the World In Data, Yourdon Press:
Prentice-Hall, Englewood Cliffs, New Jersey, 1988.

                  Object-Oriented Design/Development

Most of the work which has been done in the area of object-oriented
life-cycle issues, outside of object-oriented programming, has been
accomplished within the Ada community. Some representative sources on
OOD are:

[Abbott, 1983]. R.J. Abbott, "Program Design by Informal English
Descriptions," Communications of the ACM, Vol. 26, No. 11, November
1983, pp. 882 - 894.

[Booch, 1982a]. G. Booch, "Object Oriented Design," Ada Letters, Vol.
I, No. 3, March- April 1982, pp. 64 - 76.

[Booch, 1986a]. G. Booch, "Object Oriented Development," IEEE
Transactions on Software Engineering, Vol. SE-12, No. 2, February
1986, pp. 211 - 221.

[Goldsack, 1985]. S.J. Goldsack, Ada for Specification : Possibilities
and Limitations, Cambridge University Press, Cambridge, United
Kingdom, 1985.

[Heitz, 1988]. M. Heitz, "HOOD: A Hierarchical Object-Oriented Design
Method,"  Proceedings of the Third German Ada Users Congress, January
1988, Gesellschaft fur Software Engineering, Munich, West Germany, pp.
12-1 - 12-9.

[Masiero and Germano, 1988]. P. Masiero and F.S.R. Germano, "JSD As An
Object-Oriented Design Method," Software Engineering Notes, Vol. 13,
No. 3, July 1988, pp. 22 - 23.

[Seidewitz and Stark, 1986b]. E. Seidewitz and M. Stark, General
Object-Oriented Software Development, Document No. SEL-86-002, NASA
Goddard Space Flight Center, Greenbelt, Maryland, 1986.

[Stark and Seidewitz, 1987]. M. Stark and E.V. Seidewitz, "Towards a
General Object-Oriented Ada Life-Cycle," Proceedings of the Joint Ada
Conference, Fifth National Conference on Ada Technology and Washington
Ada Symposium, U.S. Army Communications-Electronics Command, Fort
Monmouth, New Jersey, pp. 213 - 222.

                      Object-Oriented Databases

Object-oriented databases are not the same thing as relational
databases. In effect, object-oriented database technology today is at
the same point relational database technology was in the late 1970s.
(I know more than a few vendors who would disagree with this point.)
Some representative information on the subject can be found in:

[Babcock, 1987]. C. Babcock, "Object is DBMS Focus," ComputerWorld,
Vol. XXI, No. 40, October 5, 1987, page 25.

[Blaha et al, 1988]. M.R. Blaha, W.J. Premerlani, and J.E. Rumbaugh,
"Relational Database Design Using an Object-Oriented Approach,"
Communications of the ACM, Vol. 31, No. 4, April 1988, pp. 414 - 427.

[Bochenski, 1988]. B.A. Bochenski, "On Object-Oriented Programming,
Databases," Software, Vol. 8, No. 11, September 1988, page 42.

[Dittrich and Dayal, 1986]. K. Dittrich and U. Dayal, Editors,
Proceedings of the 1986 International Workshop on Object-Oriented
Database Systems, IEEE Catalog Number 86TH0161-0, IEEE Computer
Society Press, Washington, D.C., 1986.

[Scannell, 1988]. T. Scannell, "Freeform DBMS the 'Object' of Startup
Company's Affection," Mini-Micro Systems, Vol. XXI, No. 2, February
1988, pp. 16 - 22.

[Shriver and Wegner, 1987]. B. Shriver and P. Wegner, Editors,
Research Directions in Object-Oriented Programming, The MIT Press,
Cambridge, Massachusetts, 1987.

[Weiss, 1987]. R. Weiss, "Why Object-Oriented Databases?," Electronic
Engineering Times, No. 465, December 21, 1987, page 23.

[Wile and Allard, 1987]. D.S. Wile and D.G. Allard, "Worlds: an
Organizing Structure for Object-Bases," SIGPLAN Notices, Vol. 22, No.
1, January 1987, pp. 16 - 26.

                  Object-Oriented Computer Hardware

Even computer hardware can be constructed in an object-oriented
manner. Here are two references:

[Myers, 1982]. G.J. Myers, Advances in Computer Architecture, Second
Edition, John Wiley & Sons, New York, New York, 1982.

[Organick, 1983]. E. Organick, A Programmer's View of the Intel 432
System, McGraw-Hill, New York, New York,1983.

            General Object-Oriented Technology References

There are a number of general references on object-oriented
technology, including:

[ACM, 1986a]. Association for Computing Machinery, Special Issue of
SIGPLAN Notices on th Object-Oriented Programming Workshop, Vol. 21,
No. 10, October 1986.

[ACM, 1986b]. Association for Computing Machinery, OOPSLA '86
Conference Proceedings, Special Issue of SIGPLAN Notices, Vol. 21, No.
11, November 1986.

[ACM, 1987]. Association for Computing Machinery, OOPSLA '87
Conference Proceedings, Special Issue of SIGPLAN Notices, Vol. 22, No.
12, December 1987.

[ACM, 1988a]. Association for Computing Machinery, OOPSLA '87 Addendum
to the Proceedings, Special Issue of SIGPLAN Notices, Vol. 23, No. 5,
May 1988.

[ACM, 1988b]. Association for Computing Machinery, OOPSLA '88
Conference Proceedings, Special Issue of SIGPLAN Notices, Vol. 23, No.
11, November 1988.

[Bezivin et al, 1987]. J. Bezivin, J.-M. Hullot, P. Cointe, and H.
Lieberman, ECOOP '87: Proceedings of the European Conference on
Object-Oriented Programming, Lecture Notes on Computer Science, Volume
276, Springer Verlag, New York, New York, 1987.

[Cook, 1989]. S. Cook, ECOOP '89: Proceedings of the European
Conference on Object-Oriented Programming, British Computer Society
Workshop Series, Cambridge University Press, Cambridge, United
Kingdom, 1989.

[Gill, 1988]. P. Gill, "MIS Slowly Warms Up to Object-Oriented
Programming," ComputerWorld, Vol. XXII, No. 8, February 22, 1988, pp
71 - 76.

[Gjessing and Nygaard, 1988]. S. Gjessing and K. Nygaard, ECOOP '88:
Proceedings of the European Conference on Object-Oriented Programming,
Lecture Note on Computer Science, Volume 322, Springer Verlag, New
York, New York, 1988.

[Millikin, 1989]. M.D. Millikin, "Object Orientation: What It Can Do
For You," ComputerWorld, Vol. 23, No. 11. March 13, 1989, pp. 103 -
113.

[Peterson, 1987a]. G.E. Peterson, Tutorial: Object-Oriented Computing,
Volume 1: Concepts, IEEE Catalog Number EH0257-6, IEEE Computer
Society Press, Washington, D.C., 1987.

[Peterson, 1987b]. G.E. Peterson, Tutorial: Object-Oriented Computing,
Volume 2: Implementations, IEEE Catalog Number EH0257-6, IEEE Computer
Society Press, Washington, D.C., 1987.

[Shriver and Wegner, 1987]. B. Shriver and P. Wegner, Editors,
Research Directions in Object-Oriented Programming, The MIT Press,
Cambridge, Massachusetts, 1987.

There are many articles which might be considered "landmarks." Look
for early (early 1950s) articles discussing artificial intelligence,
early works by Alan Kay (either in the late 1960s, discussing his FLEX
machine, or in the very early 1970s, discussing Smalltalk), early
reports on SIMULA (from the late 1960s, by K. Nygaard and Ole-Johan
Dahl), and, more recently, the OOPSLA and ECOOP proceedings.

> 3. Teaching OOP seems easy when it comes to concept as there exists
>    number of well established metaphors. The real problem seems to be
>    methodology. Does anyone have any pointer to object oriented
>    programming methodologies?

I dread answering this question (:-)). As you can see from the reading
list (answer to previous question), there are some references to
object-oriented anaysis and object-oriented design.

I have developed and used methods for documenting individual classes:
"object and class specifications" (OCS, pronounced ox). These have
been in use on real projects (both at my former company and at several
of my client's sites) for a little over three years. If you would like
one or two sample OCSs, and about 84 slides describing OCSs, OORA,
OODA, and OOD send me your snail mail address (too much to FAX, and
lots of graphics).

> 4. When teaching functional programming languages such as Lisp the
>    interpreter (eval, apply) is often used to better understand the
>    execution model and how it may be altered. Is it essential to explain
>    the virtual machine of an object oriented language in the same manor?]
>    And if so what depth? The Smalltalk execution model is quite complex
>    in detail

In my humble opinion, these items are at the "noise level." A far more
difficult task is to give the students the ability to identify,
differentiate, and describe such things as objects, classes, and
values. I have met many so-called object-oriented programmers who
cannot differentiate between a concept and its implementation. I
obviously feel that concepts are more important than implementations.
(Please note that I am not saying that all implementation issues are
unimportant.) 

>Mikael R.K. Patel

				-- Ed Berard
				   Berard Software Engineering, Inc.
				   18620 Mateney Road
				   Germantown, Maryland 20874
				   Phone: (301) 353-9652
				   E-Mail: eberard@ajpo.sei.cmu.edu

alanm@cognos.UUCP (Alan Myrvold) (08/02/89)

In article <1318@massormetrix.ida.liu.se> mikpa@massormetrix.ida.liu.se (Mikael Patel) writes:
>Dear Object-Oriented Programmers out there in Net-Land. I need your help!
>
>I am working on a course on Object Oriented Programming (OOP) for third and 
>fourth year students on our civil engineer lines. I'd like some advice

Easy : here's a course outline:

      1) Motivation for OOPs (re-use, information hiding, memory management)
      2) The Smalltalk execution model
      3) The Eiffel type system (including proposed checking in future
         releases, to close the existing holes)
      4) Hybrid languages ... C++, Objective C, misc. Pascal extensions
      5) Two small projects - one in Eiffel, the other in Smalltalk

That should keep 'em busy for the term. :-)


                                          - Alan

---
Alan Myrvold          3755 Riverside Dr.     uunet!mitel!sce!cognos!alanm
Cognos Incorporated   P.O. Box 9707          alanm@cognos.uucp
(613) 738-1440 x5530  Ottawa, Ontario       
                      CANADA  K1G 3Z4       

kain@object.UUCP (Kai Ng) (08/04/89)

In article <6718@cognos.UUCP> alanm@cognos.UUCP (Alan Myrvold) writes:
>In article <1318@massormetrix.ida.liu.se> mikpa@massormetrix.ida.liu.se (Mikael Patel) writes:

>>I am working on a course on Object Oriented Programming (OOP) for third and 
>>fourth year students on our civil engineer lines. I'd like some advice
>

>      1) Motivation for OOPs (re-use, information hiding, memory management)
>      2) The Smalltalk execution model
>      3) The Eiffel type system (including proposed checking in future
>         releases, to close the existing holes)
>      4) Hybrid languages ... C++, Objective C, misc. Pascal extensions
>      5) Two small projects - one in Eiffel, the other in Smalltalk
>

The above list looks like the outline of YALC (yet another language course)
which I believe is not an effective way to convey the idea of OOP to the
students. Stresses should be on what is the difference between OOP technique
and conventional structural programming technical; how to design object-
orientedly; specialization vs generalization up and down the inheritance
hierarchy; etc.

On the ACM OOPSLA'88 appendum to proceedings, there is a workshop on
"Teaching Object Oriented Programming". In there, a number of OOP pioneers
expressed their experiences and approaches. (Including Adele Goldberg, John
Pugh, etc). I hope that is a good place to start before delineating your
course.




-- 
Kai Ng                 P.O. Box 9707         UUCP: uunet!mitel!sce!cognos!kain
Cognos Incorporated    3755 Riverside Dr.
(613) 738-1440         Ottawa, Ontario,
 ext. 6114             CANADA  K1G 3Z4