<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Interface Methods can be Redefined ??? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337370#M799972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Effectively, you are telling the runtime to not execute the code in rectangle but use the one in the square when the object references a square... using polymorphism basically. &lt;/P&gt;&lt;P&gt;So, an interface implementation method in the square scores over  the interface implementation in the rectangle, as square inherits rectangle. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should therefore think that you have to compare the interface implementations, and not the interface definitions during multilevel inheritance (since square does not directly inherit shape, but does so through rectangle). And hence redefinitions come into picture as with any other method implementation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Feb 2008 10:55:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-07T10:55:35Z</dc:date>
    <item>
      <title>Interface Methods can be Redefined ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337365#M799967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gurus,&lt;/P&gt;&lt;P&gt;i have a problem.&lt;/P&gt;&lt;P&gt;  -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;  &lt;U&gt;shape&lt;/U&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                          &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;  -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; Rectangle -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; Triangle -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                         |&lt;/P&gt;&lt;P&gt;  -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;  Square   -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;  -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;here shape is a interface having a method &lt;STRONG&gt;Area&lt;/STRONG&gt; and the classes rectangle and triangle are implementing the interface.&lt;/P&gt;&lt;P&gt;but Rectangle is Super class for Square class.&lt;/P&gt;&lt;P&gt;1. The Method Area is implemented or redefined in Square class ?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 06:11:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337365#M799967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T06:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Interface Methods can be Redefined ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337366#M799968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you look at inheritance, you check the immediate parent-child relationship.&lt;/P&gt;&lt;P&gt;Since rectangle class is the immediate parent of the square class, you would 'REDEFINE' or over-ride the method AREA in the square class.&lt;/P&gt;&lt;P&gt;This is because, there is already some code in the rectangle class, but you are re-writing the same in square class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when you look in to the SHAPE-RECTANGLE relationship, since SHAPE is an interface, you 'IMPLEMENT' the abstract method "AREA" of the SHAPE in RECTANGLE.&lt;/P&gt;&lt;P&gt;This is because, there is no code (abstract method) in Shape, and you are writing the code for the first time in the Rectangle class.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 06:55:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337366#M799968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T06:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Interface Methods can be Redefined ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337367#M799969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;according to ur answer the Area method should be redefined in the square class right .&lt;/P&gt;&lt;P&gt;but in the square class definition we need to write the code&lt;/P&gt;&lt;P&gt;Square class&lt;/P&gt;&lt;P&gt;Public section:&lt;/P&gt;&lt;P&gt;Methods : shape~Area Redefinition.&lt;/P&gt;&lt;P&gt;but this method declaration is not in the Rectangle class and the signature is in the interface.&lt;/P&gt;&lt;P&gt;so how it wl be redefined , it may be implementing ???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 07:27:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337367#M799969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T07:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Interface Methods can be Redefined ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337368#M799970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The very reason, you are redefining is that if you dont, the rectangle class' Area method will be called. You are redefining the code of the rectangle in the square, even though you are doing for a interface method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 07:54:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337368#M799970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T07:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Interface Methods can be Redefined ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337369#M799971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;interface methods cannot be redefined , it can be implemented alone , in that case it violates the rule . how it can be done ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ravi Chandar on Feb 7, 2008 11:42 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:17:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337369#M799971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T10:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Interface Methods can be Redefined ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337370#M799972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Effectively, you are telling the runtime to not execute the code in rectangle but use the one in the square when the object references a square... using polymorphism basically. &lt;/P&gt;&lt;P&gt;So, an interface implementation method in the square scores over  the interface implementation in the rectangle, as square inherits rectangle. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should therefore think that you have to compare the interface implementations, and not the interface definitions during multilevel inheritance (since square does not directly inherit shape, but does so through rectangle). And hence redefinitions come into picture as with any other method implementation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:55:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface-methods-can-be-redefined/m-p/3337370#M799972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T10:55:35Z</dc:date>
    </item>
  </channel>
</rss>

