Lesson 07

Polymorphism (Overriding Methods)

Individual Post-Class Exercises
  1. Lesson Setup

    1. Start-of-lecture Slides   (Required)

    2. 'Starter' project for the lesson 07 PCEs (Post-Class Exercises)
      NOTE: This week's PCEs are to be done individually, regardless of what's said in any of the videos

    3. Watch the online videos for this lesson and demonstrate your knowledge (Hand-In)
      Download all videos for this lesson (Use the 'Download' menu item) 

    4. Final (Ending) version of the demonstration project used in the videos
      Feel free to download this and refer to it / examine it / experiement with it as you're watching the videos below. 
    5. Ignore NUnit:
      There may be stuff that talks about NUnit in the following material.  Please ignore this, as we are not using NUnit this quarter.  Thanks!
  2. Earlier, the topic "Array Inside Of A Class" was listed here.  It has since been removed and moved back to Lesson 06 (where it was also listed). 

    If you find anything about the "Array Inside Of A Class" exercise listed on this website please let the instructor know.  (There may be code left in the starter project that we're not using - the unused code in the starter project is fine).

  3. OOP Inheritance (Specialization)

    1. VIDEO: Inheritance: Conceptual overview
    2. VIDEO: Inheritance: vocabulary
    3. VIDEO: Inheritance: Inheriting data
    4. Exercise: Basic Inheritance  (Chapter 10 explains inheritance in detail) (Hand-In)
    5. VIDEO:  Inheritance: Constructors
    6. Exercise: Inheritance: Constructors
    7. Exercise: Inheritance: Calling Methods in the base class (Hand-In)
    8. Exercise: Overloaded Constructors: Calling One Constructor From Another  (Hand-In)
  4. Polymorphism: Overriding Methods

    1. VIDEO: Polymorphism: Overriding Methods
    2. Exercise: Explaining basic polymorphism  (Chapter 11 explains polymorphism in detail)

    3. Exercise: Creating a basic, polymorphic method 

    4. VIDEO: Polymorphism: An Array Of Objects With An Overridden Method

    5. Exercise: Polymorphism and arrays (Hand-In

    6. Exercise: Overriding a standard method: ToString (Hand-In
    7. Exercise: Polymorphism, arrays, and the ToString method 
    8. Exercise: Polymorphism: virtual, override, new (Read Only If You're Curious - this is NOT required)     File: Inheritance.zip
  5. Named Constants

    1. VIDEO: Named Constants
    2. Exercise: Named Constants (Required
  6. Final Steps

    1. Web Hand-In for post-class exercises and for homework:
      Go to the StudentTracker  web app, and create an account for yourself, and then "enroll" in the course.
      Please submit a .ZIP (and ONLY a .ZIP - not a .RAR, .7z, etc) that contains the Program.cs file, the video outline/viewing quiz .DOCX (or .PDF), any other files you wish to include, and leaves out every thing else (as much as possible).

    2. Make sure that you're working on the next homework assignment. 
      Details are listed on the
      homework assignment page
      The due date is listed on the main page.
    3. Practice what you've learned
      Remember that in order to really learn this stuff you're going to need to practice it.  Go back and redo the exercises from this lesson until you've really got it down.  Go back to the prior lesson(s) and review and redo that.  Make sure that you've really got this stuff in your head (and remember that it gets easier each time you redo the work)!
 
In-Class Materials:

These materials are used by students in the hybrid class during leture time.  Online students can safely ignore everything in this 'In Class Materials' box.

In-Class Materials:

Instructor's Materials:

  • Notes

Videos recorded during class (of the In-Class Exercises):