SlideShare a Scribd company logo
1 of 16
TOPIC
INTRODUCTION TO E-COMMERCE
SESSION:-2023-24
CONTENTS
 Introduction of inheritance
 Types of inheritance
 Single inheritance
 Multiple inheritance
 Hierarchical inheritance
 Multilevel inheritance
 Hybrid inheritance
 Defining a derived class
INHERITANCE
• C++ strongly supports the concept of reusability. The
C++ classes can be reused in several ways. Once a
class has been written and tested, it can be adapted
by other programmers to suit their requirements .This
is basically done by creating new classes ,reusing the
properties of the existing ones .The mechanism of
deriving a new class from an old one is called
inheritance (or derivation) .The old class is referred to
as the base class and the new one is called the
derived
class or subclass.
 The derived class inherits some or all of the traits
from the base class . A class can also inherit
properties from more than one class or from more
than one level . A derived class with only one base
class is called single inheritance and one with several
base classes is called multiple inheritance .On the
other hand, the traits of one class may be inherited by
more than one class. This process is known as
hierarchical inheritance. The mechanism of deriving a
class from another 'derived class' is known as
multilevel inheritance.
A
B
Single inheritance - A derived class with only one base class is
called single inheritance. Derived class inherits the property of
base class
Multiple inheritance - A class can inherit the attributes of two or
more classes as shown in fig. This is known as multiple
inheritance. Multiple inheritance allows us to combine the
features of several existing classes as a starting point for defining
new classes. It is like a child inheriting the physical features of one
parent and the intelligence of another.
C
A B
C
B
A
D
Hierarchical Inheritance - When the properties of one class are
inherited by more than one class, it is called hierarchical
inheritance. In this inheritance there is only one base class but
many derived class.
C
A
B
Multilevel Inheritance – It is not uncommon that a class is derived
from another derived class as shown in fig. The class A serves as a
base class for the derived class B, which in turn serves as a base
class for the derived class C. The class B is known as intermediate
base class since it provides a link for the inheritance between A
and C. Then chain ABC is known as inheritance path. So a class can
be derived from another derived class is known as multilevel
inheritance.
c
A
D
B C
Hybrid Inheritance – In hybrid inheritance there could be situations
where we need to apply two or more types of inheritance to design
a program.
DEFINING DERIVED CLASSES
A derived class can be defined by specifying its relationship with the
base class in addition to its own details.The general form of defining a
derived class is:
class derived-class-name : visibility-mode base-class-name
{
......//members of derived class
};
The colon indicated that the derived-class-name is derived from the
base-class-name .The visibility-made is optional and ,if present, may be
either private or public .The default visibility mode is private. Visibility
mode specifies whether the features of the base class are privately
derived or publicly derived.
INHERITANCE (CONTINUED)
class A : base class access specifier B
{
member access specifier(s):
...
member data and member function(s);
...
}
Valid access specifiers include public, private, and
protected
PUBLIC INHERITANCE
public base class (B)
public members
protected members
private members
derived class (A)
public
protected
inherited but not
accessible
class A : public B
{ // Class A now inherits the members of Class B
// with no change in the “access specifier” for
} // the inherited members
PROTECTED INHERITANCE
protected base class (B)
public members
protected members
private members
derived class (A)
protected
protected
inherited but not
accessible
class A : protected B
{ // Class A now inherits the members of Class B
// with public members “promoted” to protected
} // but no other changes to the inherited members
PRIVATE INHERITANCE
private base class (B)
public members
protected members
private members
derived class (A)
private
private
inherited but not
accessible
class A : private B
{ // Class A now inherits the members of Class B
// with public and protected members
} // “promoted” to private
VISIBILITY OF INHERITED MEMBERS
BASE
CLASS
VISIBILITY
DERIVED CLASS VISIBILITY
PUBLIC
DERIVATION
PRIVATE
DERIVATION
PROTECTED
DERIVATION
Private Not Inherited Not Inherited Not Inherited
Protected Protected Private Protected
Public Public Private Protected
E -COMMERCE.ppt

More Related Content

Similar to E -COMMERCE.ppt

Similar to E -COMMERCE.ppt (20)

week14 (1).ppt
week14 (1).pptweek14 (1).ppt
week14 (1).ppt
 
Introduction to Inheritance
Introduction to InheritanceIntroduction to Inheritance
Introduction to Inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 
11 Inheritance.ppt
11 Inheritance.ppt11 Inheritance.ppt
11 Inheritance.ppt
 
Inheritance
InheritanceInheritance
Inheritance
 
Ritik (inheritance.cpp)
Ritik (inheritance.cpp)Ritik (inheritance.cpp)
Ritik (inheritance.cpp)
 
