title: PLS-00306: wrong number or types of arguments in call to "Oracle 11g ORDBMS"
body: <p>I have created Object type Inheritance to depict function overriding but it throws an error even though I have written both function definitions correctly and same. Can anyone solve the problem? </p>
  
  <ol>
  <li><p>Create type figures (name ,perimeter() with return value)</p></li>
  <li><p>Create type body Figure as a member function with a return value</p></li>
  <li><p>Create type Triangle (side1,2,3) overriding member function perimeter with return value</p></li>
  <li><p>Create body for Triangle</p></li>
  <li><p>display perimeter value of triangle 6 7 8</p></li>
  </ol>
  
  <p><strong>My Solution is</strong></p>
  
  <p>1.</p>
  
  <pre><code>create or replace type figures as object(
    name varchar2(10),
    member function perimeter return number
  )not final;
  /
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>create type body figures as
    member function perimeter return number is
    BEGIN
      return 0;
    END;
  END;
  /
  </code></pre>
  
  <p>3.</p>
  
  <pre><code>create or replace type triangle under figures(
    side1 number,
    side2 number,
    side3 number,
    overriding member function perimeter return number
  );
  /
  </code></pre>
  
  <p>4.</p>
  
  <pre><code>create or replace type body triangle as
    overriding member function perimeter return number is
      total number;
    BEGIN
      total:=self.side1+self.side2+self.side3;
      return total;
    END;
  END;
  /
  </code></pre>
  
  <p>5.</p>
  
  <pre><code>create table tbl_triangle of triangle;
  
  insert into tbl_triangle values('tri',5,6,7);
  
  select triangle.perimeter() from tbl_triangle;    --here the problem occurs
  </code></pre>