'+', '-', '*', '/');
function __construct($a1, $a2, $eesliide){
$this->arv1=$a1;
$this->arv2=$a2;
$this->eesliide=$eesliide;
$this->loeSaabuvadAndmed();
}
function kysiSumma(){
switch ($this->valitud_tehe) {
case 0: return $this->arv1+$this->arv2; break;
case 1: return $this->arv1-$this->arv2; break;
case 2: return $this->arv1*$this->arv2; break;
case 3: return $this->arv1/$this->arv2;
}
}
function kysiHTML(){
return "".
$this->tehete_valik().
"
".$this->kysiSumma()."
";
}
function loeSaabuvadAndmed(){
if(isset($_REQUEST[$this->eesliide."_a1txt"])){
$this->arv1=intval($_REQUEST[$this->eesliide."_a1txt"]);
$this->arv2=intval($_REQUEST[$this->eesliide."_a2txt"]);
$this->valitud_tehe = intval($_REQUEST["tehe".$this->eesliide]);
}
}
public function tehete_valik() {
$ret_val = "