using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace interfejsi

     interface Figura
    {
      String Plostina ();
      String Perimeter ();
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace interfejsi
{
     class Kvadar : Figura
    {
        int a,b,c;
        public  String Perimetar(int a, int b, int c)
        {
            return (a + b + c).ToString();
        }
        public String Plostina(int a, int b, int c)
        {
            return (a * b * c).ToString();
        }


    }
}

Recommended Answers

Your interface methods don't match the implemented methods of the same name. The implementations have three arguments, the interface states that those methods should take no arguments. Therefore, these are unrelated methods to those declared in the interface.

Jump to Post

All 2 Replies

Your interface methods don't match the implemented methods of the same name. The implementations have three arguments, the interface states that those methods should take no arguments. Therefore, these are unrelated methods to those declared in the interface.