Check Laptop details by php
//
<?php /*Here class is created a template for laptop*/ class laptop{ public $design; public $version; public $price; public $policies; /*Above all are features of laptop*/ public function __construct($design,$version,$price,$policies){ $this->A = $design; $this->B = $version; $this->C = $price; $this->D = $policies; } /*after construction we'll make a function to use simplest program */ public function generation(){ return "\n this is"."\t".$this->A."\n and it's generation\t".$this->B."\n and price \t".$this->C."\n and policies \t".$this->D; } } /* here we'll make a new object for laptop and a note with generation function */ $desktop = new laptop("mac","6th","1,00467","2022-24"); echo $desktop->generation()."\n"; echo "\n \t"; echo "Second brand"; echo "\n"; $desktop = new laptop("dell","i3","23,467","2022-24"); echo $desktop->generation(); ?>