04-29-2011, 07:42 AM
Sub typing (extension) means that derived class is behaviourally compatible with base class. In extension derived class have all the characteristics of base class plus some extra characteristics (derived class own characteristics). Class A is a subtype of B if A can be used in any situation where B can be used. It means that A has at least all the methods of B with the appropriate types, plus any instance variable.
Specialization (restriction) means the derived class is behaviourally in compatible with base class. It means that that derived class can not always be used where base class can be used. It means that derived class has some different or restricted behaviour than base class.
Specialization (restriction) means the derived class is behaviourally in compatible with base class. It means that that derived class can not always be used where base class can be used. It means that derived class has some different or restricted behaviour than base class.
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
