Calculate damage for MORE weaponsUse a switch statement to match several candidatesOne more thing...can we calculate damage for a dagger? And a mace? And a staff? and...When your classes use inheritance, you only need to write your code onceBuild up your class model by starting general and getting more specificHow would you design a zoo simulator?Different animals have different behaviorsEvery subclass extends its base classC# always calls the most specific methodAny place where you can use a base class, you can use one of its subclasses insteadUse a colon to extend a base classWe know that inheritance adds the base class fields, properties, and methods to the subclass......but some birds don’t fly!A subclass can override methods to change or replace members it inheritedSome members are only implemented in a subclassUse the debugger to understand how overriding worksBuild an app to explore virtual and overrideA subclass can hide methods in the base classHiding methods vs. overriding methodsUse the new keyword when you’re hiding methodsUse different references to call hidden methodsUse the override and virtual keywords to inherit behaviorA subclass can access its base class using the base keywordWhen a base class has a constructor, your subclass needs to call itA subclass and base class can have different constructorsIt’s time to finish the job for OwenUse the debugger to really understand how these classes workA class should do one thingBuild a beehive management systemHow the Beehive Management System app worksThe page uses a grid to lay out the controls for the UIThe Bee Jobs box uses a Border with a VerticalStackLayoutThe Beehive Management System class modelAll bees in the system extend the Bee classAll the constants are in their own static classThe worker bees extend the Bee classThe Queen class: how she manages the worker beesHere’s the code-behind for MainPage.xaml.csFeedback drives your beehive management gameWorkers and honey are in a feedback loopThe Beehive Management System is turn-based... now let’s convert it to real-timeSome classes should never be instantiatedAn abstract class is an intentionally incomplete classLet’s plan a trip to another planetLike we said, some classes should never be instantiatedSolution: use an abstract classAn abstract method doesn’t have a bodyAbstract properties work just like abstract methodsThe Deadly Diamond of Death