File: inheritance

package info (click to toggle)
libdb2-ruby 0.5.4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,352 kB
  • ctags: 2,743
  • sloc: ansic: 11,156; ruby: 6,199; cpp: 6,064; makefile: 86; sh: 31
file content (21 lines) | stat: -rw-r--r-- 825 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<entry index='i'>
<name>Inheritance</name>
<reference>function</reference>
<reference>mix-in</reference>
<content>
    Do minimum in itself, and fully rely on what succeeded
    from the ancestor or the relative to deal the rest matter.
    In the real world, It should be an unpleasant fellow.

    Turned to establish a new class
    which adds the ((function|Function)) to a certain class.
    Inheritance is effective to express the relation of is-a.
    For instance,
    "Student" class which describes the character of the general
    student can be succeeded to "Department of Engineering student
    (who is afflicted with the experiment)" class.
    When there is no is-a relation and the situation only shares
    the character and the function,
    it is assumed preferable to use ((Mix-in)).
</content>
</entry>