name = $name; $this->price = $price; } public function answer() { echo "This is {$this->name} and the price is {$this->price}."; } } // product1 is inherited from product class product1 extends product { public function question() { echo "What is this? "; } } $product1 = new product1("Laptop", "45000"); $product1->question(); $product1->answer(); ?>