I'm trying to understand the following code used in Nop Commerece task. It has classes which are implemented as below. The project is in the Plugins folder. One class implements ITask interface.

Public class foo:ITask
{
  public void Execute()
  {
    ......

  }
}

Another implements BasePlugin, Iplugin

public class SmartWarehousePlugin : BasePlugin, IPlugin
{

   public override void Install()
   {
     ...
   }

   public override void Uninstall()
   {
     ....
   }
   ....
}


I understand the concept of Task and Plugin in NOP. I went through different tutorials. But I didn't find one where ITask and BasePlugin,IPlugin are used together. Why and when we need to do this?