31 lines
1.4 KiB
Plaintext
31 lines
1.4 KiB
Plaintext
OOP
|
|
|
|
OOP stands for "Object-Oriented Programming"
|
|
|
|
If you know how to code in C or Pascal or even one of the modern BASICs
|
|
(with procedures), then you already have many of the skills you will need
|
|
to program effectively in LPC. The main thing you need is a skill in
|
|
translating your ideas into a sequential flow of steps (that a computer
|
|
can perform). However, LPC is also an object-oriented language.
|
|
To effectively use LPC, you would benefit from a knowledge of OOP principles
|
|
and concepts. Following are some of the principles of object-oriented
|
|
programming (note that LPC doesn't necessarily provide mechanisms
|
|
supporting all of these principles):
|
|
|
|
<DL>
|
|
* systems are modularized on the basis of their data structures.
|
|
* objects should be described as implementations of abstract data types.
|
|
* unused objects should be deallocated by the underlying language system,
|
|
without programmer intervention.
|
|
* every non-simple type is a module, and every high-level module is a type.
|
|
* a class may be defined as an extension or restriction of another.
|
|
* program entities should be allowed to refer to objects of more than
|
|
one class, and operations should be permitted to have different realizations
|
|
in different classes.
|
|
* it should be possible to declare a class as heir to more than one class,
|
|
and more than once to the same class.
|
|
</DL>
|
|
|
|
[These seven principles were taken from the "Object-oriented Software
|
|
Construction" book by Bertrand Meyer]
|