Ex.11 完了

This commit is contained in:
2026-10-19 14:31:51 +09:00
parent 1295c8cd43
commit b8ec1005b3

View File

@@ -18,3 +18,12 @@
* 4. 最後に、$product の各プロパティ (name, price, category) の値を出力してください。 * 4. 最後に、$product の各プロパティ (name, price, category) の値を出力してください。
* *
*/ */
// ファイルの読み込み
require_once __DIR__ . '/Product.php';
// $productという変数に、new Productという箱の()の中を代入する
$product = new Product("Laptop", 1500, "Electronics");
$product -> echoname();
$product -> echoprice();
$product -> echocategory();