- Module 1: Learn how to create a class hierarchy using base and derived classes and how to hide or override members of a derived class by using `new`, `virtual`, `abstract`, and `override` keywords.
Describe the principles of class inheritance.
Configure base and derived classes.
Hide the members of a base class by using the new keyword.
Override the members of a base class by using the virtual, override, and abstract keywords.
Access the members of a base class from within a derived class.
Implement a class hierarchy in a C# app by using base and derived classes.
- Module 2: Learn the principles of polymorphism, how to implement polymorphic behavior by using either class inheritance or interface implementation, and how to choose between inheritance-based and interface-based approaches to polymorphism.
Describe the principles of polymorphism.
Implement inheritance-based polymorphism.
Implement interface-based polymorphism.
Explain polymorphic design considerations.
Implement polymorphic behavior in a C# application.
Overview
Syllabus
- Module 1: Module 1: Implement class inheritance
- Introduction
- Examine the principles of class inheritance
- Configure base and derived classes
- Extend a derived class with new members
- Override properties and methods in a derived class
- Access base class members from a derived class
- Exercise - Implement base and derived classes in a C# app
- Knowledge check
- Summary
- Module 2: Module 2: Implement polymorphic behavior
- Introduction
- Examine the principles of polymorphic behavior
- Explore inheritance-based polymorphism
- Explore interface-based polymorphism
- Review polymorphic design considerations
- Exercise - Implement polymorphism in a C# app
- Knowledge check
- Summary