<?php

abstract class Employee {
	abstract public $rang;
	abstract public $solary;
	abstract public $leader;
	
	public function __construct($rang = 1, $leader = false) {
		$this->rang = $rang;
		$this->leader = $leader;
		
		self::calculateSolary();
	}
	
	public function calculateSolary() {
		switch ($this->rang) {
			case 2:
				$this->solary = $this->solary + ($this->solary * 0.25);
				break;
			case 3:
				$this->solary = $this->solary + ($this->solary * 0.50);
				break;
		}
	
		if ($leader) {
			$this->solary = $this->solary + ($this->solary * 0.50);
		}
	
		return $this->solary;
	}
	
}

class Engineer extends Employee {
	public $solary = 500;
}


$engineer = new Engineer(2);

...
