Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what are subtyping and specilization?
#1
what r subtyping and specilization?
Reply
#2
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.

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  subtyping and specilition in c++ 2011 saneha 1 2,129 05-02-2011, 06:18 AM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)