Inheritance Scenario: XYZ
yClass is a type of xClass.
A XClass has 3 int states, x,y & z.
An object of the xClass may be created by providing a value for all 3 of these states and also by providing only x & y.
The yClass has 2 int states, a & b.
An object of the yClass may be created by providing a value for a, or values for both a & b.
The zClass is a type of yClass and has 1 int state called c.
An object of the zClass may be created with or without supplying a value for c.
Original Post Jul 23rd 2012
No comments:
Post a Comment