0
0

More than 3 years have passed since last update.

menu.php

Posted at

<?php
class Menu {
public $name;
public $price;
public $image;

public function __construct($name, $price, $image) {
$this->name = $name;
$this->price = $price;
$this->image = $image;
}

public function hello() {
echo '私は'.$this->name.'です';
}

// getTaxIncludedPriceメソッドを定義してください
public function getTaxIncludedPrice(){
return floor($this->price*1.08);
}

}
?>
//税込み価格を表示する

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0