CJCoding With Joseph
TitleTopicsAction
502
Bird Inherits From AnimalThe base class `Animal` already defines a `Breathe()` method that prints `Breath...
easy○ Not Started
Inheritance
Solve
503
Book Inherits TitleThe base class `Publication` defines a public field `Title`. Make the `Book` cla...
easy○ Not Started
Inheritance
Solve
504
Coordinate ToString OverrideEvery class in C# inherits `ToString()` from `object`. Override `ToString()` in ...
easy○ Not Started
Inheritance
Solve
505
Shape Base ConstructorThe base class `Shape` has a constructor that stores a name. Add a constructor t...
easy○ Not Started
Inheritance
Solve
506
Puppy Uses Inherited EatThe base class `Animal` defines an `Eat()` method that prints `Munching`. The `P...
easy○ Not Started
Inheritance
Solve
507
Account Protected BalanceThe base class `Account` has a `protected` field `balance` set by its constructo...
easy○ Not Started
Inheritance
Solve
508
Check Type With is`Dog` inherits from `Animal`. Complete the static method `Describe` so it uses t...
easy○ Not Started
Inheritance
Solve
509
Cast With as`Dog` inherits from `Animal` and defines a `Bark()` method. Complete `MakeItBark...
easy○ Not Started
Inheritance
Solve
510
Three Level InheritanceInheritance can span multiple levels. `Mammal` inherits from `LivingThing`, and ...
easy○ Not Started
Inheritance
Solve
511
Square Inherits Width PropertyThe base class `Shape2D` defines a public auto-property `Width`. `Square` inheri...
easy○ Not Started
Inheritance
Solve
512
Base Constructor Runs FirstWhen you create a derived object, the base constructor runs before the derived c...
easy○ Not Started
Inheritance
Solve
513
SmartPhone Adds A MethodA derived class keeps everything it inherits and can add new members of its own....
easy○ Not Started
Inheritance
Solve
514
Pass Color To BaseThe base class `Widget` has a constructor that takes a color and prints it. `But...
easy○ Not Started
Inheritance
Solve
527
Car Honks Like A VehicleMake the class `Car` inherit from `Vehicle` so it gains the `Honk` method for fr...
easy○ Not Started
Inheritance
Solve
528
Wizard Extends Character`Character` has a constructor that stores a health value. Complete the `Wizard` ...
easy○ Not Started
Inheritance
Solve
529
Guitar Overrides Play`Instrument` has a `virtual` method `Play` that returns `"silence"`. Override `P...
easy○ Not Started
Inheritance
Solve
530
Manager Reads Protected Id`Employee` has a `protected` field `id` set to `42`. A `protected` member is vis...
easy○ Not Started
Inheritance
Solve
531
Temperature Display OverrideOverride the inherited `ToString` method in `Temperature` so it returns the stor...
easy○ Not Started
Inheritance
Solve
532
Cheetah Runs Fast`Animal` has a `virtual` method `Move` returning `"moving"`. Override `Move` in ...
easy○ Not Started
Inheritance
Solve
533
Cash Payment Amount`Payment` is an `abstract` class with an `abstract` method `Amount`. Provide the...
easy○ Not Started
Inheritance
Solve
534
Four Level InheritanceClass `A` defines `Origin`. Classes `B`, `C`, and `D` form a chain of inheritanc...
easy○ Not Started
Inheritance
Solve
535
Laptop Inherits Brand`Device` has an auto-property `Brand`. Make `Laptop` inherit from `Device` so it...
easy○ Not Started
Inheritance
Solve
536
Kilometers To Meters`Meters` stores a value. Complete the `Kilometers` constructor so it passes `km ...
easy○ Not Started
Inheritance
Solve
537
Bicycle Adds A Bell`Vehicle` has a `Move` method. `Bicycle` inherits `Move` and adds its own new me...
easy○ Not Started
Inheritance
Solve
538
Thermostat Inherits Power`Appliance` has a public field `Power` set to `5`. Make `Thermostat` inherit fro...
easy○ Not Started
Inheritance
Solve
6
Dog Extends AnimalAn `Animal` base class is provided by the tester. It has a public `Name` field, ...
medium○ Not Started
Inheritance
Solve
515
Override Speak MethodThe base class `Animal` declares a `virtual` method `Speak()` that prints `Some ...
medium○ Not Started
Inheritance
Solve
516
Abstract Shape AreaThe `abstract` class `Shape` declares an abstract method `Area()` with no body. ...
medium○ Not Started
Inheritance
Solve
517
Call Base Method With baseThe `virtual` method `Log()` in `Logger` prints `Base log`. Override `Log()` in ...
medium○ Not Started
Inheritance
Solve
518
Polymorphic AnimalsPolymorphism lets one loop call the right override for each object. `Dog` alread...
medium○ Not Started
Inheritance
Solve
519
Override A PropertyProperties can be `virtual` and overridden just like methods. `Employee` has a `...
medium○ Not Started
Inheritance
Solve
520
Pass Values To BaseThe base class `Person` stores a name and age set through its constructor. `Teac...
medium○ Not Started
Inheritance
Solve
521
Hide Method With newSometimes a derived class replaces a NON-virtual base method by hiding it with t...
medium○ Not Started
Inheritance
Solve
522
Abstract Name PropertyAn abstract class can declare an abstract property that every subclass must supp...
medium○ Not Started
Inheritance
Solve
539
Orchestra Polymorphism`Instrument` is `abstract` with an `abstract` method `Sound`. Implement `Drum` s...
medium○ Not Started
Inheritance
Solve
540
Shadow A Method With new`Logger` has a `Log` method returning `"base log"`. In `FileLogger`, hide it wit...
medium○ Not Started
Inheritance
Solve
541
Discounted Product Price`Product` stores a `price` and has a `virtual` method `Price` returning it. `Sal...
medium○ Not Started
Inheritance
Solve
542
Abstract Vehicle Wheels`Vehicle` is `abstract` and declares an `abstract` read-only property `Wheels`. ...
medium○ Not Started
Inheritance
Solve
543
Override Volume Property`Box` has a `virtual` property `Volume` that returns `0`. In `Cube`, override `V...
medium○ Not Started
Inheritance
Solve
544
Feed The Animal With is`Feeder` has a method `Feed(Animal a)`. Using the `is` operator, return `"give f...
medium○ Not Started
Inheritance
Solve
545
Report Template Method`Report` defines the fixed method `Generate` that wraps a body between `START` a...
medium○ Not Started
Inheritance
Solve
546
Protected Wrap Helper`Formatter` has a `protected` helper method `Wrap` that surrounds text in square...
medium○ Not Started
Inheritance
Solve
523
Shape Area HierarchyBuild a small polymorphic hierarchy. The `abstract` class `Shape` declares `int ...
hard○ Not Started
Inheritance
Solve
524
Layered DescriptionsChain overrides across three levels using `base`. `Vehicle.Describe()` prints `I...
hard○ Not Started
Inheritance
Solve
525
Constructor Chain TraceConstructors run from the top of the hierarchy down. `A`'s constructor prints `A...
hard○ Not Started
Inheritance
Solve
526
Salary With BonusCombine constructor chaining, an override, and `base`. `Employee` stores `baseSa...
hard○ Not Started
Inheritance
Solve
547
Total Staff Pay`Staff` is `abstract` with an `abstract` method `Pay`. Create two subclasses: `M...
hard○ Not Started
Inheritance
Solve
548
Base Method Calls Override`Character` has a `virtual` method `Name` returning `"hero"` and a non-virtual m...
hard○ Not Started
Inheritance
Solve
549
Chained this And base Constructors`Shape` stores `Sides`. Build `Polygon` with two constructors: a main one `Polyg...
hard○ Not Started
Inheritance
Solve
550
Sealed Method Override`Base` has a `virtual` method `Info` returning `"base"`. Create `Middle` that in...
hard○ Not Started
Inheritance
Solve