<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<blockquote cite="mid595EAAA0-710E-4557-9CF9-781ADE1BF920@deis.unibo.it"
type="cite">On 01/mar/07, at 16:42, Gianluca Baù wrote:
<br>
<br>
<blockquote type="cite">Se non si può fare con le interfacce, esiste
un altro metodo?
<br>
</blockquote>
<br>
IL metodo è la semplice derivazione! :)
<br>
<br>
Cris
<br>
<br>
</blockquote>
<br>
?!?!? Non ho capito scusa<br>
<br>
Cmq penso che la soluzione sia questa,<br>
<h4><font face="Verdana, Arial, Helvetica" size="-1">Abstract Classes</font></h4>
<p><font face="Verdana, Arial, Helvetica" size="-1">An abstract class
is a class that is only partially implemented by the programmer. It may
contain one or more abstract methods. An abstract method is simply a
function definition that serves to tell the programmer that the method
must be implemented in a child class. </font></p>
<p><font face="Verdana, Arial, Helvetica" size="-1">To create an
abstract class we use the code shown in Listing 1:
</font></p>
<p><font face="Verdana, Arial, Helvetica" size="-1"><b>Listing 1: An
Abstract PHP class</b></font></p>
<pre><font face="Verdana, Arial, Helvetica" size="-1"><?php
abstract class Weapon
{
private $SerialNumber;
abstract public function fire();
public function __construct($SerialNumber)
{
$this->SerialNumber = $SerialNumber;
}
public function getSerialNumber()
{
return $this->SerialNumber;
}
}
?>
Condividi ??
</font></pre>
<br>
</body>
</html>