Ex.11 完了
This commit is contained in:
@@ -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();
|
||||
Reference in New Issue
Block a user