Ejemplo n.º 1
0
 public function printProperties()
 {
     $s = parent::printProperties();
     $s .= 'Ширина: ' . $this->getWidth() . "см<br>\n";
     $s .= 'Висота: ' . $this->getHeight() . "см<br>\n";
     return $s;
 }
Ejemplo n.º 2
0
echo $discount . "<br>";
echo "<br>\n";
$history = new Book();
$history->setName("Історія");
$history->setCategory(0);
$history->setAuthor("З.Усова");
$history->setPrice(400);
$history->setAvailability(true);
$properties = $history->printProperties();
echo $properties;
$history->getCategory();
echo "Ціна зі знижкою:";
$discount = $history->discount();
echo $discount . "<br>";
echo "<br>\n";
$history = new Book();
$history->setName("Php.Обучение на примерах");
$history->setCategory(1);
$history->setAuthor("А.Кухарчик");
$history->setPrice(700);
$history->setAvailability(true);
$properties = $history->printProperties();
echo $properties;
$history->getCategory();
echo "Ціна зі знижкою:";
$discount = $history->discount();
echo $discount . "<br>";
echo "<br>\n";
echo "Картини<br>";
$picture = new Picture();
$picture->setName("Ліс");