Liebe alle,

 

anbei HÜ4 Gruppe 3.

 

LG, Jana und Birgit

 

### Aufgabe 1 ####

 

/**/

p1 = .Abteilung~New; p1~department= "D1";

p1~ mitarbeiter= (150); p1~salary= "450000"

p2=.Abteilung~New~~"department="("D2")~~"salary="(25000)

p2~~"mitarbeiter="("18")

SAY "department = " p1~department"," "number of employees =" p1~mitarbeiter"," "average salary =" p1~salary

Say "department ="  p2~department"," "number of employees =" p2~mitarbeiter"," "average salary =" p2~salary

SAY p1~department p1~salary p1~~increaseSalary(10000)~salary

::CLASS Abteilung

::ATTRIBUTE department

::ATTRIBUTE mitarbeiter

::ATTRIBUTE salary

::METHOD increaseSalary

EXPOSE salary

USE ARG increase

salary = salary + increase

 

output

 

department =  D1, number of employees = 150, average salary = 450000

department = D2, number of employees = 18, average salary = 25000

D1 450000 460000

 

Process finished with exit code 0

 

 

### Aufgabe 1 ####

 

/**/

p1 = .Abteilung~New; p1~department= "D1";

p1~ mitarbeiter= (150); p1~salary= "450000"

p2=.Abteilung~New~~"department="("D2")~~"salary="(25000)

p2~~"mitarbeiter="("18")

SAY "department = " p1~department"," "number of employees =" p1~mitarbeiter"," "average salary =" p1~salary

Say "department ="  p2~department"," "number of employees =" p2~mitarbeiter"," "average salary =" p2~salary

SAY p1~department p1~salary p1~~increaseSalary(10000)~salary

::CLASS Abteilung

::ATTRIBUTE department

::ATTRIBUTE mitarbeiter

::ATTRIBUTE salary

::METHOD increaseSalary

EXPOSE salary

USE ARG increase

salary = salary + increase

 

 

output

 

department =  D1, number of employees = 150, average salary = 450000

department = D2, number of employees = 18, average salary = 25000

D1 450000 460000

 

Process finished with exit code 0