CJCoding With Joseph
TitleTopicsAction
551
Override a Virtual MethodThe base class `Animal` has a `virtual` method `Speak`. Override it in the `Dog`...
easy○ Not Started
Polymorphism
Solve
552
Two Overloaded Print MethodsThe `Printer` class already has a `Print(int)` method. Add a second `Print` meth...
easy○ Not Started
Polymorphism
Solve
553
Overload Add By ArityThe `Calculator` class has an `Add` method that sums two `int` values. Add an ov...
easy○ Not Started
Polymorphism
Solve
554
ToString Override for PointOverride the `ToString` method on the `Point` class so printing a point shows it...
easy○ Not Started
Polymorphism
Solve
555
Implement an Abstract MethodThe `abstract` class `Shape` declares an abstract method `Area` with no body. Pr...
easy○ Not Started
Polymorphism
Solve
556
Implement an InterfaceThe interface `IGreeter` declares a method `Greet` that returns a `string`. Make...
easy○ Not Started
Polymorphism
Solve
557
Virtual Property OverrideThe base class `Employee` has a `virtual` read-only property `Role` that returns...
easy○ Not Started
Polymorphism
Solve
558
Call Base Method in OverrideThe base class `Logger` has a `virtual` method `Log` that prints `Base log`. Ove...
easy○ Not Started
Polymorphism
Solve
559
Sealed OverrideThe base class `Widget` has a `virtual` method `Draw`. In the `Button` class, pr...
easy○ Not Started
Polymorphism
Solve
560
Overload By Parameter TypeThe `Formatter` class has a `Show(int)` method. Add an overload `Show(double)` s...
easy○ Not Started
Polymorphism
Solve
561
Interface PropertyThe interface `IProduct` declares a read-only `Name` property. Make the `Book` c...
easy○ Not Started
Polymorphism
Solve
562
Polymorphic Method ParameterThe `Speaker` class has a method `Announce(Animal a)`. Because the parameter typ...
easy○ Not Started
Polymorphism
Solve
563
Abstract Property ImplementThe `abstract` class `Animal` declares an abstract read-only property `Sound`. I...
easy○ Not Started
Polymorphism
Solve
576
Override a Calculated ResultThe base class `Shape` has a `virtual` method `Area()` that returns `0`. Overrid...
easy○ Not Started
Polymorphism
Solve
577
Extend the Base Method with baseThe base class `Greeter` has a `virtual` method `Greet()` that returns `Hello`. ...
easy○ Not Started
Polymorphism
Solve
578
Overload a Method by Argument CountMethod overloading (compile-time polymorphism) lets one method name have several...
easy○ Not Started
Polymorphism
Solve
579
Overload a Method by Parameter TypeOverloads can also differ by parameter type. The `Printer` class already has `De...
easy○ Not Started
Polymorphism
Solve
580
Polymorphic ToString`Console.WriteLine` on an object calls that object's `ToString()`, and the objec...
easy○ Not Started
Polymorphism
Solve
581
Implement an Interface MethodAn interface lists methods a class promises to provide. The `IShape` interface d...
easy○ Not Started
Polymorphism
Solve
582
Override a Virtual PropertyProperties can be `virtual` and overridden just like methods. The `Vehicle` clas...
easy○ Not Started
Polymorphism
Solve
583
One Method, Many AnimalsA method that takes a base-class parameter can accept ANY derived object. The `A...
easy○ Not Started
Polymorphism
Solve
584
Override a Void MethodOverriding also works for methods that return nothing. The `Logger` class has a ...
easy○ Not Started
Polymorphism
Solve
585
Implement an Abstract PropertyAbstract classes can declare abstract properties that each derived class must fi...
easy○ Not Started
Polymorphism
Solve
692
Override Equals for Value EqualityOverride the inherited `Equals(object? obj)` method on `Point` so two points are...
easy○ Not Started
Polymorphism
Solve
693
Chain to the Base Constructor`Vehicle` has a constructor that takes a `make` and stores it in `Make`. Complet...
easy○ Not Started
Polymorphism
Solve
564
Polymorphic List TotalComplete `AreaCalculator.TotalArea` so it returns the sum of `Area()` for every ...
medium○ Not Started
Polymorphism
Solve
565
Operator OverloadingOverload the `+` operator on the `Vector` class so adding two vectors adds their...
medium○ Not Started
Polymorphism
Solve
566
Iterate Interface ImplementersThe interface `IShape` is implemented by `Circle` and `Triangle`, each returning...
medium○ Not Started
Polymorphism
Solve
567
Classify By Runtime TypeComplete `Classifier.Classify` so it returns `Dog`, `Cat`, or `Unknown` dependin...
medium○ Not Started
Polymorphism
Solve
568
Generic Max MethodComplete the generic method `Max<T>` so it returns the larger of two values of A...
medium○ Not Started
Polymorphism
Solve
569
Implement Two InterfacesA class can implement more than one interface. Make `Duck` implement BOTH `IWalk...
medium○ Not Started
Polymorphism
Solve
570
Abstract Template MethodThe `abstract` class `Shape` has a concrete `Report()` method that combines two ...
medium○ Not Started
Polymorphism
Solve
571
Implement IComparableMake `Person` implement `IComparable<Person>` by ordering people by `Age` ascend...
medium○ Not Started
Polymorphism
Solve
586
Loop Over a Base-Type ArrayThe abstract class `Animal` declares `abstract string Sound()`. Create a `Dog` c...
medium○ Not Started
Polymorphism
Solve
587
Hide a Method with newThe `new` keyword HIDES an inherited method instead of overriding it. With hidin...
medium○ Not Started
Polymorphism
Solve
588
Safe Downcast with Pattern MatchingSometimes you must check an object's real type before using a method only the de...
medium○ Not Started
Polymorphism
Solve
589
Sum Areas Through an InterfaceThe `IShape` interface declares `int Area()`. Create a `Rectangle` class (constr...
medium○ Not Started
Polymorphism
Solve
590
Template Method Calls a VirtualA non-virtual base method can call a `virtual` method, and overriding that virtu...
medium○ Not Started
Polymorphism
Solve
591
Chained Overrides Across Three LevelsOverrides can build on each other level by level using `base`. `A.Name()` return...
medium○ Not Started
Polymorphism
Solve
592
Program to an InterfaceA method that accepts an interface type works with any class that implements it....
medium○ Not Started
Polymorphism
Solve
593
Polymorphic Factory From InputA factory method can return different subclasses through the same base type, cho...
medium○ Not Started
Polymorphism
Solve
694
Default Interface MethodGive the `IGreeter` interface a default method `Greet()` that returns the text `...
medium○ Not Started
Polymorphism
Solve
572
Build a Shape HierarchyBuild a polymorphic shape hierarchy from scratch. Define an `abstract` class `Sh...
hard○ Not Started
Polymorphism
Solve
573
Discount StrategiesBuild an interface-based strategy from scratch. Define an interface `IDiscount` ...
hard○ Not Started
Polymorphism
Solve
574
Money With Operator PlusBuild a `Money` class that supports the `+` operator. It stores whole `Dollars` ...
hard○ Not Started
Polymorphism
Solve
575
Polymorphic PayrollBuild a payroll hierarchy from scratch. Define an `abstract` class `Employee` wi...
hard○ Not Started
Polymorphism
Solve
594
Explicit Interface ImplementationWhen two interfaces declare a method with the SAME name, a class can implement e...
hard○ Not Started
Polymorphism
Solve
595
Generic Method (Parametric Polymorphism)Generics let one method work with ANY type. Write a generic method `Identity<T>`...
hard○ Not Started
Polymorphism
Solve
596
Generic Container ClassA generic class is a single class definition that adapts to whatever type you pl...
hard○ Not Started
Polymorphism
Solve
695
Covariant Return Type Override`Animal` declares a virtual `Clone()` that returns an `Animal`, and a virtual `S...
hard○ Not Started
Polymorphism
Solve