From d24413f050a1e7e301263bc81aedf285996bb49b Mon Sep 17 00:00:00 2001 From: KyMAN <0kyman0@gmail.com> Date: Mon, 11 Mar 2024 18:57:03 +0100 Subject: [PATCH] =?UTF-8?q?feat(java):=20El=20juego=20de=20adivinar=20el?= =?UTF-8?q?=20n=C3=BAmero=20est=C3=A1=20hecho.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + Actividad31/build.xml | 73 + Actividad31/build/built-jar.properties | 4 + .../classes/actividad31/Actividad31.class | Bin 0 -> 3020 bytes .../actividad31/Aplicaciones/Cliente$1.class | Bin 0 -> 1241 bytes .../actividad31/Aplicaciones/Cliente$2.class | Bin 0 -> 920 bytes .../actividad31/Aplicaciones/Cliente.class | Bin 0 -> 3005 bytes .../actividad31/Aplicaciones/Servidor$1.class | Bin 0 -> 2602 bytes .../actividad31/Aplicaciones/Servidor$2.class | Bin 0 -> 936 bytes .../actividad31/Aplicaciones/Servidor$3.class | Bin 0 -> 2205 bytes .../actividad31/Aplicaciones/Servidor.class | Bin 0 -> 3629 bytes .../actividad31/Drivers/Terminal$1.class | Bin 0 -> 2300 bytes .../actividad31/Drivers/Terminal.class | Bin 0 -> 1223 bytes .../Interfaces/Terminalnterfaz.class | Bin 0 -> 200 bytes Actividad31/dist/Actividad31.jar | Bin 0 -> 23895 bytes Actividad31/dist/README.TXT | 32 + Actividad31/manifest.mf | 3 + Actividad31/nbproject/build-impl.xml | 1771 +++++++++++++++++ Actividad31/nbproject/genfiles.properties | 8 + .../nbproject/private/private.properties | 2 + Actividad31/nbproject/project.properties | 95 + Actividad31/nbproject/project.xml | 15 + Actividad31/src/actividad31/Actividad31.java | 76 + .../src/actividad31/Aplicaciones/Cliente.java | 111 ++ .../actividad31/Aplicaciones/Servidor.java | 184 ++ .../src/actividad31/Drivers/Terminal.java | 58 + .../Interfaces/Terminalnterfaz.java | 16 + 27 files changed, 2449 insertions(+) create mode 100644 .gitignore create mode 100644 Actividad31/build.xml create mode 100644 Actividad31/build/built-jar.properties create mode 100644 Actividad31/build/classes/actividad31/Actividad31.class create mode 100644 Actividad31/build/classes/actividad31/Aplicaciones/Cliente$1.class create mode 100644 Actividad31/build/classes/actividad31/Aplicaciones/Cliente$2.class create mode 100644 Actividad31/build/classes/actividad31/Aplicaciones/Cliente.class create mode 100644 Actividad31/build/classes/actividad31/Aplicaciones/Servidor$1.class create mode 100644 Actividad31/build/classes/actividad31/Aplicaciones/Servidor$2.class create mode 100644 Actividad31/build/classes/actividad31/Aplicaciones/Servidor$3.class create mode 100644 Actividad31/build/classes/actividad31/Aplicaciones/Servidor.class create mode 100644 Actividad31/build/classes/actividad31/Drivers/Terminal$1.class create mode 100644 Actividad31/build/classes/actividad31/Drivers/Terminal.class create mode 100644 Actividad31/build/classes/actividad31/Interfaces/Terminalnterfaz.class create mode 100644 Actividad31/dist/Actividad31.jar create mode 100644 Actividad31/dist/README.TXT create mode 100644 Actividad31/manifest.mf create mode 100644 Actividad31/nbproject/build-impl.xml create mode 100644 Actividad31/nbproject/genfiles.properties create mode 100644 Actividad31/nbproject/private/private.properties create mode 100644 Actividad31/nbproject/project.properties create mode 100644 Actividad31/nbproject/project.xml create mode 100644 Actividad31/src/actividad31/Actividad31.java create mode 100644 Actividad31/src/actividad31/Aplicaciones/Cliente.java create mode 100644 Actividad31/src/actividad31/Aplicaciones/Servidor.java create mode 100644 Actividad31/src/actividad31/Drivers/Terminal.java create mode 100644 Actividad31/src/actividad31/Interfaces/Terminalnterfaz.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ + diff --git a/Actividad31/build.xml b/Actividad31/build.xml new file mode 100644 index 0000000..78b5c0d --- /dev/null +++ b/Actividad31/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Actividad31. + + + diff --git a/Actividad31/build/built-jar.properties b/Actividad31/build/built-jar.properties new file mode 100644 index 0000000..732bfbe --- /dev/null +++ b/Actividad31/build/built-jar.properties @@ -0,0 +1,4 @@ +#Mon, 11 Mar 2024 18:54:03 +0100 + + +/home/DAM2024/PSP03_Tarea/Actividad31= diff --git a/Actividad31/build/classes/actividad31/Actividad31.class b/Actividad31/build/classes/actividad31/Actividad31.class new file mode 100644 index 0000000000000000000000000000000000000000..4c3ab8f78ce0af14b43e9534f2865bec0192f076 GIT binary patch literal 3020 zcmai0TT>jz75;iJ%0npxs0VI-5MthraEuQguxRYm;7CMZRaWLEc0c zp5UQsqb8j|pnGuk@sLVG*E2Xm9etAWGw2a8EXP)Es4{qx8?lgsfj$$*bYAV2ucW_x z5SxK-n<(h5ws@=VAd8cD+CaaFXK<=H>a8GD6^827h)Q=HmhBaeQH9KUUZV*a0WKO3VbBe(z4K<`$U&>(=&l)&wqKNMZbVWEcAIQY3 z`gq5E45>Y@iy52|*tq8TgIBnp&0)34L$H4Of zCmJ;-s*Y_*%l2Fq6zBI@bQZ}hZ}J5bIecH>>Dm8lQ_5is=QX2$ATTo6WH3XL__w6R zBlaSRSMHXE7WFw7OuUE*l9PH-paRF6JUpIA$-tyQ;cKIsjG39k#W;~^6FqoI;AE56 zrsV4;%wq;u47_Y&7IS+Hh>COSj-{$0p%Tcgs&GyPfm~%BJu!GFk!En!#5MeoY^U~o zD6RDcpCB;q!J!*X)Z5#da#V#C#Te$XVBkk47V+9%LDWLqDNc|#TcmR)^kTXR3=B3p zi#y0+)Yd>RnYfM{j6d|{io7k|vL_&}=WrG`O}ws4v&B+8gPr6eZt6R|sqI!wSSSm0 zkhQDcvUHRTJ>RBr;>HYZsx{?@+7*Siy{cQ3PE92N<1>NOnisHw^G#{%j#SFP5y(28 zC7oEOv*MM#<*Mf|m(?wHL%L1H4Xb0;cGWAj%8K$Ax-#y%_c;> z&3Ap!GD~z=kv6aKNE3AX^~-(fuhKMW53yF z4*9;{#+o_BpfcxK%5mGz&3iT9Qq#6hvUB1f_S3o{ap|Jxg#jDlhSeK?NE^zzZH0MR435{IevbVQ z@YFWCAK>^lI_}}b$cGpJb}_PzR*L!OIMq2PqnuAMH`<^br;w-Odl*JN|*6Mwf7h(lNBPP8cx1#PfXfzi4Y~%NPiUFVg-J?WYd6 ze}VQTCb@;Xb^9yyt1r5TXbkV-GVzFKuROr3b#P)rv`65M^YjZi%Ae^2V)W48&*&qo ze>m!X*CMaLP;v)9zK3%kBg^+LesT{}(R^wb%l9xI&Bu4~#sTwAlKQ|Tfw{!PrpUo* zqWu#3aGBqSGrW^4&?u*o>}+kN^3V5Ay)3cOX*?LJ(CxQ+yh5 wJwi7iDjlq%E5#WBNde$D4y{EkwNv)|*7_%nL{2RD!GKL7v# literal 0 HcmV?d00001 diff --git a/Actividad31/build/classes/actividad31/Aplicaciones/Cliente$1.class b/Actividad31/build/classes/actividad31/Aplicaciones/Cliente$1.class new file mode 100644 index 0000000000000000000000000000000000000000..2c75f1440f58c6fc0608901774f894fc14b80504 GIT binary patch literal 1241 zcmah|TTc^F5dKc7-FDeZEl@5hlv=edg;MceE<%Hmq=2EOiI0cv0T#Er&F+@ykMWsj zj3V*DM<4tz{sSY<*;Xh*LX$n0IWylk{buIppKsp*ETSAi06hwV8m=M4km9;$>>G7n zpDh-anx>(1-LNg;7Rsg}EKj71488l@Oq)XYS`KFzuI%xBUNG#!a%+2AIHJBOcwIOp z6=6gas2X~qF~oc~lUqB5jjcV3W(dt0mfN$qBQ;J{!g9;KFhA@1Nw)(;KM1$Du7LgC0=KY%DJc<^)K}nC|rh;1< zZext0|6dkeJ`74zMwk|XWG*IGcw<=0z{E#bUr1IH`2&dnNk40-PugWj&;GNiBMOczU(y!1}bQ2Sl!Pu`KL zv14&+K1!#@X^}!oLs%}~qkH^fIl3#|RSE)%Rz0r2TjNbXX$55JYSMN)F{o9$<>=z2 zAyw2mV=yfxCN)+p-Lze5yEWnM+I0ml7?M}%Og+3VTq0f-O2*xQ3 z$vFmv)=9$36K8>5rf7tw$zH?+G0I$$g4x~yoSjBTaNDY k6MADxdl?Usd5)d~n5RDvx-Amel5bhWGVLmXN|EUI7axEnlmGw# literal 0 HcmV?d00001 diff --git a/Actividad31/build/classes/actividad31/Aplicaciones/Cliente$2.class b/Actividad31/build/classes/actividad31/Aplicaciones/Cliente$2.class new file mode 100644 index 0000000000000000000000000000000000000000..5db4e011139d543a0af1274f4a2f10a63456785f GIT binary patch literal 920 zcmah{ZEq4m5PlXYSLg~zZMDAEdMaFNuf-33z-SE7XvAv7VB)vs*us+QUUPfL|1xQ7 z;s<|#Kgu|JkPxGWOKxX(GV?t1%*@YU-+usjj#dddxnlbsUl{ JQ?%7Z-*4eB&w~H} literal 0 HcmV?d00001 diff --git a/Actividad31/build/classes/actividad31/Aplicaciones/Cliente.class b/Actividad31/build/classes/actividad31/Aplicaciones/Cliente.class new file mode 100644 index 0000000000000000000000000000000000000000..c71c034440520ab8c857a40d2ca27f04b8d0dd4c GIT binary patch literal 3005 zcma)8SyL2O6#njj^f-=+xPc3d1{E+0qH!D1C~jj0FoGbO7@M98G}F^PcJ~l9o7wk$ z^EFRas`8Rl1WT&&lBzu9DgPw@Ajx;98|XodQbphHzUQ9vo$q|-^!)kHgWmug!<__T zsM1iK#1hm9)K2J=db_3DW9@w-6VmVnYL1w;=^quSYH1x@ia3^PNF=cg$qMuSo1QNV zv~o&3v^HCIWIFBVUDNjaeOKy*bQ~)LR%LbjmTu>qlwq0D_T}ybYOzW~T@tIYMqu?K zM+LN^a%9=`-4Zx2qoilk9!s|lYFH<*vV7E*etW-T%_p zk7I+tQp+)PYuxet1lD4cqG7YZx)(fDeHEd&`*<4SQMn|P9a~GtZldgsx0u8f!8M{~tDGat1)Yc^0uv1{gnDiqC zOt+B5q0CcdP-W{a;b91 zP3@S|^x@8qj*i`_Zl_RmOL9a{T`$QBQ|bA?|CnMY-O}k)+9}BZsvFpp>+yUN7ZkV} zL%Occ8V}&2hQTC;aEX#G>$BX28Mg75bOqu?-Ss3NAJL|nI*y&oNnF7Tat|svkt`U;7CrzCZ7o7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vOls(224 zbk>nJ+T!VD4lmsb<9QrWkXG>mUR+d_*-6J06n>>uls@}M%Vhf8q#CGsj;c6@eyWx8 zd|dQerpDbt-5sSb$K|FgQ@S`_I;)!_6z@wIP>@w|0xv(BtTOjXL8i_yA0eZpLUzd@ z!&)ziFhZ3t9IdF0a+@JqPT7)3=!^nAz)`xt z?}F?s8c7jq#c>q|C{(XXO4o-%xk5?Y+N>K^g zMT$r%4GD&NpHpuxdTmP>M*OfeJ%*fLURx}wT7Lu(c%hmDOwxW$*5%sxQC=wd8Od5j zTN8(M$wf_h^mj_8DAqnxGc1Q{`KWM5Eo#{6W5RKdSPu0|U5{nC4vofwFLY|F@JR%p z;;MqrWXF8Y5L;keHz%xdk@V}@Z=%CAs4aVv;YM%_lz_g{BQ$gk;lwhQHC`;Fd{(>+ zmKr3mv*_T7$%0r0ema2nFQrs)P?c2la>K~dEKOD8ONN#{zkq4{w{oMkl%v)**4D|O zrcG1Wy#{w2;VAfqQobbS{SMeH zYKH2Szh+Q>7i(^#<$L@nx9?!hG&W=^_xp>@)7aKMi|s=l)99SRuDzk?`XA6z5=N)7 z=XX?1A$+BRP0jrsU4IiBOENl;8uY&pG>7D33LDDjNZ3;rMy0f8@HP%d?;`_D>kWp9sv*V3r0~1Ny%9>(R(ZE=~`(*0-Nd9 zjiG}E=638uC*3_s^kWAG==&sHq-U@bI(89ByYV6R;2QSgCL!+=@ej~Tnh)YvI`tcR z@CV&elIm_Eelu?1BHkqXFHM9tEQ^Veb>Z0$1<>{fB4(hsjg9(}<7gUzX3u W^n8J@Xw^XbvRvfvYkZ6E(EKm=PNu^E literal 0 HcmV?d00001 diff --git a/Actividad31/build/classes/actividad31/Aplicaciones/Servidor$2.class b/Actividad31/build/classes/actividad31/Aplicaciones/Servidor$2.class new file mode 100644 index 0000000000000000000000000000000000000000..499d306be894afbd4ff54c9b3f282c208047d0fc GIT binary patch literal 936 zcmah{+iuf95Ivi?apSm6NNBjzmb#FHwl3u{2!x^{Dy0PxR3zRu&XR28uB)}3Pe1~` z2B|F)4}1V0g_w1U`aq;u^3Lq|%$ehv`TghTF90vFTSN|d8#%)20W0F60zSCn&Of6_86QA551U&gkxCgj`@W9GVnMiBv9IUl{4!iXOrSBQ=KAi=k0X}1u&iZBY8rJD%XdYmLzI){7P$6$K zI}PzZMNDR`bw<2rurF}UxEHu_MZSzYLB61bue7G$vLZ$|rD0mc!b7^{@CXgE7MggB Qoh;IXPu3x{`6GJ%0y${f*#H0l literal 0 HcmV?d00001 diff --git a/Actividad31/build/classes/actividad31/Aplicaciones/Servidor$3.class b/Actividad31/build/classes/actividad31/Aplicaciones/Servidor$3.class new file mode 100644 index 0000000000000000000000000000000000000000..c13f77ff874ed977bd2c0e22f2cf353bd68ea6cd GIT binary patch literal 2205 zcma)7-*XdH7(KU5yKPu(32mWTAeCU7w31>GfgngrYojSB!B#-U+s&ojcC#CIHywF% zMtyNcpB(LjIKrqM2OUMBGCcTzGd}nq={VrINq?laik;@(y?4*|J3CpG@wynue3sY-Y&?(;DPkXl4D!avOQM?>Ado}@A-*AfyQvg4iW=|=N^jB z=m_~SyeP(J_St0W}X1jKHT%f);IT1w%b{N=cq7#n_bZj0=pvh;@ zob4)sw%%klrHa>l=-cjeCWmv$tpey_Mg}v(UV$DMn0a>LaT9xW)CheP zqu7Th4D^`jMN(kfTH;wZRMX0*i<0yM#ic-d@5UUG*=F>i-@ub5_G?zUAIdv3b<0KN zdzYl6Wa#;}7h}l>OdP;d0y~OwP7QmmCBsQOWcF?lN;eF2{OqPI^x>e1r*VihD|gMBz$^^l2SEsF-r@d9OFWF;`=l|8eHHt@VaY%Qa+W!IHc4oi2U_kW1_-xQlo zPO#Wj4YX)6oh}!rlz*=3I+pV+=}bu9*6ZcXh`vMu`yL)OF_<9{d3)NGVcFLz^UI_| z-wcmcXs@Zk>N#m)6qOsuS>j_gh-Fo;nysgYW?S>2wC2WTX*thm-Yff-8nrb^TUXk^ zeodi3%ZRJ_<~aRC=8XBAjwYes9NYegd)ues)|>9h*MF)yI-TZcR^4A>h= zRbN3%BQ8bpCZvHWEn7<VAbiEbPJ9O5;@PC zE0;1GiK*FHXL#;PNo@kZSc9*&p-k=VS#~ij9Vc&xD$@j#xcA<*d)LNf5SNznLs{^; zyW=BH-2L^gzOQi=#Krz5Oq09yyG41$^W$%oRlG;^5W%kaPlR%75CUe_b(KHt$RJRG z0f%ziK;UM)7@)p(|2LFKtoJH|L?`K0Fv z=eAVeZHQF=Z5XLtx3MMlGg@v|&@XUoq)*@zyvVVm;-L*WjB`ax{k`J*(|oSuO5jXo zq<2w5J>LRXQ@3C&q5XXBH@w$3UU$5I36D+gx}oivBha^m?mI{vinK=v6}OQ30-gGa zzb);NyGR2|7@Sw;uO=?#~#Htj#pvgb0V%Ii7(lAzakA^V-kxf;v3q1N6Q;{AK&5we2)+D z1AY8NFE_D(AMqJ(RcJd%B9gRviN%Nz-N1hPGM}395zZn{+7`GvfpZmluP)R3isptC z-NzmSUHlh+Atk#1L~O{wkw4H__kbRRK_d>QB6K@JlR5@^m2-r~=kZ!)rw^}lZsXD3 bV6Z}Eyj&S)Fv~akGoiJi|K@l!51oGl#QQW7 literal 0 HcmV?d00001 diff --git a/Actividad31/build/classes/actividad31/Aplicaciones/Servidor.class b/Actividad31/build/classes/actividad31/Aplicaciones/Servidor.class new file mode 100644 index 0000000000000000000000000000000000000000..540390d980dd18495125052965ff34b5b6d57d5d GIT binary patch literal 3629 zcmb7GYjYIG6+OK>tC5xggs^PO;<13x8wo^AViw5;0bw0UV68wFvWuE?*JafUy_I+u0u1BK#f5CRdd$twM}QL_w41XG8YKc9J3rN7!ZiJcU;g> zE3iEjDg~C^d))KPxgpCBlF$*a!zLIyHXGQ2tpa<@Twu*wc{6|bQ19`gZRO0ID*?ZK`GRI)22FK&E0395%<$$r!*ry_mXK#GjKi2 z6%d&^JcuS84;g62jw)2yIX{py1ml*7t!&bAd(U~66J!HVnltHI>{3gnGjBS1Hznu49)_qic! zIg~^jI#s^91X|mNK6eK#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k_*Q>T^rCF^_eXqy HKcnft6RC_~ literal 0 HcmV?d00001 diff --git a/Actividad31/build/classes/actividad31/Drivers/Terminal$1.class b/Actividad31/build/classes/actividad31/Drivers/Terminal$1.class new file mode 100644 index 0000000000000000000000000000000000000000..59d4bb8c671c6b55785bc0517ce187b20759c2b0 GIT binary patch literal 2300 zcma)7&2Jk;6#tFwc%5WhC!3}p5Q1sl#7^S4rI1n_TADN=rcV0dkkFK`i9Jm=S?{{L z>yQ+QLxt2ULPAh3oKPf?kO)nx6p258D;ExMMB>DS3m;YC&90-^X%X6WPvS6|YLym;bx`kbvV3EN3e3cIA6+=w4%2)pyT z6F)|lxyPAiq~C~&Ml>-rF45XDFWQ13QMW8>y28H33t~HnKXW6~1QmM}>{Ss(3q#8S zU*c(ln{(+4vkRi&(pCm_Q+H1@1QW?A1sX%EXH;=@Bb_gB(-d|i_Mu(Deia9Bu+B?< z#c@T6A)uQK?Ky9yZl$wkx#H$sTksNXp%qWa_)jt%OzdisoNB~V=v45uiWr_@I8ckq z*=;Zxnp~UD@&#@dEe19togYyV$5DoeDVE)wZW2EG5=lRhmnv;UH|J<0-AE`%s^~#) zeHNYpd6?(U{IFFd4}?ZGf)wFX5Vp;2xj3!j7$ke*dW9PfC0tFX2GC4$CV~^>iYSqE z+Yvm^&`>ZeM?`RvAtaV{H-b|%>2O1*?-`0VyCRzL5>6{Pqar1#>Z*m{(G1H~XH^Vg zcsr)CV`tU;lQWXX5f!6&g+f{tVt<>mi-ge@Wg1m=R>iA0PgIonq8PT!0(Yl%m(VdC zmzyqS-&LFaR*czq}&DJ;2P7j&?+g`~jBGfOKsI0t+N@-TulYS5_XBD_H z#cf^c)ya_Te1=$Egq`u@$EhY7^ZK00-HPn@pj{zol!8_A3txK}X8J5lYK|f&jQ!8G zEldvgv-yycriprOj)zkH{-&cw~DfX7Z`f$fqQga zW+XI`3E{Y7mP3WsGGtkHDCONUQ9x;TKHik7-cOrO z&;XtK4ATg-w8*;yAW0V!b#;KAD6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=EAX@Mb;8cJ zl4G^g%Tq|k&4D>P(@#Ge;NRr_zxr0esjQhc3+4>`_wvJS_)ccEY#qE@<=mfY5=ajgO%)r4PR?Dd z5jvXQ+VuF0RI$f<^C&j6WYa0QRH1)*$X=*9R!l9GO{nRxG*zPG`0^!YZehB9PnGAH ju$N~Ui)JHDRSGZ@iyb{&z$7rH!ZO+fE2D-(Xz2d|{IOei literal 0 HcmV?d00001 diff --git a/Actividad31/dist/README.TXT b/Actividad31/dist/README.TXT new file mode 100644 index 0000000..f550aa9 --- /dev/null +++ b/Actividad31/dist/README.TXT @@ -0,0 +1,32 @@ +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "Actividad31.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, these files (folders) +are not copied. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/Actividad31/manifest.mf b/Actividad31/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Actividad31/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Actividad31/nbproject/build-impl.xml b/Actividad31/nbproject/build-impl.xml new file mode 100644 index 0000000..dc168b6 --- /dev/null +++ b/Actividad31/nbproject/build-impl.xml @@ -0,0 +1,1771 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Actividad31/nbproject/genfiles.properties b/Actividad31/nbproject/genfiles.properties new file mode 100644 index 0000000..415bfb7 --- /dev/null +++ b/Actividad31/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=6e889fd8 +build.xml.script.CRC32=7a5578bc +build.xml.stylesheet.CRC32=f85dc8f2@1.110.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=6e889fd8 +nbproject/build-impl.xml.script.CRC32=09e79c3a +nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.110.0.48 diff --git a/Actividad31/nbproject/private/private.properties b/Actividad31/nbproject/private/private.properties new file mode 100644 index 0000000..9b263d1 --- /dev/null +++ b/Actividad31/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=/home/kyman/snap/netbeans/93/build.properties diff --git a/Actividad31/nbproject/project.properties b/Actividad31/nbproject/project.properties new file mode 100644 index 0000000..272856d --- /dev/null +++ b/Actividad31/nbproject/project.properties @@ -0,0 +1,95 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Actividad31.jar +dist.javadoc.dir=${dist.dir}/javadoc +dist.jlink.dir=${dist.dir}/jlink +dist.jlink.output=${dist.jlink.dir}/Actividad31 +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=19 +javac.target=19 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.html5=false +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +# The jlink additional root modules to resolve +jlink.additionalmodules= +# The jlink additional command line parameters +jlink.additionalparam= +jlink.launcher=true +jlink.launcher.name=Actividad31 +main.class=actividad31.Actividad31 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Actividad31/nbproject/project.xml b/Actividad31/nbproject/project.xml new file mode 100644 index 0000000..6795fa1 --- /dev/null +++ b/Actividad31/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Actividad31 + + + + + + + + + diff --git a/Actividad31/src/actividad31/Actividad31.java b/Actividad31/src/actividad31/Actividad31.java new file mode 100644 index 0000000..2a18d0e --- /dev/null +++ b/Actividad31/src/actividad31/Actividad31.java @@ -0,0 +1,76 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template + */ +package actividad31; + +import actividad31.Aplicaciones.Cliente; +import actividad31.Aplicaciones.Servidor; +import actividad31.Drivers.Terminal; +import java.util.Arrays; + +/** + * + * @author kyman + */ +public class Actividad31 { + + // Configuración. + public static final int puerto = 2000; + public static final String host = "localhost"; + public static final int[] rango_aleatorio = {0, 100}; + public static final String modo_por_defecto = "servidor"; + // Configuración. + + public static boolean trabajando = true; + public static Servidor servidor = null; + public static Cliente cliente = null; + public static Terminal terminal = null; + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + + String accion = args.length != 0 ? args[0] : modo_por_defecto; + + if(accion != null){ + switch(accion){ + case "servidor", "server" -> crear_servidor(); + case "cliente", "client" -> crear_cliente(); + default -> System.out.println("La acción '" + accion + "' existe. Por favor, indique si quiere lanzar el servidor o el cliente simplemente indicando 'servidor' o 'cliente'."); + } + }else + System.out.println("Por favor, indique si quiere arrancar como servidor o como cliente con las palabras clave 'servidor' o 'cliente'."); + + } + + private static void crear_servidor(){ + + terminal = new Terminal(servidor = new Servidor()); + + } + + private static void crear_cliente(){ + + terminal = new Terminal(cliente = new Cliente()); + + } + + public static void excepcion(Exception excepcion){ + System.out.println(excepcion.getMessage()); + System.out.println(Arrays.toString(excepcion.getStackTrace())); + } + + public static void cerrar(){ + trabajando = false; + if(servidor != null) + servidor.cerrar(); + if(cliente != null) + cliente.cerrar(); + if(terminal != null) + terminal.cerrar(); + } + +} diff --git a/Actividad31/src/actividad31/Aplicaciones/Cliente.java b/Actividad31/src/actividad31/Aplicaciones/Cliente.java new file mode 100644 index 0000000..f5438c9 --- /dev/null +++ b/Actividad31/src/actividad31/Aplicaciones/Cliente.java @@ -0,0 +1,111 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package actividad31.Aplicaciones; + +import actividad31.Actividad31; +import actividad31.Drivers.Terminal; +import actividad31.Interfaces.Terminalnterfaz; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.net.Socket; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author kyman + */ +public class Cliente implements Terminalnterfaz { + + private Socket socket; + private PrintWriter salida; + + public Cliente(){ + System.out.println("Lanzando cliente."); + + try{ + + socket = new Socket(Actividad31.host, Actividad31.puerto); + BufferedReader lectura = new BufferedReader(new InputStreamReader(socket.getInputStream())); + salida = new PrintWriter(socket.getOutputStream()); + + new Thread(new Runnable(){ + @Override + public void run() { + + String mensaje; + + try { + while((mensaje = lectura.readLine()) != null) + System.out.println(mensaje); + } catch (IOException excepcion) { + Actividad31.excepcion(excepcion); + } + + Actividad31.cerrar(); + + } + }).start(); + + } catch (IOException excepcion) { + // Actividad31.excepcion(excepcion); + System.out.println("No se pudo conectar contra el servidor '" + Actividad31.host + ":" + Actividad31.puerto + ". Comprueba que el servidor esté lanzado en ese host."); + Actividad31.cerrar(); + } + + } + + @Override + public boolean terminal(String comando) { + + boolean estado = false; + + try{ + + int numero = Integer.parseInt(comando); + + enviar("" + numero); + estado = true; + + }catch(Exception excepcion){} + + return estado; + } + + @Override + public void cerrar() { + + try { + if(salida != null) + salida.close(); + socket.close(); + } catch (IOException excepcion) { + Actividad31.excepcion(excepcion); + } + + } + + public boolean enviar(String mensaje){ + + boolean estado = false; + + try{ + new Thread(new Runnable(){ + @Override + public void run() { + salida.println(mensaje); + salida.flush(); + } + }).start(); + }catch(Exception excepcion){ + Actividad31.excepcion(excepcion); + } + + return estado; + } + +} diff --git a/Actividad31/src/actividad31/Aplicaciones/Servidor.java b/Actividad31/src/actividad31/Aplicaciones/Servidor.java new file mode 100644 index 0000000..fefaca2 --- /dev/null +++ b/Actividad31/src/actividad31/Aplicaciones/Servidor.java @@ -0,0 +1,184 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package actividad31.Aplicaciones; + +import actividad31.Actividad31; +import actividad31.Drivers.Terminal; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.net.ServerSocket; +import java.net.Socket; +import java.util.ArrayList; +import actividad31.Interfaces.Terminalnterfaz; + +/** + * + * @author kyman + */ +public class Servidor implements Terminalnterfaz { + + private ServerSocket socket; + private ArrayList clientes = new ArrayList<>(); + private ArrayList salidas = new ArrayList<>(); + private int numero_aleatorio = 0; + + public Servidor(){ + System.out.println("Lanzando el servidor."); + + new Thread(new Runnable(){ + @Override + public void run() { + try{ + + socket = new ServerSocket(Actividad31.puerto); + + while(Actividad31.trabajando){ + + Socket cliente = socket.accept(); + int i = 0; + int l = clientes.size(); + PrintWriter salida = new PrintWriter(cliente.getOutputStream()); + + for(; i < l; i ++) + if(clientes.get(i) == null) + break; + + if(i == l){ + clientes.add(cliente); + salidas.add(salida); + }else{ + clientes.set(i, cliente); + salidas.set(i, salida); + } + + System.out.println("Escuchando al cliente '" + i + "'."); + + escuchar(i, new BufferedReader(new InputStreamReader(cliente.getInputStream()))); + + } + + } catch (IOException excepcion) { + Actividad31.excepcion(excepcion); + Actividad31.cerrar(); + } + } + + }).start(); + + } + + @Override + public boolean terminal(String comando) { + + boolean estado = true; + + switch(comando){ + case "regenerar" -> { + numero_aleatorio = (int)(Math.random() * (Actividad31.rango_aleatorio[1] + 1 - Actividad31.rango_aleatorio[0])) - Actividad31.rango_aleatorio[0]; + System.out.println("El nuevo número aleatorio es '" + numero_aleatorio + "'."); + } + default -> estado = false; + } + + return estado; + } + + @Override + public void cerrar() { + + for(int i = 0, l = clientes.size(); i < l; i ++){ + + Socket cliente = clientes.get(i); + + if(cliente != null){ + + PrintWriter salida = salidas.get(i); + + try { + + if(salida != null){ + salida.close(); + salidas.set(i, null); + } + + cliente.close(); + clientes.set(i, null); + + } catch (IOException excepcion) { + Actividad31.excepcion(excepcion); + } + + } + + } + + try{ + socket.close(); + } catch (IOException excepcion) { + Actividad31.excepcion(excepcion); + } + + } + + public boolean enviar(int i, String mensaje){ + + boolean exito = false; + PrintWriter salida; + + try{ + salida = salidas.get(i); + new Thread(new Runnable() { + @Override + public void run() { + salida.println(mensaje); + salida.flush(); + } + }).start(); + exito = true; + }catch(Exception excepcion){ + Actividad31.excepcion(excepcion); + } + + return exito; + } + + private void escuchar(int i, BufferedReader entrada){ + new Thread(new Runnable() { + @Override + public void run() { + + String mensaje; + + try{ + while((mensaje = entrada.readLine()) != null) + switch(mensaje){ + default -> { + try{ + + int valor = Integer.parseInt(mensaje.trim()); + + if(valor == numero_aleatorio) + enviar(i, "¡¡Has acertado!! El número es " + valor + "."); + else if(valor < numero_aleatorio) + enviar(i, "El número es mayor que '" + valor + "'."); + else + enviar(i, "El número es menor que '" + valor + "'."); + + }catch(Exception excepcion){ + Actividad31.excepcion(excepcion); + } + } + } + entrada.close(); + } catch (IOException excepcion) { + Actividad31.excepcion(excepcion); + } + } + }).start(); + } + +} diff --git a/Actividad31/src/actividad31/Drivers/Terminal.java b/Actividad31/src/actividad31/Drivers/Terminal.java new file mode 100644 index 0000000..7ee8723 --- /dev/null +++ b/Actividad31/src/actividad31/Drivers/Terminal.java @@ -0,0 +1,58 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package actividad31.Drivers; + +import actividad31.Actividad31; +import actividad31.Interfaces.Terminalnterfaz; +import java.util.Scanner; + +/** + * + * @author kyman + */ +public class Terminal { + + private boolean activo = true; + + public Terminal(Terminalnterfaz padre){ + + if(!Actividad31.trabajando){ + activo = false; + return; + } + + System.out.println("Lanzando terminal."); + + new Thread(new Runnable(){ + @Override + public void run() { + + Scanner entrada = new Scanner(System.in); + String comando; + + while(Actividad31.trabajando) + switch(comando = entrada.nextLine()){ + case "cerrar", "terminar", "close", "exit", "salir", "bye" -> { + Actividad31.trabajando = false; + padre.cerrar(); + } + default -> { + if(!padre.terminal(comando) && Actividad31.trabajando) + System.out.println("El comando '" + comando + "' no existe."); + } + } + activo = false; + + } + }).start(); + + } + + public void cerrar(){ + if(activo) + System.out.println("Por favor, presione cualquier tecla para terminar de cerrar la aplicación."); + } + +} diff --git a/Actividad31/src/actividad31/Interfaces/Terminalnterfaz.java b/Actividad31/src/actividad31/Interfaces/Terminalnterfaz.java new file mode 100644 index 0000000..26ed349 --- /dev/null +++ b/Actividad31/src/actividad31/Interfaces/Terminalnterfaz.java @@ -0,0 +1,16 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package actividad31.Interfaces; + +/** + * + * @author kyman + */ +public interface Terminalnterfaz { + + public boolean terminal(String comando); + public void cerrar(); + +}