SHSubjectHub

Inheritance and Subclasses (C#)

OOPA-levelLesson packSubscription

About this resource

Understand how one class can inherit from another in C#, how to use : base() to call the parent constructor, and how to use is for type checking.

11 slides.

Lesson outline

  1. Is-A or Has-A?
  2. The Is-A Relationship
  3. Writing a Subclass in C#
  4. Dog Inherits From Animal: Live Demo
  5. UML: Inheritance Arrow
  6. `is` — Type Checking in C#
  7. Python vs C#: Inheritance Syntax
  8. Coding Practice: Animal Hierarchy
  9. Lesson Summary
Unit bundleUnit 3A · Inheritance and Subclasses
Part of: Unit 3A · Inheritance and Subclasses: the whole unitEvery resource in the unit in one zip.

More from Unit 3A · Inheritance and Subclasses