code-examples/2015/2015_03/ada/algorytmy/workers.adb

25 lines
566 B
Ada

package body workers is
function get_salary(this: worker) return Float is
begin
return this.salary;
end get_salary;
procedure set_salary(this: out worker;
val: Float) is
begin
this.salary := val;
end set_salary;
procedure greet(this: worker) is
begin
to.Put("Pozdrowienia od pracownika ");
to.Put(su.To_String(this.get_name));
to.Put(". Zarabiam ");
fo.Put(this.salary, EXP => 0, AFT => 0);
to.Put_Line(" miesiecznie.");
end greet;
end workers;