You are viewing a single comment's thread. Return to all comments →
PHP Solution
class MyBook extends Book { protected $price; function __construct($title,$author,$price) { Book::__construct($title, $author); $this->price = $price; } function display() { echo "Title: {$this->title}"; echo "Author: {$this->author}"; echo "Price: {$this->price}"; } }
}
Seems like cookies are disabled on this browser, please enable them to open this website
Abstract Classes
You are viewing a single comment's thread. Return to all comments →
PHP Solution
}