From 5f15f03d92c69761dbdf4b108efaba7d9a707a3f Mon Sep 17 00:00:00 2001 From: peet Date: Sat, 14 Sep 2024 17:41:40 +0000 Subject: [PATCH] small change --- .../uebung/uebung09/collection/SetTest.class | Bin 0 -> 3094 bytes bin/uebung07/quantities/plain/Length.class | Bin 2114 -> 0 bytes .../quantities/plain/LengthUnit.class | Bin 849 -> 0 bytes .../plain/PlainQuantitiesDemo.class | Bin 1353 -> 0 bytes bin/uebung07/quantities/plain/Quantity.class | Bin 1730 -> 0 bytes bin/uebung07/quantities/plain/Time.class | Bin 2156 -> 0 bytes bin/uebung07/quantities/plain/Unit.class | Bin 532 -> 0 bytes bin/uebung09/collection/BigSet$1.class | Bin 0 -> 1163 bytes bin/uebung09/collection/BigSet.class | Bin 0 -> 2825 bytes bin/uebung09/collection/EmptySet$1.class | Bin 0 -> 866 bytes bin/uebung09/collection/EmptySet.class | Bin 0 -> 2334 bytes bin/uebung09/collection/SetFactory.class | Bin 1018 -> 1361 bytes bin/uebung09/collection/SingeltonSet$1.class | Bin 0 -> 1053 bytes bin/uebung09/collection/SingeltonSet.class | Bin 0 -> 2410 bytes bin/uebung10/logo/BlackForest.class | Bin 0 -> 555 bytes bin/uebung10/logo/HanselGretelTest.class | Bin 1271 -> 1638 bytes bin/uebung10/logo/HanselGretelVisitor$1.class | Bin 1024 -> 1098 bytes bin/uebung10/logo/HanselGretelVisitor$2.class | Bin 0 -> 1005 bytes bin/uebung10/logo/HanselGretelVisitor$3.class | Bin 0 -> 1221 bytes .../logo/HanselGretelVisitor$DownState.class | Bin 860 -> 0 bytes .../HanselGretelVisitor$ShortUpState.class | Bin 804 -> 0 bytes .../logo/HanselGretelVisitor$State.class | Bin 676 -> 578 bytes bin/uebung10/logo/HanselGretelVisitor.class | Bin 3705 -> 3635 bytes src/uebung07/quantities/plain/Length.java | 46 ------------- src/uebung07/quantities/plain/LengthUnit.java | 14 ---- .../quantities/plain/PlainQuantitiesDemo.java | 60 ----------------- src/uebung07/quantities/plain/Quantity.java | 28 -------- src/uebung07/quantities/plain/Time.java | 41 ------------ src/uebung07/quantities/plain/Unit.java | 16 ----- src/uebung10/logo/BlackForest.java | 11 ++++ src/uebung10/logo/HanselGretelVisitor.java | 61 ++++++++++++------ 31 files changed, 54 insertions(+), 223 deletions(-) create mode 100644 bin/test/uebung/uebung09/collection/SetTest.class delete mode 100644 bin/uebung07/quantities/plain/Length.class delete mode 100644 bin/uebung07/quantities/plain/LengthUnit.class delete mode 100644 bin/uebung07/quantities/plain/PlainQuantitiesDemo.class delete mode 100644 bin/uebung07/quantities/plain/Quantity.class delete mode 100644 bin/uebung07/quantities/plain/Time.class delete mode 100644 bin/uebung07/quantities/plain/Unit.class create mode 100644 bin/uebung09/collection/BigSet$1.class create mode 100644 bin/uebung09/collection/BigSet.class create mode 100644 bin/uebung09/collection/EmptySet$1.class create mode 100644 bin/uebung09/collection/EmptySet.class create mode 100644 bin/uebung09/collection/SingeltonSet$1.class create mode 100644 bin/uebung09/collection/SingeltonSet.class create mode 100644 bin/uebung10/logo/BlackForest.class create mode 100644 bin/uebung10/logo/HanselGretelVisitor$2.class create mode 100644 bin/uebung10/logo/HanselGretelVisitor$3.class delete mode 100644 bin/uebung10/logo/HanselGretelVisitor$DownState.class delete mode 100644 bin/uebung10/logo/HanselGretelVisitor$ShortUpState.class delete mode 100644 src/uebung07/quantities/plain/Length.java delete mode 100644 src/uebung07/quantities/plain/LengthUnit.java delete mode 100644 src/uebung07/quantities/plain/PlainQuantitiesDemo.java delete mode 100644 src/uebung07/quantities/plain/Quantity.java delete mode 100644 src/uebung07/quantities/plain/Time.java delete mode 100644 src/uebung07/quantities/plain/Unit.java create mode 100644 src/uebung10/logo/BlackForest.java diff --git a/bin/test/uebung/uebung09/collection/SetTest.class b/bin/test/uebung/uebung09/collection/SetTest.class new file mode 100644 index 0000000000000000000000000000000000000000..1aa1f927983e176e95ef8adb7c446aa7f6522484 GIT binary patch literal 3094 zcmb7GTUQ%Z6#fng83+TVfl_I;(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5k$Ot-=XDOYP8^AMkgaTOyZ^$JN% zVVSQRpHcEXuHi?F;TOIzJjV4hvR4DL58;P^?4$T@3)%jjB-`IxC%Xxe=jdA}`|zOP iKWQy7tSUUfL$0z}Kc?&xe9AyRr$l!87x)U_p!Gk7lHQ5{ literal 0 HcmV?d00001 diff --git a/bin/uebung07/quantities/plain/Length.class b/bin/uebung07/quantities/plain/Length.class deleted file mode 100644 index 028c7076346a4c4b4ae3ccab7f02f30dd1d489f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2114 zcmb`HZBG+H5Xb*p3Z=*KU@n()e8%UV{ixAl70gb(Cv zH9<)v(f7vBWSqU0N(iMju}$yxt~0-x`OnV&{Qd1afM<9bL5RWddCqqVv-7FbdqZ z>>Y?QmEJTpDy6+***<|-ni4G8KKZT1n>(7#O;qATIQ+PmV|A2LOMptm9$lgsBZ@m2~X?8H37hyN$hzn2tkwRYO;+tPRQd`+m4@2Va}GfIO9XoNdYtETB% z7v(bPu|sVu)11&|rW2En33YzZO3fsV30C9N}8>E3VVM`v@a4 zuNKD`{X_=UfE@v-F92)9feTHDC^% zVaDny#}G$wVxtb>_oK*5AFOb$~z*L=6(wdm6F_&pyD5jQB zJo?Fx=h`%OhNabO*6M9CFrxEYUqotc5@OE!@}u diff --git a/bin/uebung07/quantities/plain/LengthUnit.class b/bin/uebung07/quantities/plain/LengthUnit.class deleted file mode 100644 index f51a92fc111eb4a103e2f03f06402fb86c3300af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 849 zcmZ`%U2oE07(Fkr@?jOlIz{JnUkW3xGfq)q8-y{}SacakLcCeQ2C8kDP)z&@UKr!0 zKfz1m#S%?Sy!FBh|B2Tcv*&$6!i8Cz^yzuedA?5j>We2d?G#x@r5}p!dXgf+!*av&So?MqsK|ZB+LJu9?RxCp8NKiJD=W#yBhf z&@dm5-y=j+1>&ahV5iZlmZ_++Ti&ZzD*~}%$91URhCn!zZ3;vx{bzOz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bg;;_H9X}T z+uM}m6(*TF%dtpubQ8$>n}Jf+-wXV9A;sO{kIey|W@(k;x3BmedU5nCg^OR2{X$g& zhxwliuDSN;+~Y4Dx*nl^D1h(7QS|dffFO(rBtKA+0r+O4Fcb9m?|O^tjIfUEI*u=W zq9P2E4le^>J(5FUZdMFNAd>`1&?i&;hBISCu(u;*1BCw2>L0aCkU4iV&SE&iDhC8v zl}$n$IQIhu;PW<8{V`J62vYE|T#A4iEUsVZfw8WiNX{mUvt6Oc_1vm7wFi+lWb^RB{Q6*D~f&3l9=c!uMD0TB|FIsgCw diff --git a/bin/uebung07/quantities/plain/Time.class b/bin/uebung07/quantities/plain/Time.class deleted file mode 100644 index 73a6f04e8cc910a0c5459facf1350e233a46d66a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2156 zcmeHI!EVz)5PfUXBsHOh00jyyo0NhBCFubPi6A6OK^$Bplr|E_O}a`K>~*l$5jpW$ zNFc$Tk3x(aLUY(AEfSo#%+9Q5pPy&ut-t^H{1w1cY!=`!tfsP)>fYwV#`{!gql}VC zqaO&R8@no$1>_j2$LG8r9U3y^QmqVw>u1OI$Zs;_A1iX6Ff4f6NBgxlWj~Ad3H&U> z;#)BgjX>yL<9QrMaS`X3GqnMA=r?(=RG_EjK^iZt)XQ74dL@`$_hS|(Py*UScK(N|i&O2dwfcLmJ`L)nkIB4~?P zW$~}goH88RkNzvrou{X+Vlx^R`bw zb%o*ObgC!U9K)G?HDGW|#IWH_D1Uazstg~e^Ei$8|7be1lFcGo+b&|Ap)#E+m5ib8 z`QveKPHTiOb7PN`!W{DC70E9g+Ifl|(9;~P?iaXk%B4?O_(qX~3uN<@nb|Vg z(xLC-A}&!xn#K~@F@i&TBZMm!gas?YwNoIJtq9AwKEWaT$`OYf77j~Rgw<0ZEL#z7 yf=_Tbszb%XVa1BDiZv_3Eek@$im;5^R)jkigmnvogBsP&!Cf?H&69Tz_kRLh12C5W diff --git a/bin/uebung07/quantities/plain/Unit.class b/bin/uebung07/quantities/plain/Unit.class deleted file mode 100644 index ddea055836c24bc881b7707a5c0a4bdb11e63ac1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 532 zcmaJ-%SyvQ6g`uskJQ-MTI&m>?$QdzoeM<}OIJk~)q=}O9O{&GqG{rHDOdy-et;h( z-kBC$6x__*$GPX6d%u4^zW`ifzYL4vAQxe-#wVx2bIw&JGbv`lQ_Q6b?v%{Ruo*Tc z{DlWGSL5I&oQNo6uoa&QhQ{EpHOx|}#%B!Gkk3S)M_H0GupUF{ToTme{2J5D-=B zuTgeSD4Tw-`vJFmG^fCyqyA=qoAfqJn{G|Rjy?d5HmTk=^d7d*qKpWP3^S1yvPfVX hJ4=~>e%&i}-{HMdU_q0YOtEGN-34Gt$gpcrd%pqvW8(k- diff --git a/bin/uebung09/collection/BigSet$1.class b/bin/uebung09/collection/BigSet$1.class new file mode 100644 index 0000000000000000000000000000000000000000..5479c6d61a86d0bdfd2b36debbed05ccfd17d771 GIT binary patch literal 1163 zcmaJ=+fEZv6kVqmhPH#PwSp8ZcWtLgLGgk`h!Tw?1rtknAn{>ZPRiggV`iqtZ}A&^ zz@)_BgCF2W8P}N>(nzt%x$U!Nowe8A{r%_XF90vGsUadT*_MsA(^_7uG+o=4&A@V< z$}6i?m%;pshL}L+*!*l(Y}08~-ZhSi&@d#B4WsSAvMbwx^vuBZ1cp5sv^_^23Wx)N zxF`K!TOe1v3a$zy>Q>7!`GFJ|9{^e3+pBI6HxwLM{`@kv)~*+;aO;+11seiW#s2|I z`vS2o_fRGva7)JsZX^-KZ5?Th3Pg*geRXq3hlb$<@|e^xA&|fRZ5?+}AgM}Mr7{Rf zKdUKBV^+hAz}Phq9dnqckJhE7qs7tyYpP1&Jsk-o1=2Okk-P1ahV=H#hD|rKHMeQn z`=)29b1xWEHVPC5%DbpIZPboTe^-8CCbZ%pg*cXUl(EPJoiLockkr=`{4QQBv0%!u zM>HCsa4DYgFZ(ToNU6?ILoO49go&S)Ca+k4G zxYsio)hXOZInv1R<|cRViHmTZG|Fel8b6RTqGuR0${mcKV@lu*3*UJk!F|qI#KJj& z9Jxj@!AOx2oowVl2?kdtip3uPDpz%vG&)!~#{+?HJayTI!kc^_L-LY=))Lj#z7i_^ zz_Vg1kZJ5IGDb}4>>%60!_zMN6M<7AqJ3JY=*Bel%~0`N-%EwwOV2{Q$kDpBP}uX{ ZqgAZ)9Ai7o;stlgO7*<@ZE!@8{|h>H^9ld} literal 0 HcmV?d00001 diff --git a/bin/uebung09/collection/BigSet.class b/bin/uebung09/collection/BigSet.class new file mode 100644 index 0000000000000000000000000000000000000000..9997eb49eeb5c5ad452166e7d16a1d3a03989d80 GIT binary patch literal 2825 zcmbVOU2_v<7(MT1OWJe`we~|OLV;@Y0hBKlNR2{iwVJkSO0^Y{ZSqCE~76viDS(J$ZLa4-l*;ZV`@^-61JOE=cstt#gn zDb~tvb=_@v@*ElM;I7wHI2zmAkk7%!_ohCmx6@C&BCpL#KljjZgIa@i(iuZcEAXnb zOOc%oCSx6@LK3G4Fm5dd-}LzuPU0s4GT5zz4k0^9s-{&qy z+p_3->+>n9{DNFQk(D2k!bJz~;9c&p7Tnd;S;DPU6wbu0Ds~n_@+o-<VxCuM{*$Zm8$}W^1ddgVpc2-JUYZXDH(y?}iMQEij@V zw;2=b0fz5}YO9*NyqA z+iYsSl!GfgyqC2cc1=uC8VP>-VDXp7BEJvt?~H{MKRg^e&qK5;(Gcw>Vi>P6@+Uqg zct4bVhLLRU3C6OgpJ3uwni4q7>j-RKQ@lD%9Ab%sI6}*mNy8+L@`(ka_VP^{TX=I% z)Ui&K=-EUKF^XGYtv09=A*h9LC}7|PPHqs`^kXI%I0wSykr0AR$Djy;wA-~vJBk!( zUS-bPY+>;}Y|l+*f5XIcWEAeqO+KQ{R6ZCElw;Isj(9fgFm7_94i@b>dQ~`@=`~EB z>2-!VrdNS?L1ra(s~g-GyKr0kaEry%;^7+Asz$iSazs7$3;OIw0zda0=PgKiJKT~1 zf0+Wf!d>ONz>h_3fH7PQ1+q(&_@v>bkOU=*;n~8DMj`Ko%sma&1r&3?<1ztcALsr? z;UO|vg7{G3Ij$=_#m7Hm;sw-3myw%WdMq}99-;o!f>=Ai$5~zeFG}J%yUz2k+YKUE z>>8lh8K8*eaKkcy*^KyP0HULBi1=j`8`gkqX$7mDSw0JAX^D>!quCr0Ka^oY%puY+ zQzUQ5ERw8clDXQ2Wwe836rXp;ZUQCs0;P?So6qp&UwrBo z`FdC5RHt!j9|__!jm0M=%B LyZlu6vE}(csT4IZ literal 0 HcmV?d00001 diff --git a/bin/uebung09/collection/EmptySet$1.class b/bin/uebung09/collection/EmptySet$1.class new file mode 100644 index 0000000000000000000000000000000000000000..d2706cf4bc1d2f262f206c4abecf508feaba85da GIT binary patch literal 866 zcmaJ<(M}UV6g{)scDL(dD2m~=NYJNM??bI#nmfBydX1>h|j4lIV{O!PA~*nHCr<0ulLma%HK zMyL8qSLphdg91bKgn#DEh^s;Kuzx}r2PKBtJez45H4n5%xQ-Ksk{-&mzDd08X~a8( z+?7h|J%-g_I<#@bP}q-;MHvh;J{-6nY*c)dQDv|L1E{p65}j<+7fFxzBSH4samb@1 zo=6jqlLcdsp*B^qzD4$&Ax}HvOy>fh$brg(xuDU$-3>yQyKNSo-8f4^@lG1!GgsYzWvUrA{ujK=+-UtSY3`Ae zN=t=NoJuwLAoMUkcJP#8Y1%A&Ji~JaS6&Zs{_2u96o}kEP)a2G5l>S=ZFD;#)$ij} zqei2#X%)e$RWl*_!)#h*c$B?Er)^mD0^a(@clhh)xciMF3-@R*5eAsYEbV@N_HZ9_ z6fr!Y{3XLn`Wl>Ne>M9=<-$azbzS)oj|lZR$1da^UQ=us+@Dzdc#bE(Z}F^5@VH~1 eB9?R1%9yE!Rf-E(Lme;ZWbS7;%@feFuyz6W+`DZ6 literal 0 HcmV?d00001 diff --git a/bin/uebung09/collection/EmptySet.class b/bin/uebung09/collection/EmptySet.class new file mode 100644 index 0000000000000000000000000000000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etFactory.class b/bin/uebung09/collection/SetFactory.class index 15c139e86a441229974953ac83dd601133cdd263..4762368c8b4efa4c996e759fb95bd9ce20d28351 100644 GIT binary patch literal 1361 zcmah|%TC)s6g}fOF$v*OXaWI31La`|5K1c~2#QoyAXN(OA`uc|<(N@w8f+AtO6dh97xv7Zd(XY+%)RsT_xE!EPw~WnCNSBOwU%37-6+^z zqakhI@!Ud1`a72Gd(ATgy1?L(^~NeREVo{GSvz8kKy1r#9lsdni2Fi{rU$l;EvRSoi4Jj~G_H3)MXEhyVUmoiIE9X=oSH7D?kp=Chw0!0nHy6U9 z85XZNb=UG+O-8P7RX5B3QZJUm@mtkuu~bZ87%2ny1tz+&+CDz<&v-#eq%k7UTbKTG z_tdvsn7{8Y+%kmkr-@sUv|gWL4KD1ybF( zvAu?D$YbfU??avB1=4@F_Uz=Uy%CZWSTPSeQK8%k*bI?;@PEy{n1g9xUSOoFaMia3 zjB;+R!$X0n62<`>?!u5Ur;?I0cZ{2^@O(sJA?-#8^i_Pze!Xj*1aog7FOaBst)?w^ z9Q8N`ZeHAqnpjMM<@rnj9h!Plv<+GXu7YcH@e6uBbE6@_zjE^sz5FLH_eu28ilZL` zj2h%#!@VHMOc24;UorG4IKRo!ALP(3k)zkhOn}@bDOD-{17rK7Frna)TNE<4D8%sq zIr^vgwMnUyXfv?jnIQE?+A;b}k}5CmZ${78^+@RhhBMLZ+HQX78)h|>-$q0> zrN6)Ul~m2d{lU#6%CKhR{_!%r=nG#ay!3x=F0lPHUwolz} e+c(X#RbuG7;O)f>JTjP82yVbD63!4CLd%HpSYHNqTc6vb_QWa2L7zXvPAuy#JqHU z*P^2QA`S*oMh3gkyrR_N{G77X6ousc+=9%U#FEVXJcWXy{G^=JTq^}GPS@OmlFH!J z5{2Z%yuADpg``vkm=-QB1|bG<9tKth2}TA{4IhLJ!6ikRdFj@gVT=sA8k3tCGlDo6 zWEdHI2wN8n)R&r5lAnj&N`;bqg+zst%7Rp`$puV#liQeUg|!%%fgWdI;M&a~6e%RK zok48>WC0f0dPxQ*1_7Wr6N3~3JCFvcV}z@d2B`zfasf#;u#6-FH&}#$p_74+K^CrG V4vT)UJ!tw>;rbaFwIQ%j9iCp>6EHW!eVK+p&PE!U3=B-#7)L?CsMhv$ zq-ev!7&Dq)AY1WaM@G9&$CuRK3|+_Hb0SaQ2ToH97N`v6udGtA)pPnSd8`sTJ~!J| zj{9!MIXXuRl3=k~YyRItR;SxuH*nZ4iW#Zac6Zm(n8SSw^8)2z?Xpq90z2R-d8prV z4d228!d%R#6}Dryx8=)28K|veS03qcXRwG#flND$BUirgbYmtjufVcK5LmiS@Yi!? z{_A|h249xj3S2+zbCY(Y>V^9@meJsHQ0!n&rq5e)rJkksb`Z#D(|7uP$w7>@WM91u z`wC?a)8H9FiYv^S0{Oh2I&TKgIBZ6<$$F=foLqhB6chC`r0p=`(3(HxR=O$OH1RHH10==G%1qy#0kn@zGLzA8LB`3(G+0Pp5enw)H;hIQ7&|s kE>W^cMe^1Xs``L(2@iQUxnGa4LMuaRO|E~dJSoim0eHdUlK=n! literal 0 HcmV?d00001 diff --git a/bin/uebung09/collection/SingeltonSet.class b/bin/uebung09/collection/SingeltonSet.class new file mode 100644 index 0000000000000000000000000000000000000000..8624d52a7593c1ca0347425aa884e758940d0acf GIT binary patch literal 2410 zcma)6ZF3V<6n<{9ZIUHGi2@?DL|)8Gp`n5zGz6ixT1n}QDIJTSHpw+z-0WtuH;(wl zf8!@U;EYaY?2LZ*M>(9cH`y*p){>dceL44>=RD6j_x}6eUw;F5gzXd(0{MY#4&2VI zdzF^wII^W|&#g3Uw<8_pxecjOFa#D}SU*`6$8tNBo#qQVmBPHh`I){_2^hALU4dME z(r-;5)37_Pr3QT|klfv+o%yQm+NvgSwm9uj+M@$SI>!@Z-D^t|Ni1Y>0%s^dv9y@Uk}! zQaIMTN@>?9M4II2TgvNGv|>qf94OnVY>oEm%*B}o9U+A!O7^&1udSL`M4pxTNZ@+$ z*z~ldzWobVqFCAzNZI~Ix2IkP>*ths%X5`wyQJ03+R%}NbOcT|l-2ri+v<(vg(W5MSCF>B&BKIhpzft4AV#Nh;`O-V;~rAzlQYrE8GzP{cm zJP;@x-OOjMKj`(mzLM>o9``AgZsX^c?C~Uxhs5cbYj=A(m~7{}QXP2hd?6aNV4{jg zoay6yG97k}k`Mr_xv3lAj?Td8%fTzB&35 z{7li9p(i*2lSVp>EY0=KNt_}}lhz3u&GHbZ%gcWv_dBhUc%S}H(MT2;?#Jv>YZUlJ(nL{k@6ZYlToyxGRNmI8)?)h%N=)b>Uo#J9A|HBE>~QSU}z z#zJs++{6m`9My0viMCb9CU6U@A;|U8p23J3|B2p`DZ&gP-NfL=)ZnQO4U5 zgD&o~_ne;Fetx~a131A>9w~|AwL%PxIGGto1Cmf_PTSOiOhEhi=aTyOiVQ#n=2!?V; z`#k7!BW*otW}<-{F>H4J-}Fb`A%o)?!Fw%3Yz)~(yWQ;OvBXfHioR8&I1IIkMDHpT zhDTDXv#~Ein-oxCsNE_#3B&-fLDYMeH H66E$ba#eLZ literal 0 HcmV?d00001 diff --git a/bin/uebung10/logo/HanselGretelTest.class b/bin/uebung10/logo/HanselGretelTest.class index 36adb1b1ad52534a865feeaca6bc61e2589fd126..bec3a7b9f8975e9650ffc376c60820050b648b56 100644 GIT binary patch delta 550 zcmZ{h-EPxB5QV=@paElvN<^V4NTm`NF{yA7Z~;c4P1BYiLxBc2;ZNEa%W|;dVmp<% z$}Do_}G{3?n}>>!EaCtVOYxq#AW*G-|Brlvx*Csx*ef z(!l;((U9>(U>VLaPHg3JmNlL7di5Yd&kG<;TY|z7I~^F ymN=~9jLK!sFv}vR)YqJ5A>*>AIFFejgZUP11dkNdRW4!B;<2g(Pt;wGr#}G>Mulhq delta 221 zcmaFH^PQ9H)W2Q(7#J8F8QeE=O=7C&&q^#y)Xz!GOV@WTD#|b7U~pt)@D9x@N-fUM zDN9XJNY2kK$jnJB$;{7FC@9KL%1O<&QsClr%1KPlcFPAUD^W;J%*)F!QAkQvfa@yB zS4dPSsVqq4;$pC4aOPogWn8-% p>>`C6wlg^G2lAL0w1FfWSVn?D2gv4usAAA#&VhYPtCh@NaPy|1a&Q7opv^9bWmU;zwCrNAJ0dfzoA#POA zg`L@**_}%b_X!VFws4#HsA_q+winsMw@6S;09OIk!#YczJX@u=8hkS;)9GS z6smksSB#{sOvFU4lff$?3=9m83`QHdw3yfx88jFfG<_xtC`kmDB$lLFb25lAXz?&;gTz^j zK|+(;nDQB!Cx2ryV04CVK62HR7eUjpg2 zCZLHg`~ZF^nyvY?pZH8N*!L4;;ch@$eLj z3|=x;u|7V_C*sebEeqW;kR=aI11Thz^R$QROT^$FsWcvlchcO%!hash^N;*9r)zr~ z4MLU3XmlX-SdmO`KZ-=W6Y?YxbW?>~RrydPdQT;qG*b)oC|Rv$rbV7jRzjK19r9kn z%Kle6YZq`kt3TjFY_z7g*xqk+nCQ0+XOHroX$Di)_2^w0=NVM zdQ|N=gEX?eGl4j`j|Um}As*$pR}^E)Rt?VBIUZl&*%kCs)yXwg)d_HUf>|Ym!LWZ5 lPp>7iJkiDqg<5E#O<$WP1^8t3Tno9>Vgnu9f&p7-`~_Rm);ItF literal 0 HcmV?d00001 diff --git a/bin/uebung10/logo/HanselGretelVisitor$3.class b/bin/uebung10/logo/HanselGretelVisitor$3.class new file mode 100644 index 0000000000000000000000000000000000000000..52ceb076dd4f4ddbc1e6a7ad71cc10636c016242 GIT binary patch literal 1221 zcma)5+int36kTT+puiNcR;2aP8!eaCLW_6QNLsZ`XkS`Md@&i|gpM6&$jqQW;)97_ zVFH@?;0O3iCdR#ov8hcHc$k@e*4cZlwf8ym>(7s$0P3hkp$M$>Wvg#>w<=}R?%L%& z-EyV*%8{Nln}%z6wv($yp$g>3CmwmaCj}zjiQ(od#N8NMQ={}JhGlrq1ojIPi|@_ zU4hl{&T>_1SLxbhudrKe#*jfait7SPW9Ot{4)Z+PzT>fz%muY$AFsu66St$dB{2Ix z?P8h@AMBko!bkmZQ8D3bq}O>Vs`|zean*0j;Xt@q@xN4gj0vo_4aJn!y?_35d9S* zo#yL8kxEY#Q-sGTx(CJIPn0%>h?myCL;Fgwf)u?Ylmxs*n%p%phD=(PB6iQYJM7J?M=e!aAwXHhrfxED1S>>@7^Fj2nm%P zbs}95>OSUB^HB+L)hv4}&FM%pf&72P7?`RsyI6}VMv zqPTi@5QH9DxaVMzurl)-eJo*tP>aQvQ7WRCKqtHg%quPkb~gxJ#y#=z6w3rBJ5_0Z z#4o`O+B2GO>HKFtR(1Ydre{X*4posJ%Xg7hVd*~uesLx~34;G2No2Yci!76@iF-YE zMwJt-?a3_PRauT@R^8^`h?-3;J>P6tT6*@oY`tR3;OHwi_0l(hZ>0)$xQTjc@V*aKfoU) zzKK#7gnG!#yqEVa^Udqq^9z6-%%@=yR%20*!`6CvEs!m_cIbsl1P77OBB=Sw*D@+p zuVkc8Z>!qVA`OSI^bd>~CZzP0uL@NRskx=d|_#+5*YqcaBDDD{_ z)Z}lEd+{y7E+*ER@;)SFsxpomV&69o#{S56_1e4h2<}lBifA|RloBe9X~KNR$Qbqg zaR^<>BN4ifh0=#oY0PmpHorIJawZ@?Ij~GX-0$IPgDZ>o>`LhonU&HL+y^c#^zoYF zA>a)Cyt>IbiyQ{H0tPYEroe~9Z{T?X%qRTR1`>ubl91&w`bkk@LL)`LDK5Tge^HEe h244OFv@y;a7A7#6T)<+@Da>%k=6%+&I4$#k>K$p)p(g+U diff --git a/bin/uebung10/logo/HanselGretelVisitor$State.class b/bin/uebung10/logo/HanselGretelVisitor$State.class index 823ded1407e01ab125963cee7ad520fe08751f1c..8dbdd870fffbaf887ab81901c2b0c5c9bab45c6c 100644 GIT binary patch delta 26 gcmZ3&dWdC%023bz1A{079|HrB7GvO>+`yy)06d}t$N&HU delta 139 zcmX@avV?Vm08>2!1A{079|I!;Cy=EL#Ec-k5lApG@B>LUuz(GN0FccCkz^2L5CZZT b7{mx`w8f&4nL!+=nTbJyL6TvzE|Vw#Z72s9 diff --git a/bin/uebung10/logo/HanselGretelVisitor.class b/bin/uebung10/logo/HanselGretelVisitor.class index 5a1d894e1b4462b45a60393b66549c110dc0ef9a..c04b278ea8085b0ef8e182a22896dc84144e4ec5 100644 GIT binary patch literal 3635 zcma)8X;%|h7=CU@m?R8^0xDP+T!0V|6t~tWErOsepe>71yA5Ov(J+b0M8#HHE!}JP zeLL-^er?YYJl1pU_x_juh1%!d43JDl51hl?duQI~x$pAa_vWAf{<;sK55H*e32e)o z(|IegXLolhok({dH>{kQ8p@isnVL-Il6E?)!7osI-ne9Rrwl96eRBG|Ib&<66j)aZ zb^rnu2_qvQ2Kb*7sI>E0J7o&2A1<{YSMOuAIG4_vIa^?(%VNODUKmv0XcfrWhE1Aw zmyw6hJIACcF;%Iwm6*t=r9dd2zHB*jJvW=q+AE(b4=1gp-7By!GT`EO+;qJya;<$* zz~7&an_*O7gN}MMG6#|NNevqXc9aI~*7o7r(=T56+iI6Y&eCXH-TuAP^Ddp1b{?N~#!l*c8hSAjNn{!W?JL?+fgyei?z zbTS?b)1QMno|MJ%<*C;|MjBGpuI&nV>du3BfP(U-KBA*nQv0Rm1T>OMV}T9j^om8G z)x80g=fNIAKaOeO>8dN0mNeHfh#+I(Nlj6Y$MLL&69NromOPO^5Qw^c8#6EFO>4$1k3NJ`ctOMSJn*HvE<<#TVVox1ov*+ws6((^; z!|AdZVMmxK?OeYzaYbt2`HIbZ@;J6SHBa%(?PxDCY#K z*+gb8j2IauR82;+)9u7ix@3Q)xe#VxYKXI;mZoMXt>c_5oIjq-*;1ObI+C(FzC>D{ z4!1c22~THDBi^6oF_MLz(_w+O{)B0tQT=B?zP_j6@hhWN>AI}=el!mK3TdQYi!ph|{8MaU}ellZb4Lg~(j$M%j;UtJR*m@?c8_a;>kDLS5Gb~b4xVp5GFF5AXU9gm?Vj0MbUc!zG3 zI`7dS3m1Sy9FdQM9*4_SA4eZD^&jfk2ScFKUD9O%mlU=LcuN9D1tM->*+DJ>eI`MD z9x7(vDQho9xGyD+GVp3ku6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gBhM54Qya+h1rvKHkVFwNScYUw3#tn%drn#l-1&*5@dJlq;1Wo znWJe_sb$`D=bS`KYy~nF#XK@{IPmB-b`%_&aW`YxNlq-*GG$zv$QV{iGVQ#M3%JM> zlBUbXadZyJ?N@ZXy0krAh1c<>hBsLI;*3@Xv5pkpB7-}I6dy%GPK)#pGw0qfeyc6$x$va z`a&8F1n`(6r)07e*nKVSo(!HyzEM|T^_{fZP5O*Gxy-D2*phR%DWHPgl1~DWaVu#X zoDo#(Eueu1>0_pM^!67hD(3f*u=-KkHZy}MBbzlzs))=@-Cz7PUT}G``QCQbF*ECq zn(~6kqLqy)<9|6S5rW1iD0#Uk$*V<4UMxzIE|hihK2?(UqLRFpC~JvRj|M&)`F4$% z<&^v4H?b;y8_m;PJhp(xxo(l`4GY-Fb=!2DFR=y0<9uw6Z&^Thyg9spt$)%wgzbE8 zQ1MhDjDz&jkF^*;C$GD1#Gs28UOJz^)Gpp+|_iBKz zLyTC)RUN;9?yegcT*Q$Q$n{LDr2w*eIlOA#MaMkIF%R-80V@a@Bi!-nedTv{h0FSW zM}2eoy6vNzb75b~YaA};&kPSM0D zfQu}{MV8_CL&$^MMJdy*lyHl9-;b8y@iq$*u3S!-zte&-KJa7A5yL9QsO@JPKlCu# zS>pU*>RQA{D~Bmxa-ppGUDyheG2^4D+(zwujC>9z3NmHz>%6b{q? diff --git a/src/uebung07/quantities/plain/Length.java b/src/uebung07/quantities/plain/Length.java deleted file mode 100644 index 5efacf3..0000000 --- a/src/uebung07/quantities/plain/Length.java +++ /dev/null @@ -1,46 +0,0 @@ -package uebung07.quantities.plain; - -import static uebung07.quantities.plain.LengthUnit.METER; -import static uebung07.quantities.plain.TimeUnit.SECOND; -import static uebung07.quantities.plain.VelocityUnit.METER_PER_SECOND; - -public class Length extends Quantity { - private final LengthUnit unit; - - public Length(double value, LengthUnit unit) { - super(value, unit); - this.unit = unit; - } - - public Length plus(Length other) { - return new Length(value + other.getBaseValue() / unit.baseFactor, unit); - } - - public Length minus(Length other) { - return new Length(value - other.getBaseValue() / unit.baseFactor, unit); - } - - public Length mult(double f) { - return new Length(value * f, unit); - } - - public Length div(double f) { - return new Length(value / f, unit); - } - - public Length to(LengthUnit unit) { - return new Length(getBaseValue() / unit.baseFactor, unit); - } - - public double div(Length other) { - return getBaseValue() / other.getBaseValue(); - } - - public Velocity div(Time t) { - return new Velocity(this.value(METER) / t.value(SECOND), METER_PER_SECOND); - } - - public Time div(Velocity v) { - return new Time(this.value(METER) / v.value(METER_PER_SECOND), SECOND); - } -} diff --git a/src/uebung07/quantities/plain/LengthUnit.java b/src/uebung07/quantities/plain/LengthUnit.java deleted file mode 100644 index c98102b..0000000 --- a/src/uebung07/quantities/plain/LengthUnit.java +++ /dev/null @@ -1,14 +0,0 @@ -package uebung07.quantities.plain; - -public class LengthUnit extends Unit { - public LengthUnit(String name, double baseFactor) { - super(name, baseFactor); - } - - public static final LengthUnit METER = new LengthUnit("m", 1); - public static final LengthUnit MILLIMETER = new LengthUnit("mm", 0.001); - public static final LengthUnit KILOMETER = new LengthUnit("km", 1000); - public static final LengthUnit MILE = new LengthUnit("mi", 1609.344); - public static final LengthUnit LIGHTYEAR = new LengthUnit("ly", 9460730472580800.0); - public static final LengthUnit PARSEC = new LengthUnit("pc", 3.0856776e16); -} diff --git a/src/uebung07/quantities/plain/PlainQuantitiesDemo.java b/src/uebung07/quantities/plain/PlainQuantitiesDemo.java deleted file mode 100644 index bfa6924..0000000 --- a/src/uebung07/quantities/plain/PlainQuantitiesDemo.java +++ /dev/null @@ -1,60 +0,0 @@ -package uebung07.quantities.plain; - -import static uebung07.quantities.plain.LengthUnit.KILOMETER; -import static uebung07.quantities.plain.LengthUnit.MILE; -import static uebung07.quantities.plain.LengthUnit.MILLIMETER; -import static uebung07.quantities.plain.LengthUnit.PARSEC; -import static uebung07.quantities.plain.TimeUnit.HOUR; -import static uebung07.quantities.plain.TimeUnit.MINUTE; -import static uebung07.quantities.plain.TimeUnit.SECOND; -import static uebung07.quantities.plain.VelocityUnit.KMH; -import static uebung07.quantities.plain.VelocityUnit.METER_PER_SECOND; -import static uebung07.quantities.plain.VelocityUnit.MPH; - -public class PlainQuantitiesDemo { - public static void main(String[] args) { - final Length l1 = new Length(1, KILOMETER); - final Length l2 = new Length(1200, MILLIMETER); - final Length l3 = new Length(1, MILE); - - System.out.println(l1); - System.out.println(l2); - System.out.println(l1 + " + " + l2 + " = " + l1.plus(l2)); - System.out.println(l1 + " + " + l2 + " (in mm) = " + l1.plus(l2).to(MILLIMETER)); - - System.out.println(l3 + " / " + l1 + " = " + l3.div(l1)); - - final Time t1 = new Time(100, SECOND); - final Time t2 = new Time(5, HOUR); - - System.out.println(t1); - System.out.println(t2); - System.out.println(t1.plus(t2)); - System.out.println(t1.plus(t2).to(MINUTE)); - - final Velocity v1 = new Velocity(12, KMH); - final Velocity v2 = new Velocity(100, METER_PER_SECOND); - - System.out.println(v1); - System.out.println(v2); - System.out.println(v2.to(KMH)); - System.out.println(v1.plus(v2)); - - final Length l4 = new Length(300, KILOMETER).to(PARSEC); - final Time t3 = new Time(2, HOUR); - final Velocity v3 = l4.div(t3); - System.out.println(l4 + " / " + l3 + " = " + v3); - - System.out.println(v1 + " * " + t1 + " = " + v1.mult(t1).to(KILOMETER)); - - final Length l5 = v3.mult(t1.to(HOUR)); - System.out.println(v3 + " * " + t1 + " = " + l5); - - final Time t5 = l4.div(v2); - System.out.println(l4 + " / " + v2 + " = " + t5.to(MINUTE)); - - Velocity v5 = new Velocity(55, MPH); - System.out.println(v5 + " = " + v5.format("%4.1f %s", KMH)); - System.out.println((v5.mult(new Time(30, MINUTE)).to(MILE))); - } -} diff --git a/src/uebung07/quantities/plain/Quantity.java b/src/uebung07/quantities/plain/Quantity.java deleted file mode 100644 index b2d6e70..0000000 --- a/src/uebung07/quantities/plain/Quantity.java +++ /dev/null @@ -1,28 +0,0 @@ -package uebung07.quantities.plain; - -public abstract class Quantity { - public final double value; - public final Unit unit; - - protected Quantity(double value, Unit unit) { - this.value = value; - this.unit = unit; - } - - public double getBaseValue() { - return value * unit.baseFactor; - } - - public double value(Unit unit) { - return getBaseValue() / unit.baseFactor; - } - - @Override - public String toString() { - return value + " " + unit; - } - - public String format(String fmt, Unit unit) { - return String.format(fmt, value(unit), unit); - } -} diff --git a/src/uebung07/quantities/plain/Time.java b/src/uebung07/quantities/plain/Time.java deleted file mode 100644 index 99c2044..0000000 --- a/src/uebung07/quantities/plain/Time.java +++ /dev/null @@ -1,41 +0,0 @@ -package uebung07.quantities.plain; - -import static uebung07.quantities.plain.LengthUnit.METER; - -public class Time extends Quantity{ - private final TimeUnit unit; - - public Time(double value, TimeUnit unit) { - super(value, unit); - this.unit = unit; - } - - public Time plus(Time other) { - return new Time( value + other.getBaseValue() / unit.baseFactor, unit); - } - - public Time minus(Time other) { - return new Time( value - other.getBaseValue() / unit.baseFactor, unit); - } - - public Time mult(double f) { - return new Time( value * f, unit); - } - - public Time div(double f) { - return new Time( value / f, unit); - } - - public Time to(TimeUnit unit) { - return new Time(getBaseValue() / unit.baseFactor, unit) - } - - public double div(Time other) { - return getBaseValue() / other.getBaseValue(); - } - - public Length mult(Velocity v) { - return new Length(this.value(METER), METER); - } - -} diff --git a/src/uebung07/quantities/plain/Unit.java b/src/uebung07/quantities/plain/Unit.java deleted file mode 100644 index efaa8d7..0000000 --- a/src/uebung07/quantities/plain/Unit.java +++ /dev/null @@ -1,16 +0,0 @@ -package uebung07.quantities.plain; - -public abstract class Unit { - public final String name; - public final double baseFactor; - - public Unit(String name, double baseFactor) { - this.name = name; - this.baseFactor = baseFactor; - } - - @Override - public String toString() { - return name; - } -} diff --git a/src/uebung10/logo/BlackForest.java b/src/uebung10/logo/BlackForest.java new file mode 100644 index 0000000..cefb8d9 --- /dev/null +++ b/src/uebung10/logo/BlackForest.java @@ -0,0 +1,11 @@ +package uebung10.logo; + +public class BlackForest implements DarkForest{ + + @Override + public void breadCrumb(double x, double y) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'breadCrumb'"); + } + +} diff --git a/src/uebung10/logo/HanselGretelVisitor.java b/src/uebung10/logo/HanselGretelVisitor.java index 8fe1f5c..70921f0 100644 --- a/src/uebung10/logo/HanselGretelVisitor.java +++ b/src/uebung10/logo/HanselGretelVisitor.java @@ -47,23 +47,21 @@ public class HanselGretelVisitor implements Visitor { } private void breadCrumb() { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'breadCrumb'"); + forest.breadCrumb(turtle.getX(), turtle.getY()); } private void layTrail(double d) { - forest.breadCrumb(turtle.getX(), turtle.getY()); + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'layTrail'"); } private abstract class State { abstract void go(double dist); - void up() {} - void down() {} + abstract void up(); + abstract void down(); } - private final State shortUp = new ShortUpState();// muss nicht geschrieben werden - private final State down = new DownState();// muss nicht geschrieben werden - private final State longUp = new State(){ + private final State longUpState = new State(){ @Override void go(double d) {turtle.go(d);} @@ -71,25 +69,52 @@ public class HanselGretelVisitor implements Visitor { @Override void down(){ breadCrumb(); - state = down; + state = downState; } + @Override + void up() {} + }; - private class DownState extends State{ + private final State downState = new State(){ + + @Override void go(double d){ layTrail(d); } - void up(){state = shortUp;} - } + @Override + void up(){state = shortUpState;} - //TODO - private class ShortUpState extends State { - void go(double d){} - void up(){} - void down(){} - } + @Override + void down() {} + }; + + private final State shortUpState = new State() { + + @Override + void go(double dist) { + turtle.go(dist); + gap = gap + dist; + + if (gap < s) { + + } else { + gap = 0; + state = longUpState; + } + } + + @Override + void up() {} + + @Override + void down() { + state = downState; + } + + }; private void go(double d) {