Question: Im trying to implement a system like the class diagram below.  

I would like to define... an interface, a base class that implements part of the interface, and child classes that implement the rest of the interface.  

Is there a way I can do this? I tried this in C# but the compiler complains that the base class does not fully implement the interface.
If possible I would like a solution that would work for C# and PHP

![enter image description here](https://i.stack.imgur.com/Fyr4g.gif)

Answer: 
The solution, which works both in C# and PHP, is to make both the base class and the methods you are not implementing in it `abstract`. Here's the PHP version:

```
interface IStep
{
    public function name();
    public function log();
    public function run();
    public function undo();
}

abstract class BaseStep implements IStep
{
    public function name() {}
    public function log() {}
    abstract public function run();
    abstract public function undo();
}

```

Specifically in PHP you also have the option of using a [trait](http://www.php.net/manual/en/language.oop5.traits.php) instead of a base class. That doesn't seem to be good design in this case, but it can come in handy:

```
trait BaseStep
{
    public function name() {}
    public function log() {}
}

class StepOne implements IStep
{
    use BaseStep;

    public function run() {}
    public function undo() {}
}

```
The issue is that `iStep` makes a contract asking for you to implement all its methods and fields, but `BaseStep` does not implement `run()` and `undo()`.

Possible solutions is to make `BaseStep` an abstract class, or implement these methods (even with blank bodies), or implement the interface only in the child classes.