예제 #1
0
파일: BAPWD-oop.php 프로젝트: ImtiH/BAPWD
<?php 
require_once 'product-oop.php';
$name = new product3();
echo $name->type;
?>


<br>


<?php 
require_once 'product-oop.php';
$name = new product4();
//echo $name -> type;  // kaj korbena.
echo $name->getProductType();
// kaj korbe.
?>

<br>
<?php 
require_once 'calculator-oop.php';
$calc = new calculator();
$calc->add(5 + 10);
$calc->add(20);
$calc->subtract(5);
// output will be : 35-5 = 30
echo $calc->getTotal();
?>