X 3.1.2.3 Multiple Inheritance
X Multiple inheritance is when more than one class name is specified on the
X INHERITS phrase. With multiple inheritance, a class might inherit the
X same methods and instance data from different parents (if each of these
X parents have a common ancestor). In this situation, ("diamond
X inheritance") the subclass inherits only one set of method implementations
X and one copy of the instance data.
X When a subclass inherits two methods with the same name, the two methods
X must comply to the following conformance rules:
- X The number of formal parameters on the Procedure Division USING phrase
X must be the same for both methods.
- X The presence or absence of the Procedure Division RETURNING phrase
X must be consistent for the two methods.
- X Corresponding parameters in the Procedure Division USING and RETURNING
X phrases must satisfy the following:
- X If a formal parameter is a COBOL elementary data item not
X described with USAGE IS OBJECT REFERENCE, the corresponding
X parameter must have the same PICTURE, USAGE, SIGN, SYNCHRONIZED,
X JUSTIFIED, and BLANK WHEN ZERO clauses. Note that periods and
X commas can be interchanged if using the DECIMAL POINT IS COMMA
X clause, and the PICTURE clause currency symbols can differ.
- X If a formal parameter is a COBOL elementary data item described
X with USAGE IS OBJECT REFERENCE, the corresponding parameter must
X be defined with an identical USAGE clause or USAGE IS OBJECT
X REFERENCE clause.
- X For the purpose of conformance checking, a fixed-length group data
X item is considered to be equivalent to an elementary alphanumeric
X data item of the same length.
X A variable-length group conforms only to other variable-length
X groups that have the same maximum length.
© Copyright IBM Corp. 1991, 1998
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.
Return to library:
z/OS |
z/OS.e |
TPF |
z/VSE |
z/VM |
IBM Hardware |
IBM System z Redbooks
Glossary:
IBM terminology
Publications:
How to order publications
Readers:
Download IBM Library Reader |
Download IBM Softcopy Reader |
Download Adobe® Acrobat® Reader®
Library management:
Download IBM Softcopy Librarian
Contacts:
Contact z/OS
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks
of Adobe Systems incorporated.