Open FerrerFerreAlex opened 5 years ago
Structural, Functional, OO programming.pdf
function EmployeeFunctionalProgramming
%names =
employees = {'Oriol', 1000;
'Marc',5000;
'Alex',3000};
employees = changeSalaries(employees)
end
function changedSalaryEmployee = changeSalary(employee)
changedSalaryEmployee = employee;
changedSalaryEmployee{2} = changedSalaryEmployee{2} + 10000;
end
function employees = changeSalaries(employees)
for iEmployee = 1:length(employees)
employees(iEmployee,:) = changeSalary(employees(iEmployee,:));
end
end
Abstract Factory File AbstractFactory.pdf