{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Derived Classes 2 - UAH CPE 212 Fundamentals of Software...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
UAH CPE 212 Fundamentals of Software Engineering Agenda Class 7 Derived Classes 2 Derived Classes 2 Key Concepts
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
UAH CPE 212 Today Last Time Derived Classes 1 This Time Derived Classes 2
Background image of page 2
UAH CPE 212 Review Derived Classes Defines a new class with some properties of the base class declare with public, protected or private derivation Default for class is private, default for struct is public Single and multiple inheritance Can be template or non-template Can have abstract base classes (never instantiated alone) Member functions Same name and signature in derived classes override the function behavior virtual functions behave as the type of the object not the type of a pointer Construction and destruction Base class constructor invoked from the derived class before executing the derived class. Derived class destructor executed then base class destructor. Cannot inherit friends Constructors and destructors Assignment operators Hidden member functions
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
UAH CPE 212 ADT Inheritance template <class Item> class List { public: // CONSTRUCTORS and DESTRUCTOR List( ); List(const List& source); ~List( ); // MODIFICATION MEMBER FUNCTIONS void start( ); void advance( ); void insert(const Item& entry); void attach(const Item& entry); void remove_current( );
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}