From b8ec1005b3f43bb029fa3610e3709e8a3fcc9a8b Mon Sep 17 00:00:00 2001 From: m-takatsuki <26-m-takatsuki-webstar@it-college.co.jp> Date: Mon, 19 Oct 2026 14:31:51 +0900 Subject: [PATCH] =?UTF-8?q?Ex.11=20=E5=AE=8C=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Question11-VariousClasses/Ex01.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Question11-VariousClasses/Ex01.php b/Question11-VariousClasses/Ex01.php index 5440186..1461655 100644 --- a/Question11-VariousClasses/Ex01.php +++ b/Question11-VariousClasses/Ex01.php @@ -18,3 +18,12 @@ * 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(); \ No newline at end of file