title: Is it a good practice to add public methods in a class which are not in Interface definition? When should I do that?
body: <p>Not very clear with OOP concepts, could be a silly question, please ignore the silliness of it :-)</p>
  <p>The question is related to the class below. There I have added a public method &quot;TestMethod()&quot;, which is not defined in the interface (below).</p>
  <ol>
  <li>Is it a bad practice? Should all methods must be defined in Interface?</li>
  <li>In which cases am I allowed to implement a public methods/members in a class, but not in an Interface?</li>
  </ol>
  <p>The Interface...</p>
  <pre><code>public interface IAnimals
  {
      void MakeNoise(string noise);
      void Move();
      string Color
      {
          get;
          set;
      }
  }
  </code></pre>
  <p>The Class Implementation...</p>
  <pre><code>class Animal : IAnimals
  {
      private string color;
      string IAnimals.Color
      {
          get
          {
              return color;
          }
          set
          {
              color = value;
          }
      }
      void IAnimals.MakeNoise(string noise)
      {
          Console.WriteLine(&quot;Animal &quot; + noise);
      }
      void IAnimals.Move()
      {
          Console.WriteLine(&quot;Animal moves&quot;);
      }
      public void TestMethod()
      {
          Console.WriteLine(&quot;test method in Animal class&quot;);
      }
  }
  </code></pre>
  <p>The Program...</p>
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          //Animal1 show methods and properties defined in the Interface
          IAnimals animal1 = new Animal();
  
          //Animal2 only shows the public method of Animal class
          Animal animal2 = new Animal(); 
  
          animal1.Color = &quot;Red&quot;;
          Console.WriteLine(&quot;Animal's color is &quot; + animal1.Color);
          animal1.MakeNoise(&quot;Barks&quot;);
          animal1.Move();
  
  
          animal2.TestMethod();
  
          Console.ReadLine();
      }
  }
  </code></pre>
  <p>And The Output...</p>
  <blockquote>
  <p>Animal's color is Red</p>
  <p>Animal Barks</p>
  <p>Animal moves</p>
  <p>test method in Animal class</p>
  </blockquote>