Monday, April 6, 2009

inheritance diagrametically  


Diagram 1 :-

                                           In this diagram PERSON is the base class, and OLD_PERSON, YOUNG_PERSON both are the child classes to PERSON and YOUNG_PERSON have the three more childs.

                                           Here the YOUNG_PERSON class and OLD_PERSON class both are having the qualities (here data members and member function) of PERSON class, But all PERSON's are not having both qualities.

                                           So we can call PERSON class data members and member function from YOUNG_PERSON and OLD_PERSON classes.

Diagram 2 :-

Diagram 3 :-

                                                  Here CheckingAccount and SavingAccount both are have the parent class is BankAccount. Here every BankAccount have the function of to use both CheckingAccount and SavingAccount classes. But Bank Account are not having the fuctions of all function on Checking Account or SavingAccount.

                                                 The BankAccount, Client and Bank all are the child classes of Object calss,So Object class is the base class of these three classes

Extension Factory Builder