CJCoding With Joseph
15free / daySign inCreate account
TitleTopicsAction
592
Bird Inherits From AnimalThe base class `Animal` already defines a `Breathe()` method that prints `Breath...
easy○ Not Started
Inheritance
Solve
593
Book Inherits TitleThe base class `Publication` defines a public field `Title`. Make the `Book` cla...
easy○ Not Started
Inheritance
Solve
594
Coordinate ToString OverrideEvery class in C# inherits `ToString()` from `object`. Override `ToString()` in ...
easy○ Not Started
Inheritance
Solve
595
Shape Base ConstructorThe base class `Shape` has a constructor that stores a name. Add a constructor t...
easy○ Not Started
Inheritance
Solve
596
Puppy Uses Inherited EatThe base class `Animal` defines an `Eat()` method that prints `Munching`. The `P...
easy○ Not Started
Inheritance
Solve
597
Account Protected BalanceThe base class `Account` has a `protected` field `balance` set by its constructo...
easy○ Not Started
Inheritance
Solve
598
Check Type With is`Dog` inherits from `Animal`. Complete the static method `Describe` so it uses t...
easy○ Not Started
Inheritance
Solve
599
Cast With as`Dog` inherits from `Animal` and defines a `Bark()` method. Complete `MakeItBark...
easy○ Not Started
Inheritance
Solve
600
Three Level InheritanceInheritance can span multiple levels. `Mammal` inherits from `LivingThing`, and ...
easy○ Not Started
Inheritance
Solve
601
Square Inherits Width PropertyThe base class `Shape2D` defines a public auto-property `Width`. `Square` inheri...
easy○ Not Started
Inheritance
Solve
602
Base Constructor Runs FirstWhen you create a derived object, the base constructor runs before the derived c...
easy○ Not Started
Inheritance
Solve
603
SmartPhone Adds A MethodA derived class keeps everything it inherits and can add new members of its own....
easy○ Not Started
Inheritance
Solve
604
Pass Color To BaseThe base class `Widget` has a constructor that takes a color and prints it. `But...
easy○ Not Started
Inheritance
Solve
617
Car Honks Like A VehicleMake the class `Car` inherit from `Vehicle` so it gains the `Honk` method for fr...
easy○ Not Started
Inheritance
Solve
618
Wizard Extends Character`Character` has a constructor that stores a health value. Complete the `Wizard` ...
easy○ Not Started
Inheritance
Solve
619
Guitar Overrides Play`Instrument` has a `virtual` method `Play` that returns `"silence"`. Override `P...
easy○ Not Started
Inheritance
Solve
620
Manager Reads Protected Id`Employee` has a `protected` field `id` set to `42`. A `protected` member is vis...
easy○ Not Started
Inheritance
Solve
621
Temperature Display OverrideOverride the inherited `ToString` method in `Temperature` so it returns the stor...
easy○ Not Started
Inheritance
Solve
622
Cheetah Runs Fast`Animal` has a `virtual` method `Move` returning `"moving"`. Override `Move` in ...
easy○ Not Started
Inheritance
Solve
623
Cash Payment Amount`Payment` is an `abstract` class with an `abstract` method `Amount`. Provide the...
easy○ Not Started
Inheritance
Solve
624
Four Level InheritanceClass `A` defines `Origin`. Classes `B`, `C`, and `D` form a chain of inheritanc...
easy○ Not Started
Inheritance
Solve
625
Laptop Inherits Brand`Device` has an auto-property `Brand`. Make `Laptop` inherit from `Device` so it...
easy○ Not Started
Inheritance
Solve
626
Kilometers To Meters`Meters` stores a value. Complete the `Kilometers` constructor so it passes `km ...
easy○ Not Started
Inheritance
Solve
627
Bicycle Adds A Bell`Vehicle` has a `Move` method. `Bicycle` inherits `Move` and adds its own new me...
easy○ Not Started
Inheritance
Solve
628
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
518
Polymorphic AnimalsPolymorphism lets one loop call the right override for each object. `Dog` alread...
medium○ Not Started
Inheritance
Solve
605
Override Speak MethodThe base class `Animal` declares a `virtual` method `Speak()` that prints `Some ...
medium○ Not Started
Inheritance
Solve
606
Abstract Shape AreaThe `abstract` class `Shape` declares an abstract method `Area()` with no body. ...
medium○ Not Started
Inheritance
Solve
607
Call Base Method With baseThe `virtual` method `Log()` in `Logger` prints `Base log`. Override `Log()` in ...
medium○ Not Started
Inheritance
Solve
608
Polymorphic AnimalsPolymorphism lets one loop call the right override for each object. `Dog` alread...
medium○ Not Started
Inheritance
Solve
609
Override A PropertyProperties can be `virtual` and overridden just like methods. `Employee` has a `...
medium○ Not Started
Inheritance
Solve
610
Pass Values To BaseThe base class `Person` stores a name and age set through its constructor. `Teac...
medium○ Not Started
Inheritance
Solve
611
Hide Method With newSometimes a derived class replaces a NON-virtual base method by hiding it with t...
medium○ Not Started
Inheritance
Solve
612
Abstract Name PropertyAn abstract class can declare an abstract property that every subclass must supp...
medium○ Not Started
Inheritance
Solve
629
Orchestra Polymorphism`Instrument` is `abstract` with an `abstract` method `Sound`. Implement `Drum` s...
medium○ Not Started
Inheritance
Solve
630
Shadow A Method With new`Logger` has a `Log` method returning `"base log"`. In `FileLogger`, hide it wit...
medium○ Not Started
Inheritance
Solve
631
Discounted Product Price`Product` stores a `price` and has a `virtual` method `Price` returning it. `Sal...
medium○ Not Started
Inheritance
Solve
632
Abstract Vehicle Wheels`Vehicle` is `abstract` and declares an `abstract` read-only property `Wheels`. ...
medium○ Not Started
Inheritance
Solve
633
Override Volume Property`Box` has a `virtual` property `Volume` that returns `0`. In `Cube`, override `V...
medium○ Not Started
Inheritance
Solve
634
Feed The Animal With is`Feeder` has a method `Feed(Animal a)`. Using the `is` operator, return `"give f...
medium○ Not Started
Inheritance
Solve
635
Report Template Method`Report` defines the fixed method `Generate` that wraps a body between `START` a...
medium○ Not Started
Inheritance
Solve
636
Protected Wrap Helper`Formatter` has a `protected` helper method `Wrap` that surrounds text in square...
medium○ Not Started
Inheritance
Solve
613
Shape Area HierarchyBuild a small polymorphic hierarchy. The `abstract` class `Shape` declares `int ...
hard○ Not Started
Inheritance
Solve
614
Layered DescriptionsChain overrides across three levels using `base`. `Vehicle.Describe()` prints `I...
hard○ Not Started
Inheritance
Solve
615
Constructor Chain TraceConstructors run from the top of the hierarchy down. `A`'s constructor prints `A...
hard○ Not Started
Inheritance
Solve
616
Salary With BonusCombine constructor chaining, an override, and `base`. `Employee` stores `baseSa...
hard○ Not Started
Inheritance
Solve
637
Total Staff Pay`Staff` is `abstract` with an `abstract` method `Pay`. Create two subclasses: `M...
hard○ Not Started
Inheritance
Solve
638
Base Method Calls Override`Character` has a `virtual` method `Name` returning `"hero"` and a non-virtual m...
hard○ Not Started
Inheritance
Solve
639
Chained this And base Constructors`Shape` stores `Sides`. Build `Polygon` with two constructors: a main one `Polyg...
hard○ Not Started
Inheritance
Solve
640
Sealed Method Override`Base` has a `virtual` method `Info` returning `"base"`. Create `Middle` that in...
hard○ Not Started
Inheritance
Solve