0
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();
        }


    }
}
2
Contributors
2
Replies
11
Views
2 Years
Discussion Span
Last Post by pirat4e
Featured Replies
  • 1

    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. Read More

1

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.