ВУЗ:
Составители:
Рубрика:
55
// Растения
class Plant
{
var $name;
var $age;
function setAge($mph)
{
$this->age = $mph;
}
function getAge()
{
return $this->age;
}
}
// Цветы
class Flowers extends Plant
{
var $FColor;
function setFColor($col)
{
$this->FColor = $col;
}
function getFColor()
{
return $this->FColor;
}
}
// Деревья
class Trees extends Plant
{
var $growth;
function setGrowth($gro)
{
$this->growth = $gro;
}
function getGrowth()
{
return $this->growth;
}
}
// Объекты этих классов создаются следующим образом:
$plan = new Plant;
55
// Растения
class Plant
{
var $name;
var $age;
function setAge($mph)
{
$this->age = $mph;
}
function getAge()
{
return $this->age;
}
}
// Цветы
class Flowers extends Plant
{
var $FColor;
function setFColor($col)
{
$this->FColor = $col;
}
function getFColor()
{
return $this->FColor;
}
}
// Деревья
class Trees extends Plant
{
var $growth;
function setGrowth($gro)
{
$this->growth = $gro;
}
function getGrowth()
{
return $this->growth;
}
}
// Объекты этих классов создаются следующим образом:
$plan = new Plant;
Страницы
- « первая
- ‹ предыдущая
- …
- 53
- 54
- 55
- 56
- 57
- …
- следующая ›
- последняя »
