pp += $aj;
}
public function ajouterpo($aj) {
$this->po += $aj;
}
public function ajouterpa($aj) {
$this->pa += $aj;
}
public function ajouterpc($aj) {
$this->pc += $aj;
}
public function ajouterall($monnaie){
$this->pp += $monnaie->getPp();
$this->po += $monnaie->getPo();
$this->pa += $monnaie->getPa();
$this->pc += $monnaie->getPc();
}
public function afficher(){
$tresor='';
if($this->pc!=0) $tresor.= $this->pc.' pièces de cuivre.
';
if($this->pa!=0) $tresor.= $this->pa.' pièces d\'argent.
';
if($this->po!=0) $tresor.= $this->po.' pièces d\'or.
';
if($this->pp!=0) $tresor.= $this->pp.' pièces de platine.
';
return $tresor;
}
/**
* @return the $pp
*/
public function getPp() {
return $this->pp;
}
/**
* @return the $po
*/
public function getPo() {
return $this->po;
}
/**
* @return the $pa
*/
public function getPa() {
return $this->pa;
}
/**
* @return the $pc
*/
public function getPc() {
return $this->pc;
}
/**
* @param field_type $pp
*/
public function setPp($pp) {
$this->pp = $pp;
}
/**
* @param field_type $po
*/
public function setPo($po) {
$this->po = $po;
}
/**
* @param field_type $pa
*/
public function setPa($pa) {
$this->pa = $pa;
}
/**
* @param field_type $pc
*/
public function setPc($pc) {
$this->pc = $pc;
}
}
?>