Inheritance in C++
Inheritance in C++Inheritance in C++
Inheritance in C++
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance
Inheritance Inheritance
Inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 
Programming presentation
Programming presentationProgramming presentation
Programming presentation
 
oop database doc for studevsgdy fdsyn hdf
oop database doc for studevsgdy fdsyn hdfoop database doc for studevsgdy fdsyn hdf
oop database doc for studevsgdy fdsyn hdf
 
Final presentation programming
Final presentation programmingFinal presentation programming
Final presentation programming
 
Single inheritance
Single inheritanceSingle inheritance
Single inheritance
 
Ganesh groups
Ganesh groupsGanesh groups
Ganesh groups
 
Inheritance.pptx
Inheritance.pptxInheritance.pptx
Inheritance.pptx
 
Inheritance, Object Oriented Programming
Inheritance, Object Oriented ProgrammingInheritance, Object Oriented Programming
Inheritance, Object Oriented Programming
 

More from classall

CONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VBCONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VBclassall
 
operat in vb .pptx
operat in vb .pptxoperat in vb .pptx
operat in vb .pptxclassall
 
Tally_Tutor_1.ppt
Tally_Tutor_1.pptTally_Tutor_1.ppt
Tally_Tutor_1.pptclassall
 
networking
networking networking
networking classall
 
introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxintroduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxclassall
 
introduction to e-commerce.pptx
introduction to e-commerce.pptxintroduction to e-commerce.pptx
introduction to e-commerce.pptxclassall
 
E-Rdiagram.ppt
E-Rdiagram.pptE-Rdiagram.ppt
E-Rdiagram.pptclassall
 
EDI presentation.pptx
EDI presentation.pptxEDI presentation.pptx
EDI presentation.pptxclassall
 
control structure in visual basic
control structure in visual basic control structure in visual basic
control structure in visual basic classall
 
b,Sc it data structure.ppt
b,Sc it data structure.pptb,Sc it data structure.ppt
b,Sc it data structure.pptclassall
 
SAVE WATER SAVE LIFE
SAVE WATER SAVE LIFESAVE WATER SAVE LIFE
SAVE WATER SAVE LIFEclassall
 
MULTIMEDIA
MULTIMEDIAMULTIMEDIA
MULTIMEDIAclassall
 
GEETA2.pptx
GEETA2.pptxGEETA2.pptx
GEETA2.pptxclassall
 
GEETA1.pptx
GEETA1.pptxGEETA1.pptx
GEETA1.pptxclassall
 
GEETA.pptx
GEETA.pptxGEETA.pptx
GEETA.pptxclassall
 
राष्ट्रीय एकता 13.3.18.ppt
राष्ट्रीय एकता 13.3.18.pptराष्ट्रीय एकता 13.3.18.ppt
राष्ट्रीय एकता 13.3.18.pptclassall
 
b,Sc it data structure.pptx
b,Sc it data structure.pptxb,Sc it data structure.pptx
b,Sc it data structure.pptxclassall
 
MEMORY NOTES.pptx
MEMORY NOTES.pptxMEMORY NOTES.pptx
MEMORY NOTES.pptxclassall
 

More from classall (20)

CONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VBCONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VB
 
operat in vb .pptx
operat in vb .pptxoperat in vb .pptx
operat in vb .pptx
 
Tally_Tutor_1.ppt
Tally_Tutor_1.pptTally_Tutor_1.ppt
Tally_Tutor_1.ppt
 
networking
networking networking
networking
 
introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxintroduction to visual basic PPT.pptx
introduction to visual basic PPT.pptx
 
introduction to e-commerce.pptx
introduction to e-commerce.pptxintroduction to e-commerce.pptx
introduction to e-commerce.pptx
 
E-Rdiagram.ppt
E-Rdiagram.pptE-Rdiagram.ppt
E-Rdiagram.ppt
 
EDI presentation.pptx
EDI presentation.pptxEDI presentation.pptx
EDI presentation.pptx
 
control structure in visual basic
control structure in visual basic control structure in visual basic
control structure in visual basic
 
b,Sc it data structure.ppt
b,Sc it data structure.pptb,Sc it data structure.ppt
b,Sc it data structure.ppt
 
SAVE WATER SAVE LIFE
SAVE WATER SAVE LIFESAVE WATER SAVE LIFE
SAVE WATER SAVE LIFE
 
MS OFFICE
MS OFFICEMS OFFICE
MS OFFICE
 
MULTIMEDIA
MULTIMEDIAMULTIMEDIA
MULTIMEDIA
 
GEETA2.pptx
GEETA2.pptxGEETA2.pptx
GEETA2.pptx
 
