<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Interface on OOFP 2025-26</title>
    <link>https://unibz-oofp-25-26.github.io/docs/interface/</link>
    <description>Recent content in Interface on OOFP 2025-26</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <atom:link href="https://unibz-oofp-25-26.github.io/docs/interface/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Specification and programming interface</title>
      <link>https://unibz-oofp-25-26.github.io/docs/interface/sections/specification/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://unibz-oofp-25-26.github.io/docs/interface/sections/specification/</guid>
      <description>&lt;h1 id=&#34;specification-and-programming-interface&#34;&gt;&#xA;  Specification and programming interface&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#specification-and-programming-interface&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;specification&#34;&gt;&#xA;  Specification&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#specification&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;blockquote class=&#34;book-hint warning&#34;&gt;&#xA;&lt;p&gt;The &lt;strong&gt;specification&lt;/strong&gt; of a method primarily describes the &lt;a href=&#34;https://unibz-oofp-25-26.github.io/docs/background/sections/problem/&#34;&gt;problem&lt;/a&gt; that the method solves (i.e. its input and expected output).&lt;/p&gt;&#xA;&lt;p&gt;Optionally, the specification &lt;em&gt;may&lt;/em&gt; provide information about:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the behavior of the program for &lt;em&gt;invalid&lt;/em&gt; inputs (e.g. errors thrown by the method),&lt;/li&gt;&#xA;&lt;li&gt;its implementation (if this has an impact on performance ),&lt;/li&gt;&#xA;&lt;li&gt;etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote class=&#34;book-hint info&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Example.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;boolean&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;isSolvable&lt;/span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;int&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[][]&lt;/span&gt; grid)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;em&gt;Input:&lt;/em&gt;&lt;/strong&gt; a 9 x 9 array of integers with numbers between 0 and 9&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;em&gt;Output:&lt;/em&gt;&lt;/strong&gt; true is this array represents a sudoku grid with a unique solution (where 0 stands for the absence of value)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;em&gt;Errors:&lt;/em&gt;&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;if the array&amp;rsquo;s size is not 9 x 9&lt;/li&gt;&#xA;&lt;li&gt;if the array contains a number smaller that 0 or greater than 9&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote class=&#34;book-hint warning&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Variation.&lt;/em&gt;&lt;/strong&gt;&#xA;If a method has no return type or is not a &lt;a href=&#34;https://unibz-oofp-25-26.github.io/docs/paradigm/sections/pure/&#34;&gt;pure function&lt;/a&gt;, then the specification may indicate the effect of the method on its environment.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Java interface</title>
      <link>https://unibz-oofp-25-26.github.io/docs/interface/sections/java_interface/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://unibz-oofp-25-26.github.io/docs/interface/sections/java_interface/</guid>
      <description>&lt;h1 id=&#34;java-interface&#34;&gt;&#xA;  Java interface&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#java-interface&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;A Java interface is a &lt;a href=&#34;https://unibz-oofp-25-26.github.io/docs/interface/sections/specification/#programmingInterface&#34;&gt;programming interface&lt;/a&gt; with additional (object-oriented) features.&lt;/p&gt;&#xA;&lt;blockquote class=&#34;book-hint warning&#34;&gt;&#xA;&lt;p&gt;A Java interface is similar to a &lt;a href=&#34;https://unibz-oofp-25-26.github.io/docs/objects/sections/class/&#34;&gt;class&lt;/a&gt;, with the exception that the methods that it declares are (&lt;a href=&#34;#interfaceVsAbstractClass&#34;&gt;by default&lt;/a&gt;) &lt;em&gt;not implemented&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Instead, the interface only &lt;a href=&#34;https://unibz-oofp-25-26.github.io/docs/interface/sections/specification/#specification&#34;&gt;specifies&lt;/a&gt; the behavior of these methods.&#xA;Their implementations is found in the classes that implement the interface.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;chessPiece&#34;&gt;&#xA;  Illustration&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#chessPiece&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;blockquote class=&#34;book-hint info&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Example.&lt;/em&gt;&lt;/strong&gt;&#xA;We may declare an interface for chess pieces, as follows.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
