Liebe alle,
anbei HÜ Gruppe 1!
Viele Grüße
Katharina, Kenan, Hans
Übung 1:
p1= .Person~New
p1~firstName= "Alex"
p1~gebDatum= "12.12.2000"
p1~Stadt= "Linz"
p1~Alter= "10"
p2=.Person~New~~"firstName="("Kenan")~~"gebDatum="("16.05.1955")~~"Stadt="("Wien")~~"Alter="(20)
SAY p1~firstName p2~Stadt p1~Gebdatum p2~Alter
SAY p1~firstName p1~Alter p2~~increaseAge(10)~Alter
Say p1~~increaseAge(10)~Alter
::CLASS Person
::ATTRIBUTE firstName
::ATTRIBUTE gebDatum
::ATTRIBUTE Stadt
::ATTRIBUTE Alter
::METHOD increaseAge
EXPOSE Alter
USE ARG increase
Alter = Alter + increase
Output:
REXXout>Alex Wien 12.12.2000 20
REXXout>Alex 10 30
REXXout>20
Übung 2:
Person = .Kind ~New ~~"name="("Baby") ~~Schreien
.grosesKind ~New ~~"name="("Teenager") ~Schreien
::CLASS Kind SUBCLASS Object
::ATTRIBUTE name
::METHOD Schreien
Say self~name":" "AHHHH"
::CLASS grosesKind SUBCLASS Kind
::ATTRIBUTE name
::METHOD Schreien
Say self~name":" "Alter, loss mi in Rua!"
Output:
REXXout>Baby: AHHHH
REXXout>Teenager: Alter, loss mi in Rua!
_________________________________
Johann Wolfschwenger (er/ihn, he/him)
Forschungsservice (Forschungsinformationssystem PURE)
Research Service Center (Research Information System PURE)
WU
Wirtschaftsuniversität Wien
Vienna University of Economics and Business
Building AR, 6.10, Welthandelsplatz 1, 1020 Vienna, Austria
Tel: +43-1-313 36-5107
Fax: +43-1-313 36-905107
E-Mail:
johann.wolfschwenger@wu.ac.at