The language is less important than the methodology used to analyze the problem and design the code
but:
A pure OOPL, in which all data are objects is superior to a hybrid OOPL. The advantages almost invariably outweigh the disadvantages.
Yes, of course
But, a pure OOPL will do you little good if your analysis and design are poor. (You can write FORTRAN code in Smalltalk)
Many people say they are doing object-oriented programming since they are programming with C++. It is easy to use C++ and not be really using the OO technology.
The "OO world view"
To some extent, you can acquire this perspective through programming, but
iff you use a pure OOPL.
If you have an OO design, it is natural to realize that design in an OOPL.
(This is why I have the pre-requisite...so the techniques are already there!)
Goals of the course:
This course is 15 weeks short. We have a lot to cover. Have patience that we
will get to everything.
Course Organization (first few weeks):
Object-Oriented "world view" (intro)
Once we have a solid grounding into OO techniques, then we will see how Java
provides tools to use these software design aspects over larger systems
(i.e., "the network is the computer")
Object-Oriented Methodology - an overview
OOA - analysis, modeling with an OO perspective
OOD - designing software based on objects
OOP - coding using objects
OO encourages iteration in the life cycle
There are various reasons for this - the main ones are
For smaller projects, the code is the model - as the code develops, so
does the model.
For larger projects, the code may still be applied early for rapid prototyping.
(Smalltalk, LISP, Java are especially good for this (why? because they are
robust, no need to worry about freeing or corrupting memory.))
Again remember:
"The network is the computer" - Bill Joy
Characteristics of an OOPL
Bertrand Meyer's seven steps
(i.e., support abstract data types)
In order to do this, the modules must support:
(hidden)
add(key.val)
Operations (interface) are called methods
invoking a method is sending a message
The implementation details of the Dictionary can be changed without impacting
any users of the Dictionary. This is the fundamental principle on which
advantages of OO depend. Violate this principle at your peril!
(Different languages have different levels of enforcement.)
These lead to the property of continuity.
ADT's are supported by:
Introductions
Java demos are cool and do exciting things, and we can often get the code and
adapt BUT I want you to see the organization of these programs - how does one
think in OO
Java publicity hype (intro)
Syntax and Code environment
Java
e.g.
remove(key)
valueof(key)
print(key)
1 Simula class
2 LISP class
3 Smalltalk class
4 Modula-2 module
5 Ada package
6 Turbo Pascal 4&5 unit
7 C++ class
8 Turbo Pascal 5.5+ class
9 Java class