Created
May 22, 2024 17:44
-
-
Save urielhdz/aca811050d64340a23d9cec55e068b0e to your computer and use it in GitHub Desktop.
Sesión 2 PHP Labs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class Employee { | |
public $employee_id; | |
public $name; | |
public $phone; | |
public $rfc; | |
abstract public function saludar(); | |
} | |
class RegularEmployee extends Employee{ | |
public $salary; | |
public $bonus; | |
public function saludar(){ | |
return 'Hola'; | |
} | |
} | |
class ContractEmployee extends Employee{ | |
public $pay_per_hour; | |
public $contract_period; | |
public function saludar(){ | |
return 'Hola'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment