CJCoding With Joseph
TitleTopicsAction
597
Implement a Simple InterfaceThe interface `IGreeter` declares a `Greet()` method. Complete the `EnglishGreet...
easy○ Not Started
Interfaces
Solve
598
Interface Method With ParametersThe interface `ICalculator` declares `int Add(int a, int b)`. Complete the `Calc...
easy○ Not Started
Interfaces
Solve
599
Interface With a Read-Only PropertyThe interface `INamed` declares a read-only property `string Name { get; }`. The...
easy○ Not Started
Interfaces
Solve
600
Void Method and State in an InterfaceThe interface `ICounter` declares a `Value` property and a `void Increment()` me...
easy○ Not Started
Interfaces
Solve
601
An Interface With Multiple MethodsThe interface `IMathOps` declares both `Add` and `Subtract`. Complete the `MathO...
easy○ Not Started
Interfaces
Solve
602
Compute Area Through an InterfaceThe interface `IShape` declares `double Area()`. The `Rectangle` class stores a ...
easy○ Not Started
Interfaces
Solve
603
Interface Method Returning a BooleanThe interface `INumberChecker` declares `bool IsEven(int n)`. Complete the `Numb...
easy○ Not Started
Interfaces
Solve
604
Build a Formatted DescriptionThe interface `IProduct` declares `string Describe()`. The `Book` class stores a...
easy○ Not Started
Interfaces
Solve
605
A Temperature Converter InterfaceThe interface `IConverter` declares `int ToFahrenheit(int celsius)`. Complete th...
easy○ Not Started
Interfaces
Solve
606
Properties and a Method TogetherThe interface `IRectangle` declares two read-only properties, `Width` and `Heigh...
easy○ Not Started
Interfaces
Solve
607
Polymorphism With a List of InterfacesThe interface `IAnimal` declares `string Speak()`. Complete `Cat` so it returns ...
easy○ Not Started
Interfaces
Solve
608
Use a Method Argument in an InterfaceThe interface `IWelcomer` declares `string Welcome(string name)`. Complete the `...
easy○ Not Started
Interfaces
Solve
609
Model a Bank Account With an InterfaceThe interface `IBankAccount` declares a `Balance` property and a `Deposit(int am...
easy○ Not Started
Interfaces
Solve
622
Implement a Greeter InterfaceThe `IGreeter` interface is already declared with one method, `Greet`. Complete ...
easy○ Not Started
Interfaces
Solve
623
Read-Only Interface PropertyThe `IPerson` interface requires a read-only `Name` property. The `Person` class...
easy○ Not Started
Interfaces
Solve
624
Implement an Interface Method That Changes StateThe `ICounter` interface requires a `Count` property and an `Increment` method. ...
easy○ Not Started
Interfaces
Solve
625
Polymorphism With an InterfaceThe `IAnimal` interface declares `string Speak()`. Complete the `Dog` and `Cat` ...
easy○ Not Started
Interfaces
Solve
626
Accept an Interface as a ParameterThe `IMessage` interface declares `string GetText()`, and the `Hello` class alre...
easy○ Not Started
Interfaces
Solve
627
Check the Interface Type With isComplete the `Inspector.Describe` method so it returns `chargeable` when the giv...
easy○ Not Started
Interfaces
Solve
628
Implement a Property With a Private SetterThe `IBankAccount` interface requires a read-only `Balance` property and a `Depo...
easy○ Not Started
Interfaces
Solve
629
Interface Method Returning a Formatted StringThe `IMovable` interface declares `string Move(int distance)`. Complete the `Car...
easy○ Not Started
Interfaces
Solve
630
Implement Several Interface MethodsThe `ILight` interface has a `IsOn` property and `TurnOn`/`TurnOff` methods. The...
easy○ Not Started
Interfaces
Solve
631
Computed Property From an InterfaceThe `IShape` interface requires a read-only `Area` property. The `Rectangle` cla...
easy○ Not Started
Interfaces
Solve
632
Boolean-Returning Interface MethodThe `IValidator` interface declares `bool IsValid(string input)`. Complete the `...
easy○ Not Started
Interfaces
Solve
696
Implement IDisposable to Release a ResourceComplete the `Logger` class so that it implements the `IDisposable` interface. I...
easy○ Not Started
Interfaces
Solve
697
Clone an Object With ICloneableComplete the `Point` class so that it implements the `ICloneable` interface. The...
easy○ Not Started
Interfaces
Solve
610
Implement Two InterfacesA class can implement more than one interface. `IWalker` declares `Walk()` and `...
medium○ Not Started
Interfaces
Solve
611
Interface InheritanceOne interface can extend another. `IPet` extends `IAnimal`, so a class implement...
medium○ Not Started
Interfaces
Solve
612
Sum Areas Through an InterfaceThe interface `IShape` declares `double Area()`. Complete `Rectangle` (area is w...
medium○ Not Started
Interfaces
Solve
613
Test for an Interface With `is`Complete the static method `ShapeInspector.Describe(object item)`. If `item` imp...
medium○ Not Started
Interfaces
Solve
614
A Factory That Returns an InterfaceComplete the static method `ShapeFactory.Create(string kind)`. When `kind` is `"...
medium○ Not Started
Interfaces
Solve
615
Sorting With IComparableThe `Book` class implements `IComparable<Book>`. Complete `CompareTo` so books o...
medium○ Not Started
Interfaces
Solve
616
Value Equality With IEquatableThe `Point` class implements `IEquatable<Point>`. Complete `Equals(Point other)`...
medium○ Not Started
Interfaces
Solve
617
Swappable Behavior With an InterfaceThe interface `IDiscount` declares `int Apply(int price)`. Complete `NoDiscount`...
medium○ Not Started
Interfaces
Solve
633
Aggregate Over a List of Interface ValuesThe `IPriced` interface declares `int Price()`, and the `Coffee` (3) and `Cake` ...
medium○ Not Started
Interfaces
Solve
634
Interface That Inherits Another Interface`IShape` inherits from `IDrawable`: `IDrawable` declares `Draw()` and `IShape` a...
medium○ Not Started
Interfaces
Solve
635
Sort Objects With IComparableThe `Box` class stores a `Volume` and implements `IComparable<Box>`. Complete `C...
medium○ Not Started
Interfaces
Solve
636
Use a Default Interface MethodThe `INamed` interface declares `GetName()` and provides a DEFAULT implementatio...
medium○ Not Started
Interfaces
Solve
637
Custom Sort Order With IComparerWrite a `DescendingComparer` class that implements `IComparer<int>` so its `Comp...
medium○ Not Started
Interfaces
Solve
638
Strategy Pattern With an InterfaceThe `IOperation` interface declares `int Apply(int a, int b)`. Write two strateg...
medium○ Not Started
Interfaces
Solve
698
Fluent Interface Returning the Same TypeComplete the `PathBuilder` class so that it implements the `IPathBuilder` interf...
medium○ Not Started
Interfaces
Solve
618
Default Interface MethodC# interfaces can provide a DEFAULT method body. Add a default method `Greet()` ...
hard○ Not Started
Interfaces
Solve
619
Explicit Interface Implementation`IEnglish` and `ISpanish` each declare a method named `Hello()`. Because the nam...
hard○ Not Started
Interfaces
Solve
620
A Generic InterfaceInterfaces can be generic. `IContainer<T>` declares `void Add(T item)` and `T Ge...
hard○ Not Started
Interfaces
Solve
621
Generic Method Constrained to an InterfaceComplete the generic method `MathUtil.Max<T>` with the constraint `where T : ICo...
hard○ Not Started
Interfaces
Solve
639
Implement IEnumerable With yieldWrite a `Countdown` class that implements `IEnumerable<int>`. Given a start valu...
hard○ Not Started
Interfaces
Solve
640
Implement a Generic InterfaceThe generic interface `IContainer<T>` declares `Add(T item)`, `Get(int index)`, ...
hard○ Not Started
Interfaces
Solve
641
Interface With an IndexerThe `IWordBank` interface declares a read-only indexer `this[int index]` and a `...
hard○ Not Started
Interfaces
Solve
642
Factory Method Returning an InterfaceThe `IShape` interface declares `string Name()`, and the `Circle` (returns `circ...
hard○ Not Started
Interfaces
Solve
699
Covariant Generic InterfaceMake the generic interface `IProducer<T>` covariant and complete `StringProducer...
hard○ Not Started
Interfaces
Solve