GEETA1.pptx
GEETA1.pptxGEETA1.pptx
GEETA1.pptx
 
GEETA.pptx
GEETA.pptxGEETA.pptx
GEETA.pptx
 
राष्ट्रीय एकता 13.3.18.ppt
राष्ट्रीय एकता 13.3.18.pptराष्ट्रीय एकता 13.3.18.ppt
राष्ट्रीय एकता 13.3.18.ppt
 
mmu.pptx
mmu.pptxmmu.pptx
mmu.pptx
 
b,Sc it data structure.pptx
b,Sc it data structure.pptxb,Sc it data structure.pptx
b,Sc it data structure.pptx
 
MEMORY NOTES.pptx
MEMORY NOTES.pptxMEMORY NOTES.pptx
MEMORY NOTES.pptx
 

Recently uploaded

_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 

Recently uploaded (20)

_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 

E -COMMERCE.ppt

  • 2. CONTENTS  Introduction of inheritance  Types of inheritance  Single inheritance  Multiple inheritance  Hierarchical inheritance  Multilevel inheritance  Hybrid inheritance  Defining a derived class
  • 3. INHERITANCE • C++ strongly supports the concept of reusability. The C++ classes can be reused in several ways. Once a class has been written and tested, it can be adapted by other programmers to suit their requirements .This is basically done by creating new classes ,reusing the properties of the existing ones .The mechanism of deriving a new class from an old one is called inheritance (or derivation) .The old class is referred to as the base class and the new one is called the derived class or subclass.
  • 4.  The derived class inherits some or all of the traits from the base class . A class can also inherit properties from more than one class or from more than one level . A derived class with only one base class is called single inheritance and one with several base classes is called multiple inheritance .On the other hand, the traits of one class may be inherited by more than one class. This process is known as hierarchical inheritance. The mechanism of deriving a class from another 'derived class' is known as multilevel inheritance.
  • 5. A B Single inheritance - A derived class with only one base class is called single inheritance. Derived class inherits the property of base class
  • 6. Multiple inheritance - A class can inherit the attributes of two or more classes as shown in fig. This is known as multiple inheritance. Multiple inheritance allows us to combine the features of several existing classes as a starting point for defining new classes. It is like a child inheriting the physical features of one parent and the intelligence of another. C A B
  • 7. C B A D Hierarchical Inheritance - When the properties of one class are inherited by more than one class, it is called hierarchical inheritance. In this inheritance there is only one base class but many derived class.
  • 8. C A B Multilevel Inheritance – It is not uncommon that a class is derived from another derived class as shown in fig. The class A serves as a base class for the derived class B, which in turn serves as a base class for the derived class C. The class B is known as intermediate base class since it provides a link for the inheritance between A and C. Then chain ABC is known as inheritance path. So a class can be derived from another derived class is known as multilevel inheritance. c
  • 9. A D B C Hybrid Inheritance – In hybrid inheritance there could be situations where we need to apply two or more types of inheritance to design a program.
  • 10. DEFINING DERIVED CLASSES A derived class can be defined by specifying its relationship with the base class in addition to its own details.The general form of defining a derived class is: class derived-class-name : visibility-mode base-class-name { ......//members of derived class }; The colon indicated that the derived-class-name is derived from the base-class-name .The visibility-made is optional and ,if present, may be either private or public .The default visibility mode is private. Visibility mode specifies whether the features of the base class are privately derived or publicly derived.
  • 11. INHERITANCE (CONTINUED) class A : base class access specifier B { member access specifier(s): ... member data and member function(s); ... } Valid access specifiers include public, private, and protected
  • 12. PUBLIC INHERITANCE public base class (B) public members protected members private members derived class (A) public protected inherited but not accessible class A : public B { // Class A now inherits the members of Class B // with no change in the “access specifier” for } // the inherited members
  • 13. PROTECTED INHERITANCE protected base class (B) public members protected members private members derived class (A) protected protected inherited but not accessible class A : protected B { // Class A now inherits the members of Class B // with public members “promoted” to protected } // but no other changes to the inherited members
  • 14. PRIVATE INHERITANCE private base class (B) public members protected members private members derived class (A) private private inherited but not accessible class A : private B { // Class A now inherits the members of Class B // with public and protected members } // “promoted” to private
  • 15. VISIBILITY OF INHERITED MEMBERS BASE CLASS VISIBILITY DERIVED CLASS VISIBILITY PUBLIC DERIVATION PRIVATE DERIVATION PROTECTED DERIVATION Private Not Inherited Not Inherited Not Inherited Protected Protected Private Protected Public Public Private Protected

Editor's Notes

  1. Winter 2005
  2. Winter 2005
  3. Winter 2005
  4. Winter 2005