<?php
abstract class Employee {
public $amount;
public $rang;
public $leader;
public $salary;
public $coffee;
public $reports;
public function __construct ($amount, $rang, $leader) {
$this->amount = $amount;
$this->rang = $rang;
$this->leader = $leader;
if ($this->leader == true) {
$this->salary *= 1.5;
$this->coffee *= 2;
$this->reports = 0;
}
}
// Возвращает кол-во людей (ме) или (ма) или (ин) или (ан).
public function getAmount () {
return $this->amount;
}
public function getSalary () {
$realSalary = $this->amount * $this->salary;
if ($this->rang == 1) {
$realSalary = $realSalary;
} elseif ($this->rang = 2) {
$realSalary *= 1.25;
} else {
$realSalary *= 1.5;
}
return $realSalary;
}
public function getCoffee () {
return $this->coffee;
}
public function getReports () {
return $this->reports;
}
}
class EmployeeList {
public $depName;
public $employeeList;
public function __construct ($depName, $employeeList) {
$this->depName = $depName;
$this->employeeList = $employeeList;
}
public function getDepName () {
return $this->depName;
}
public function getEmployeeList() {
return $this->employeeList;
}
public function returnAmount() {
$number = 0;
foreach ($this->employeeList as $employee){
$number += $employee->getAmount();
}
return $number;
}
public function returnTotalSalary () {
$number = 0;
foreach ($this->employeeList as $employee){
$number += $employee->getSalary();
}
return $number;
}
public function returnCoffee () {
$number = 0;
foreach ($this->employeeList as $employee){
$number += $employee->getCoffee();
}
return $number;
}
public function returnReports () {
$number = 0;
foreach ($this->employeeList as $employee){
$number += $employee->getReports();
}
return $number;
}
public function returnAvgSandR() {
$avg = $this->returnTotalSalary() / $this->returnAmount();
}
}
class Manager extends Employee {
public $salary = 500;
public $coffee = 20;
public $reports = 200;
}
class Marketer extends Employee {
public $salary = 400;
public $coffee = 15;
public $reports = 150;
}
class Engineer extends Employee {
public $salary = 200;
public $coffee = 5;
public $reports = 50;
}
class Analyst extends Employee {
public $salary = 800;
public $coffee = 50;
public $reports = 5;
}
//Департамент закупок: 9×ме1, 3×ме2, 2×ме3, 2×ма1 + руководитель департамента ме2
$obj1 = new Manager(9,1,false);
$obj2 = new Manager(3,2,false);
$obj3 = new Manager(2,3,false);
$obj4 = new Marketer(2,1,false);
$obj5 = new Manager(1,2,true);
$DepOfPurchases = new EmployeeList
("Закупок", array($obj1, $obj2, $obj3, $obj4, $obj5));
//Департамент продаж: 12×ме1, 6×ма1, 3×ан1, 2×ан2 + руководитель ма2
$obj6 = new Manager(12,1,false);
$obj7 = new Marketer(6,1,false);
$obj8 = new Analyst(3,1,false);
$obj9 = new Analyst(2,2,false);
$obj10 = new Marketer(1,2,true);
$DepOfSales = new EmployeeList
("Продаж", array($obj6, $obj7, $obj8, $obj9, $obj10));
//Департамент рекламы: 15×ма1, 10×ма2, 8×ме1, 2×ин1 + руководитель ма3
$obj11 = new Marketer(15,1,false);
$obj12 = new Marketer(10,2,false);
$obj13 = new Manager(8,1,false);
$obj14 = new Engineer(2,1,false);
$obj15 = new Marketer(1,3,true);
$DepOfAdvertising = new EmployeeList
("Рекламы", array($obj11, $obj12, $obj13, $obj14, $obj15));
//Департамент логистики: 13×ме1, 5×ме2, 5×ин1 + руководитель ме1
$obj16 = new Manager(13,1, false);
$obj17 = new Manager(5,2,false);
$obj18 = new Engineer(5,1,false);
$obj19 = new Manager(1,1,true);
$DepOfLogistics = new EmployeeList
("Логистики", array($obj16, $obj17, $obj18, $obj19));
$departaments = array($DepOfPurchases, $DepOfSales, $DepOfAdvertising, $DepOfLogistics);
function padRight($string, $length) {
$spaces = $length - $lengthStr;
if ($spaces >= 0) {
} else {
return ' ' . mb_substr($string, 0, $length - 2) . '.'; }
}
function padLeft ($string, $length) {
$spaces = $length - $lengthStr;
if ($spaces >= 0) {
} else {
return '.' . mb_substr($string, 0, $length - 2) . ' '; }
}
$sumAmount = 0;
$sumTotalSalary = 0;
$sumCoffee = 0;
$sumReports = 0;
$sumSandR = 0;
// Ширина колонок
$col1 = 30;
$col2 = 12;
// Заголовок таблицы
echo padRight("Департамент", $col1) .
padLeft("сотр.", $col2) .
padLeft("тугр.", $col2) .
padLeft("кофе", $col2) .
padLeft("стр.", $col2) .
padLeft("тугр./стр.", $col2) ."\n";
// Сама таблица
foreach ($departaments as $departament) {
echo padRight($departament->getDepName(), $col1) .
padLeft($departament->returnAmount(), $col2) .
padLeft($departament->returnTotalSalary(), $col2) .
padLeft($departament->returnCoffee(), $col2) .
padLeft($departament->returnReports(), $col2) .
padLeft($departament->returnAvgSandR(), $col2) .
"\n";
$sumAmount += $departament->returnAmount();
$sumTotalSalary += $departament->returnTotalSalary();
$sumCoffee += $departament->returnCoffee();
$sumReports += $departament->returnReports();
$sumSandR += $departament->returnAvgSandR();
}
echo padRight("Среднее", $col1) .
padLeft
($sumAmount / count($departaments), $col2) . padLeft
($sumTotalSalary / count($departaments), $col2) . padLeft
($sumCoffee / count($departaments), $col2) . padLeft
($sumReports / count($departaments), $col2) . padLeft
($sumSandR / count($departaments), $col2) . "\n";
echo padRight("Всего", $col1) .
padLeft($sumAmount, $col2) .
padLeft($sumTotalSalary, $col2) .
padLeft($sumCoffee, $col2) .
padLeft($sumReports, $col2) .
padLeft($sumSandR, $col2) . "\n";
// Тесты
$ivan = new Manager(1, 1, false);
echo "Зарплата Ивана: {$ivan->getSalary()}\n";
$ivan->leader = true;
echo "Зарплата Ивана после повышения: {$ivan->getSalary()}\n";
PD9waHAKCmFic3RyYWN0IGNsYXNzIEVtcGxveWVlIHsKICAgIHB1YmxpYyAkYW1vdW50OwogICAgcHVibGljICRyYW5nOwogICAgcHVibGljICRsZWFkZXI7CiAgICBwdWJsaWMgJHNhbGFyeTsKICAgIHB1YmxpYyAkY29mZmVlOwogICAgcHVibGljICRyZXBvcnRzOwoKCiAgICBwdWJsaWMgZnVuY3Rpb24gX19jb25zdHJ1Y3QgKCRhbW91bnQsICRyYW5nLCAkbGVhZGVyKSB7CiAgICAgICAgJHRoaXMtPmFtb3VudCA9ICRhbW91bnQ7CiAgICAgICAgJHRoaXMtPnJhbmcgPSAkcmFuZzsKICAgICAgICAkdGhpcy0+bGVhZGVyID0gJGxlYWRlcjsKCiAgICAgICAgaWYgKCR0aGlzLT5sZWFkZXIgPT0gdHJ1ZSkgewog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gZnVuY3Rpb24gIF9fY29uc3RydWN0ICgkZGVwTmFtZSwgJGVtcGxveWVlTGlzdCkgewogICAgICAgICR0aGlzLT5kZXBOYW1lID0gJGRlcE5hbWU7CiAgICAgICAgJHRoaXMtPmVtcGxveWVlTGlzdCA9ICRlbXBsb3llZUxpc3Q7CiAgICB9CgogICAgcHVibGljIGZ1bmN0aW9uIGdldERlcE5hbWUgKCkgewogICAgICAgIHJldHVybiAkdGhpcy0+ZGVwTmFtZTsKICAgIH0KCiAgICBwdWJsaWMgZnVuY3Rpb24gZ2V0RW1wbG95ZWVMaXN0KCkgewogICAgICAgIHJldHVybiAkdGhpcy0+ZW1wbG95ZWVMaXN0OwogICAgfQoKICAgIHB1YmxpYyBmdW5jdGlvbiByZXR1cm5BbW91bnQoKSB7CiAgICAgICAgJG51bWJlciA9IDA7CiAgICAgICAgZm9yZWFjaCAoJHRoaXMtPmVtcGxveWVlTGlzdCBhcyAkZW1wbG95ZWUpewogICAgICAgICAgICAkbnVtYmVyICArPSAkZW1wbG95ZWUtPmdldEFtb3VudCgpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gJG51bWJlcjsKICAgIH0KCiAgICBwdWJsaWMgZnVuY3Rpb24gcmV0dXJuVG90YWxTYWxhcnkgKCkgewogICAgICAgICRudW1iZXIgPSAwOwogICAgICAgIGZvcmVhY2ggKCR0aGlzLT5lbXBsb3llZUxpc3QgYXMgJGVtcGxveWVlKXsKICAgICAgICAgICAgJG51bWJlciArPSAkZW1wbG95ZWUtPmdldFNhbGFyeSgpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gJG51bWJlcjsKICAgIH0KCiAgICBwdWJsaWMgZnVuY3Rpb24gcmV0dXJuQ29mZmVlICgpIHsKICAgICAgICAkbnVtYmVyID0gMDsKICAgICAgICBmb3JlYWNoICgkdGhpcy0+ZW1wbG95ZWVMaXN0IGFzICRlbXBsb3llZSl7CiAgICAgICAgICAgICRudW1iZXIgKz0gJGVtcGxveWVlLT5nZXRDb2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