From 0f9471172a5cde929163751e93440df8eba9fdcb Mon Sep 17 00:00:00 2001 From: yousefOkasha61 Date: Fri, 28 Feb 2020 12:58:56 +0200 Subject: [PATCH 01/16] Delete ReallySimpleSubscriber.java --- src/ReallySimpleSubscriber.java | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 src/ReallySimpleSubscriber.java diff --git a/src/ReallySimpleSubscriber.java b/src/ReallySimpleSubscriber.java deleted file mode 100644 index fb1114a..0000000 --- a/src/ReallySimpleSubscriber.java +++ /dev/null @@ -1,8 +0,0 @@ - -public class ReallySimpleSubscriber implements ISubscriber { - @Override - public void notifySubscriber(String input) { - // TODO Auto-generated method stub - System.out.println("Hello, I am really a simple subscriber and I am notified with " + input); - } -} From 9f8eebce9945e1bb9f595bbc370e9673e6e8f147 Mon Sep 17 00:00:00 2001 From: yousefOkasha61 Date: Fri, 28 Feb 2020 17:58:37 +0200 Subject: [PATCH 02/16] test --- .idea/.gitignore | 2 ++ .idea/codeStyles/codeStyleConfig.xml | 5 +++++ .idea/misc.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ git_assignment_initial.iml | 11 +++++++++++ 6 files changed, 38 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 git_assignment_initial.iml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..5c98b42 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..37e641e --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..81c2cd4 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/git_assignment_initial.iml b/git_assignment_initial.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/git_assignment_initial.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file From 49d484fb0a71f20db5a109d43f7b593818e39eb9 Mon Sep 17 00:00:00 2001 From: yousefOkasha61 Date: Fri, 28 Feb 2020 18:02:10 +0200 Subject: [PATCH 03/16] removed reallysimplesubscriber class --- .../git_assignment_initial/ISubscriber.class | Bin 0 -> 154 bytes out/production/git_assignment_initial/Main.class | Bin 0 -> 1069 bytes .../SimpleSubscriber.class | Bin 0 -> 1056 bytes .../git_assignment_initial/Topic.class | Bin 0 -> 1158 bytes src/Main.java | 1 - 5 files changed, 1 deletion(-) create mode 100644 out/production/git_assignment_initial/ISubscriber.class create mode 100644 out/production/git_assignment_initial/Main.class create mode 100644 out/production/git_assignment_initial/SimpleSubscriber.class create mode 100644 out/production/git_assignment_initial/Topic.class diff --git a/out/production/git_assignment_initial/ISubscriber.class b/out/production/git_assignment_initial/ISubscriber.class new file mode 100644 index 0000000000000000000000000000000000000000..1b2e4df106c97d998761daee094188476da0aebe GIT binary patch literal 154 zcmX^0Z`VEs1_nz8PId++Mh0%r;L@bxaSNBRO?%~q-DHe|_b zGzEHg@*DO)!-|UQw=jS~fo`W}F1 zD3v~U4&`Ao>F1y-UUh=KZ~z3%e0X3Xt?4r0yhvxG_!N;!djiC^+k#UM37A+g)fmNA-Aa4t5_YZCaJ|=3agHlmvnmZ6)5XaJ1QKfWc+z?140Fx$ zmg6qCM>59{pLx(Q!&N;i*IBOCxdUAv@D|5I%+aEPf6yb!{rL&Z?PJ9Ahe#B%r)&Cx zku=6XBAHDZbIXzGvB(knJ{aQD+0PRUZ69Lz7&i*pBi!7ao;kuDRaXz|P9ny0jNdpW z2ziQoh6v`-jb##eMhXhkV>Onn{U|&U0X-JN$VEKCBJs_W_!46@{-RjHDl0st#|X4D z{;47+)=Zcto(VGjMRSZv{;HB;di5DFzTy71eu6aVP1|3PP*6pOLo$!`NmRv)( zx!2^r49^o|!gM87l51RMu2M9mjr=^CB~MB<2)mYBtdb$)>Y?8jM>33-zf5=-mQAFu zwKjqA`QWWEUEK+?DLlxagtCRbu;cp-#p!INI@di>iJBV?;fS}5_D2j~XB#yEMx@7F zbvzLi8(Q~_IgG)sD<%Az$Adrw79KI|EOca9p%$JnZ2uohYZ7$@ zcdUb<3&c zAD4IRiYG9zBpvB33xv(=riMX*;lRoFWIcb^b*;UkY;w zWT9A}EfsOzzy-_*M4Z4pa){llTtk+1S?$V=!^EtCIn1*{PQ#PW_PUQpvM+hAbZUj{ zra-JDYmVjlt}QTeB-y264}M{}Kt=Z(RXPq8rDL!AFW8R_t6ZlgU2IgW`ljVdb?+D> z-nL}Fv|`Xkh9}sFUQsEtk3s1PxBN04`|JW!hb0JRMm7CkZHcOEH7&2Q{czWISk0(( znm+e*Pun|*lc3~TmFH_#vm;e6HGH>XKawgLJP=n1kr7$1dfv7@!OG5}smP!Ep zKwUY}4oo}IMZVv{JXZzsict~nX6_?02RJFPHg|wC0KoK<3{hOcbz0-rKaY2|uB0nE1i3C$LOY2rGX8 Dd0XrY literal 0 HcmV?d00001 diff --git a/src/Main.java b/src/Main.java index 9b8c2b0..e08479f 100644 --- a/src/Main.java +++ b/src/Main.java @@ -3,7 +3,6 @@ public class Main { private static ISubscriber subscribers [] = { new SimpleSubscriber(), - new ReallySimpleSubscriber(), }; public static void main(String[] args) { Topic mathTopic = new Topic(); From c5d21d31a88b238751cc4084ecefe12b0ff37236 Mon Sep 17 00:00:00 2001 From: yousefOkasha61 Date: Fri, 28 Feb 2020 18:11:19 +0200 Subject: [PATCH 04/16] added removeSubscriber function (20170336) --- .../git_assignment_initial/Topic.class | Bin 1158 -> 1278 bytes src/Topic.java | 4 ++++ 2 files changed, 4 insertions(+) diff --git a/out/production/git_assignment_initial/Topic.class b/out/production/git_assignment_initial/Topic.class index 08c6248d15a55f87dd5afeaddf034c9c7bdc0433..b6bdd55b4c6e51a97c41ce5ef86da95c67d34392 100644 GIT binary patch delta 581 zcmaKoJ5L)?5QV?HYizuG<6sCTJT`!Nc(DPKm;eb+2O1oMfO;3zoO&|UKsLB-6xS9d7ipZY#d0+9& z9a!2a9hCC#OM6@S)$)$Fxjz|WP+>2weJX$4tZbLPicOATO`Z||i@HcQ)TTcC`@6`N~|YBoTpg4mP`u*8W>|-ZpDNc3^*I6a~N|{4 zS|Y@!!d&0s1O8hkg`t?LF$KLKn1H3TKd^FDQU>eaB{z8Jn3Rr<|L<5ItWrn?|C^Z# z#RPVs`H}FtJ0UgO)AB#Vh{S^6j)WVL+s*!@wTh!y9<0)>IHN@#8O0xRD?=i1$l&Y0 z%Rr(TN^A^ytvIyND=IQ{6vLri0&s|ho`YSw_j_=eWljbcrD|hbW5q~ciGIa9DH+V) E0&Q$c+yDRo delta 484 zcmYk3NiRcD6vuz}R;Tx#Dxx)2TdI9JnCE#R5eqgJVq1~0t+4GvVlQvy6Idbf(XuiL~PEz_YA-DKj(f%&!X1z=lugP$LhKDXj#}K9Xjbce=UZ39C}H436;0g zWWr<}`Wf)nRUwjQ&>>I3J5iagA%(rMeOx`-s~uMNYc?(=hcXrKO1%WK?vVGUvR*?U zv=2)w%?M2>f`r75dXs@{eN6l@0%9W)i_(I{xV#+6fH)IO%Bh%Q+SJH>O*q getSubscribers() { return subscribers; From 1eb2b985ea087e07ec8f5a3268f7a83efee14ba3 Mon Sep 17 00:00:00 2001 From: yousefOkasha61 Date: Fri, 28 Feb 2020 18:25:04 +0200 Subject: [PATCH 05/16] added SphereCircumference and implemented the notifysubscriber methoid which will calculate the circumference of the sphere. --- .../git_assignment_initial/ISubscriber.class | Bin 154 -> 137 bytes .../git_assignment_initial/Main.class | Bin 1069 -> 1061 bytes .../SimpleSubscriber.class | Bin 1056 -> 1029 bytes .../git_assignment_initial/Topic.class | Bin 1278 -> 1244 bytes src/ISubscriber.java | 2 +- src/Main.java | 3 ++- src/SimpleSubscriber.java | 2 +- src/SphereCircumference.java | 10 ++++++++++ src/Topic.java | 2 +- 9 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 src/SphereCircumference.java diff --git a/out/production/git_assignment_initial/ISubscriber.class b/out/production/git_assignment_initial/ISubscriber.class index 1b2e4df106c97d998761daee094188476da0aebe..d053454e4a6e506f5beea4218318d713f915d12c 100644 GIT binary patch delta 13 UcmbQm*vUA-jhRKmb7GVO02$Z=p8x;= delta 30 lcmeBVoW(f7O+-|~Co8cmQ9ma!FI_*lq$o2l-Fl*@0|1jF3I_lH diff --git a/out/production/git_assignment_initial/Main.class b/out/production/git_assignment_initial/Main.class index b9e40ab173a479c3fad22507490e25e3011c6b60..51063728bf64ef6b3339cfa5e09353f3bc884d43 100644 GIT binary patch delta 371 zcmYL^y-osA5QV?H%d+b#Xf$er7D@sLflqm{?(AD3PqusDuzqjExVmoxOGz z#6%N`K7fU<;A>c^v)g!!x#!G1XYQFt>)x_IeqP^!0((6>s={W=x$ah5U44$@E}ET>Y{>4v|mOsOm<9; zOp{$DQNN{cQSx(VMCHx*PQ-X4R@eI^>MtZ~^+2DLpmgmC+e@wZ-!>quEIp0NA4#G& Aa{vGU delta 383 zcmZWlJxjw-6g@8=O&YC2sJIjdE!w83@vF6_we@qeE^+DL5Tz8g1d$+auI~8_;^a^S z3yS^#@z1z9sV8v}GUN_#po?Zd0VS8ZYMNSF2SD`?*P~1E9FMX%) z2R+9NFHVA9J!*)YG*O5?L^e7Uc62A+XU+dIfs7aW$7gN-{J=lzcQsU_8)>I$vyB76 z090!TF(8mo=9x-J8S})WzXD1Zn5D6ZB{Fto$h+73rSc#)~T3;^bHfLhNgzL trlBP`|0j8!F7e#)T2|r;n92+0I`T7$ogqrz1B`f9@n=Vc*(Ny&TR&q0IVS)B diff --git a/out/production/git_assignment_initial/SimpleSubscriber.class b/out/production/git_assignment_initial/SimpleSubscriber.class index 96eb5b52ffd095683557f3cef358dd5e68df7094..e59ff1db1c12c95b3df9c5c16cad9966882d26ec 100644 GIT binary patch delta 161 zcmZ3$(aOPf>ff$?3=9mG45kygCNqm_cuw4SPmo2!Q!|W_fi*L)ptOXMfzfmFDn@HQ z4K4;v1}%05Z5{@G2A#>D8ILgPP2R!e!(zzDpgLKeNtKzM!FaL(bCswf10#bp&{S6j zCLm;B;N8T)Eff$?3=9mG3?>t~CX1+P_+%xPCFvqG?@H~NsGmZkwI?qTPC^5 zX3UYIVhoH7(m*R+8JK{Ofq{1u1H1O*CCnzeiVR9XIc5fBpePfA3WF+;<^YPQ0kIB) R9+1ZcWa%>)G8i*R0sxh*D0Tn< diff --git a/out/production/git_assignment_initial/Topic.class b/out/production/git_assignment_initial/Topic.class index b6bdd55b4c6e51a97c41ce5ef86da95c67d34392..d43374f89af9049a4c62d016cec3e50c2a96d3d9 100644 GIT binary patch delta 29 lcmeyzd53eu5k_Vf4bRCp7=JP`dTxHgw3(4ndh!gGGytgx3W)#! delta 63 zcmcb^`HyqM5k?VF4WF#UvPAuy#JqI<;F6-uymafy#~FVL3t@_HKE$+{kx_ec8A}=f D_-7Y3 diff --git a/src/ISubscriber.java b/src/ISubscriber.java index d3a605c..7e3d582 100644 --- a/src/ISubscriber.java +++ b/src/ISubscriber.java @@ -1,4 +1,4 @@ public interface ISubscriber { - public abstract void notifySubscriber(String input); + public abstract void notifySubscriber(int input); } diff --git a/src/Main.java b/src/Main.java index e08479f..cae3902 100644 --- a/src/Main.java +++ b/src/Main.java @@ -3,6 +3,7 @@ public class Main { private static ISubscriber subscribers [] = { new SimpleSubscriber(), + new SphereCircumference() }; public static void main(String[] args) { Topic mathTopic = new Topic(); @@ -10,7 +11,7 @@ public static void main(String[] args) { mathTopic.addSubscriber(sub); } Scanner sc = new Scanner(System.in); - String input = sc.next(); + int input = sc.nextInt(); mathTopic.dispatchEvent(input); } } diff --git a/src/SimpleSubscriber.java b/src/SimpleSubscriber.java index 5b0e4aa..d3a608c 100644 --- a/src/SimpleSubscriber.java +++ b/src/SimpleSubscriber.java @@ -2,7 +2,7 @@ public class SimpleSubscriber implements ISubscriber { @Override - public void notifySubscriber(String input) { + public void notifySubscriber(int input) { // TODO Auto-generated method stub System.out.println("Hello, I am a simple subscriber and I am notified with " + input); } diff --git a/src/SphereCircumference.java b/src/SphereCircumference.java new file mode 100644 index 0000000..c0c5da2 --- /dev/null +++ b/src/SphereCircumference.java @@ -0,0 +1,10 @@ +import java.lang.*; +public class SphereCircumference implements ISubscriber { + @Override + public void notifySubscriber(int input) { + // The circumference of the sphere = 2 * PI * r + // the input will be the radius of the circle + double circumference = 2 * Math.PI * (double)input; + System.out.println("The circumference of the sphere = " + circumference); + } +} diff --git a/src/Topic.java b/src/Topic.java index 5ead648..23433a4 100644 --- a/src/Topic.java +++ b/src/Topic.java @@ -21,7 +21,7 @@ public List getSubscribers() { return subscribers; } - public void dispatchEvent(String input) { + public void dispatchEvent(int input) { for (ISubscriber sub : this.getSubscribers()) { sub.notifySubscriber(input); } From 3f764d4b228af6e4d2abe7da907df58888bf3a56 Mon Sep 17 00:00:00 2001 From: yousefOkasha61 Date: Fri, 28 Feb 2020 18:25:41 +0200 Subject: [PATCH 06/16] Create SphereCircumference.class --- .../SphereCircumference.class | Bin 0 -> 1087 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 out/production/git_assignment_initial/SphereCircumference.class diff --git a/out/production/git_assignment_initial/SphereCircumference.class b/out/production/git_assignment_initial/SphereCircumference.class new file mode 100644 index 0000000000000000000000000000000000000000..24f6cde49b9268d491b8c64cd5b87b21003b458c GIT binary patch literal 1087 zcmaKs?M@Rx6o%h{(k*5A5Q=~(E&|%3P`?$chFC&uQq-gkCi-i-40PyrrrDj6^a{KM zZ$p1*!VfRNTQV`8={BJajhXCxoH^&2nfJ`>@4x520PLWU#t23oBwUOk$uM)u&v-uI z>LmZZb}D?skbEhXG_M&(v$;bDDTb*Frvq;4$=#*ZKh?dh#c{ZpbTH*&8Z!f|N+&X+ zNeJC0;(WOakUIY%l*&|0D0s6lOBZU~>jY1!2RWg(Xl_H5TFw9=}JP!wh8x0}b*Q@(Jp!Z1;) zv}=(c%9;on5=DI^7^cfoiFfTL*{Zx2kY%>4eI6Y0P}*_Nm@su|_g)?XFOX158+qIr z;Acy@LxwS_T2?VuVwm*%_e8cmhIB=@LtpGmyY%7^`nFYqR(PYeiA=~_2g20#Q8b;z zb{cuycksY!{*Yn)BCArJ>4wP1;>Ky%=f2Tlhv93#c0I=!`j)GsKt$_htsCuD;j+Yi zmVv-(rzM8Cf9~^-FJqxU^*uz92SG&|QApu2!&{w zdsN$L>$*y{8#~|@)@Vf8!3Nbf_!AOTfJ_GC%U>F$@0iG*;|lNt^B1fsjFOK-B}M5S x?=rovEz@HX0k?67s17EPMb7>Sut`xPxQlz#rf6=9zDIaMqcruN;yGSm=^vjl67>K8 literal 0 HcmV?d00001 From 7dfbb7966114e88c5c28881634b04e2e78ad81ab Mon Sep 17 00:00:00 2001 From: yousefOkasha61 Date: Sat, 29 Feb 2020 12:05:41 +0200 Subject: [PATCH 07/16] Create SphereCircumference.class --- .../SphereCircumference.class | Bin 0 -> 1087 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 out/production/git_assignment_initial/SphereCircumference.class diff --git a/out/production/git_assignment_initial/SphereCircumference.class b/out/production/git_assignment_initial/SphereCircumference.class new file mode 100644 index 0000000000000000000000000000000000000000..24f6cde49b9268d491b8c64cd5b87b21003b458c GIT binary patch literal 1087 zcmaKs?M@Rx6o%h{(k*5A5Q=~(E&|%3P`?$chFC&uQq-gkCi-i-40PyrrrDj6^a{KM zZ$p1*!VfRNTQV`8={BJajhXCxoH^&2nfJ`>@4x520PLWU#t23oBwUOk$uM)u&v-uI z>LmZZb}D?skbEhXG_M&(v$;bDDTb*Frvq;4$=#*ZKh?dh#c{ZpbTH*&8Z!f|N+&X+ zNeJC0;(WOakUIY%l*&|0D0s6lOBZU~>jY1!2RWg(Xl_H5TFw9=}JP!wh8x0}b*Q@(Jp!Z1;) zv}=(c%9;on5=DI^7^cfoiFfTL*{Zx2kY%>4eI6Y0P}*_Nm@su|_g)?XFOX158+qIr z;Acy@LxwS_T2?VuVwm*%_e8cmhIB=@LtpGmyY%7^`nFYqR(PYeiA=~_2g20#Q8b;z zb{cuycksY!{*Yn)BCArJ>4wP1;>Ky%=f2Tlhv93#c0I=!`j)GsKt$_htsCuD;j+Yi zmVv-(rzM8Cf9~^-FJqxU^*uz92SG&|QApu2!&{w zdsN$L>$*y{8#~|@)@Vf8!3Nbf_!AOTfJ_GC%U>F$@0iG*;|lNt^B1fsjFOK-B}M5S x?=rovEz@HX0k?67s17EPMb7>Sut`xPxQlz#rf6=9zDIaMqcruN;yGSm=^vjl67>K8 literal 0 HcmV?d00001 From 174df6c7b18e625185e8693d1ce35934139bab53 Mon Sep 17 00:00:00 2001 From: yousefOkasha61 Date: Sat, 29 Feb 2020 21:30:53 +0200 Subject: [PATCH 08/16] Update .gitignore --- .gitignore | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 539bdba..17245e5 100644 --- a/.gitignore +++ b/.gitignore @@ -53,4 +53,12 @@ local.properties # Scala IDE specific (Scala & Java development for Eclipse) .cache-main .scala_dependencies -.worksheet \ No newline at end of file +.worksheet + +#ignored directories and files +*/.idea/* +.idea/* +*/out/* +out/* +.classpath +.project \ No newline at end of file From 2d6f8218fc7fc64d6e4c80f509475a2469173415 Mon Sep 17 00:00:00 2001 From: mahmoudesmail51 <36447213+mahmoudesmail51@users.noreply.github.com> Date: Sun, 1 Mar 2020 18:05:39 +0200 Subject: [PATCH 09/16] Commiting changes (20170271) --- .idea/.gitignore | 2 -- .idea/codeStyles/codeStyleConfig.xml | 5 ----- .idea/misc.xml | 2 +- .../git_assignment_initial/ISubscriber.class | Bin 137 -> 137 bytes .../git_assignment_initial/Main.class | Bin 1061 -> 1097 bytes .../SimpleSubscriber.class | Bin 1029 -> 1029 bytes .../SphereCircumference.class | Bin 1087 -> 1087 bytes .../git_assignment_initial/Topic.class | Bin 1244 -> 1244 bytes src/FibonacciSeries.java | 16 ++++++++++++++++ src/Main.java | 3 ++- 10 files changed, 19 insertions(+), 9 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 src/FibonacciSeries.java diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 5c98b42..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Default ignored files -/workspace.xml \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index a55e7a1..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 37e641e..bff19d7 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/out/production/git_assignment_initial/ISubscriber.class b/out/production/git_assignment_initial/ISubscriber.class index d053454e4a6e506f5beea4218318d713f915d12c..53dfb83d6d2f9eebfb8b77ee46c0f5d81e1e7297 100644 GIT binary patch delta 88 zcmeBV>|_);^>5cc1_lOm22OScc6J7iiH278j11hK!KF#X$wiq-sYQ$o0$GV=iTXK- ndFlH8Nm;4MC2Wigj0{XbZ43;IEQ}1y3@jiP11peZVqgORwSo|p delta 88 zcmeBV>|``N^>5cc1_lO822OScCPoHs&*0Le;^d;tq|_pI1{OvJfvm)`ME#t^ymWp4 mq^#8Bl8FLVa%_wYj10^`Z43;IKsBrkY#vW3l*cdmi zn*IjET1;qSqkA>}2lxH~SK@tRqMLipJ@4Lk-?{Id_C>S5{{HwGz&xrtGB8!l>JVTi za0=HsyP@J{0&^(oP;iTfc`h%gxUHhB!{9xOItDo|=@{a8M@6OcWGuy?Ect;SRT#v4 zq1HWQKct+B;qF^u@{xfv7-5hfH=4d{;53E}EMtWsz2odVW;^nCP0MwHzzbE}HL!{` z-g3{tIyMa4#{-6B)oRyUZs^y&u=|2#Rv9u@bK48OH9vIQd(VgkuE&tt@av7hab4f? zLf>mKNL!8{Fbu`RcAen4`LMp@xl!lMMCbeL0Yf&w8K3zLvl=wpkrjoWv$t5NF{pv} zDyjxiY^%yJ@YHWLoygr@-}ksG<*S7n#%YHc+AV|5-4PRslWB@s%1lB=C>MKR?}-RF zOHtusiE7VLV*IVZd0e0@fl*u}g?E3W3Wac`55ew1+&qHR9T&3)@@t75p8V`Xv5%nk zpl!_@BT<lCVg>SV9VA`o(3W;|I(^rgH^jxI~P`k*yq| zh6PMe7o(0OE@O&bU#7Y%FOjDa1u7YVa6&7PRTNbSDyA73`$e*bnSV>D#J2)d$|odk mu@8gH3|O|*#~`tkWy^gG5ldSiAo2IJ|677Y*;Ud6T>AsKKXi}) delta 702 zcmYjPO-~b16g_V~`liz<6rlo2L7-~CbN~xN!J;B0P3UR}rpsX*!zdk^VM^F_W8#|h zAD9@|V$voyvRD6vd;fqd@xC!8&f{Huphu)ECIkxY+K^)_l;FvUU12?~p%wmp#`|ep-^TSA9P0(fy+{PV-rDNOL#z89Azw1MKpgW zM2!670eGX2`0fStdg-z%uPA9H^A71wDXlD3)Z(PtL+XvfK3x4AV61V0>wQesOFhg~ ziJ7|fK_Uh2?n}b>55)}%JGDQb3A1<>n|#6*op=hqly2EZ%X}wyA64OJPla1 Z8p;4AitbyVpbORPzjY~;J)@e0?LS6kZHE8= diff --git a/out/production/git_assignment_initial/SimpleSubscriber.class b/out/production/git_assignment_initial/SimpleSubscriber.class index e59ff1db1c12c95b3df9c5c16cad9966882d26ec..a88346705cac6590f379c59dc541187ce077f8ed 100644 GIT binary patch delta 469 zcmZ`#yG{a85IuKSxXZE#qN0F;_~PLMd?!XNG{%rpw5DcmBpQtGjrzLnQ2KaY5nc1^8#Q4YciY|b|HWfKPAF4#xTwi z;fQifFgUl0)uOq>ASRM0R+QZ~6-aP##1u?oiov(5>!xAW)!LC}Ug&3r*NJHfGYV!A z=SV0>B1N)Xu~I8*xklb7)QfqoPN|Z5rKZbj^*nu?FKGpn!JYj_kh?ZatwK}i?bDD$ z#vJCYdttkMlWD(hIv4EEmaKOc4|A;0(1*Hy*{Crn*=kj*@0C@<&QL$~avXp3#BLQ&}n;6Xnz1}}UR?dE+_ z2!x(T2;mMy;0b+yCUUpPabRE5b_(>=zfRPL0r<&F#2{4#3?V}(Q)Us%G+GdkZE GdZ8crUr8wd delta 464 zcmYL_%TB^j5QhKL3a6AJ2#VqbML{lJ5Kt41y3lAsg3*M;eZfYH*b-Wdi3?XefN4y8 z0AD~Cny~Nzd;lNEI0d7NGn4txKi@esU8yS_eSY^o0Bm7Hh5(UcNP!1lhEPMjQS(jJ zxX7Q>8d}|E@b2h_ZtpROne3Sl5_}x80zVX|#0qklIKv8p2szKJ7?2T0gkw~}7^2P> z+fGdowW?pYnp(9}v+8ZVrnNaH8T{pc;bHSJNxps4v@N@>wvILX(mc0gl$ z-&l5{LfXUdl&LrgG49+6x1xkqM`ybcrEC~l`=F^>mS%Aj7*eiBPF76ws?*{qIdL&@ zPXi4EBrs0HGsI{DH`4+rPEnPo%qV+u?_e+e>uHMawQHTBs0<8K^56K~r z7I+1p>LCEUVdM{T3U}iGCxX-`MF;L*67^vo3&awUB%gp37AZ@lr0J~C=RgdGH59Rq F*bmz3L^l8c diff --git a/out/production/git_assignment_initial/SphereCircumference.class b/out/production/git_assignment_initial/SphereCircumference.class index 24f6cde49b9268d491b8c64cd5b87b21003b458c..745bb12afd50c3c1b780221bbfb937e5ccb5d7cd 100644 GIT binary patch delta 482 zcmYLEOD_Xq6g}UJ_M47TwDl~dp5s~XcMvQzAr{0!Y^IZ;^%yd3Z7r>vS=#sq!h*zt zy+2^(FZcrzaoR}a=DX*f@7{BA@0<3ft-b%eyaJfTqK*(+CE~%=mgM)|#z=DrZD^0M znbgsRZiya=UWq<|;8M=b6_y25b70?J5%&oL)i4CYC)SmfI*C_Hcqw3{UDxr}&#Zjj$@}xlttzqL z*Q%x}knoq4#5I!8c)5ViOBEsyVXh%d5d|?Y_zdw-X@{AEl}`n=tjnVuKppCd0ue-+ z%i;r6F@RVMYW(Ij{fL11LM@&k|GmP8P&p(S8l|C%X=mjx_Gd~9MgwgnjT_O#EmbsA XrJw~fM4i1U%wd{5L9UT^@OAzI+x$n1 delta 482 zcmYL^%}*0i6vcn91AWtBS_%}TR%;6a!8nIBemcR z$|Hj=Lln%dTFg3(@IW)_QskkzS1aBl#n9%-UKodK%{b^B?MM~{p{A_pt8aE1tsrhT z!uZ>V@1|dkp}eoecm+#aK-Q?VPa4bIfo^vC2ZLv(>1Mh?+X7+#ezwu#8#8V eV_GIHW@IYGEOWxPX!CNGcqx@5*(=_#Lh%oumq$+k diff --git a/out/production/git_assignment_initial/Topic.class b/out/production/git_assignment_initial/Topic.class index d43374f89af9049a4c62d016cec3e50c2a96d3d9..fee8ed442ce2117e3597f7d0c9de08b0ed6d4b81 100644 GIT binary patch literal 1244 zcmah|+fEZv6kTW9GPE-kC^rES5S3}U)H`Ys<)TTGf)6DaeVeu;43=p#of3KWEBpdq zHBm`5F+TeteuOdVI@7`w)cA7d?0xoLYwdN;eEs?HGk^uG#SlkI#Y_weQc-kaR>K_T z<&usuyexNDG)&{FT&}6Ou0g{M6*pBZ2xzr>p;mP5g5}l(dUCtwzL~Cjb~&B1YhFem znzy$d)2q9d!1$@-#auRj+@4utb;qLZ*xr&r$VhGpgjXvi_I2lM$J(gxkz~^>l$lB7 zDn+xrWxBSETgkAuV^f5h+pJXWBGJ0cQYj#yJmUnRWC&3|3s2-(=vsS~eXG4UzHNCy zOqzs|JT(p(C;v$PIb&DJu2oI1xbtA&ay$-cWTldb?NsXwMV5N_dpZdU!tRNNAX z<1UtT+{1kx z%UIzZw%vk`RZLNgPe3Dl*s|$trymt|ts?a$0;a5Ixu#cf1>!+cGSgRDFEC&0X?Zhh}0)2PYw}!kMLW+dXQ_J6+kD#h!QD=Ax3($ z2WK$MNMHn`Exa{yD6%5;4&j*wA_^V{Sn`Jhm1#tkID^gF7LLR{i!mYzockwY$6pY8 ziJ15gA|CdSw1hRSo8^J{szfr?AQPR literal 1244 zcmah}+fEZv6kVscq0?z8>-UVH6*=F5){p8(v#h6*423IZB}2nodZjYA_{ zHtgN>!@|B!%NGRynFn~dUSobya8l{rJpx%t@;Fd`~k+H)X z&d9)!V;)ovO_d}@HH_gbv35;2-$t&_z)ilYCf){f$h=zWE!4RN;yyfTW66gHM9D4Y;S4o>TR0N;HZnvKSpFyC z&?$(0L`?h#k#B?9WX)+W0}zxPU(?`&EL2JY40aS4Y!PcpcZc^YSmG){UN9=aT~EEo zNCV>noAV7!3B1HGKV}6!V{U6 Date: Sun, 1 Mar 2020 22:49:09 +0200 Subject: [PATCH 10/16] lucas series added --- .idea/misc.xml | 2 +- .../git_assignment_initial/Main.class | Bin 1097 -> 1129 bytes src/LucasSeries.java | 22 ++++++++++++++++++ src/Main.java | 3 ++- 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 src/LucasSeries.java diff --git a/.idea/misc.xml b/.idea/misc.xml index bff19d7..34f247c 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/out/production/git_assignment_initial/Main.class b/out/production/git_assignment_initial/Main.class index f72b50601c9c5fbff7510b65c9d743e5f361382e..c0e1833465d8fac9adf90097f8f719a0ea93acf6 100644 GIT binary patch delta 484 zcmYk2Nl#Qk6otQf-S1U*Q6gYNBMyKxqi8d=3=T91GHwVg=;cet1!$0-d?X_<0FOcp6I9l9Ayt;iE* z9SL)x%m;eG^3?Lo;ls{zM{B?rj<$e{j*ftJ%hFk+)#NLda`wgy)w{WEi1*$dA2dB( zls(J5G_)V4AJgjThl97(-DY}p^!miI;#uXDr<*m;Ivbu%wz3~)D{0w2ZKm(DQuJlN zq(_6n1v7Oy^}0i~M^ja3gz?xp=1fh*9o6KD%yCz}|0m!c_cayirB6&xR>|#r3fc!0 zR9jTN6gQ{{$GAyNNf&5mQAvZ(46)7=`n3^jt}`Gl+M8pLA$iv1GR#Q$Jn2T|lH;Ki zWuiYai7n%n$nwbO$-hK*6?l9dW&O$(CT!;N{UeR!l8(kXw{}0156R4b$?}@2;vy#g E0xyI!Qvd(} delta 442 zcmYk2%Pxaa6otR@_j20biA!nSZ$(j;x?hU6?!-u9z)*~gNIZat_}@c_fyBU^H}DAF zzzFM9A|`9Ez0O`cd!3KeYwGOn>-hy(<}jp{l4T|&pp+)VtY>qU`7{eGh9p_?um L6IVASEnxZwZ&)Zk diff --git a/src/LucasSeries.java b/src/LucasSeries.java new file mode 100644 index 0000000..ef01f43 --- /dev/null +++ b/src/LucasSeries.java @@ -0,0 +1,22 @@ +import java.util.Arrays; + +public class LucasSeries implements ISubscriber +{ + private long mem[] = new long[48]; + private long lucas_series(int idx) + { + if(idx == 0) + return 2; + if(idx == 1) + return 1; + if(mem[idx] == 0) + mem[idx] = lucas_series(idx - 1) + lucas_series(idx - 2); + return mem[idx]; + } + @Override + public void notifySubscriber(int input) + { + Arrays.fill(mem,0); + System.out.println("The result of Lucas Series is " + lucas_series(input)); + } +} diff --git a/src/Main.java b/src/Main.java index 83c83a6..57ddc43 100644 --- a/src/Main.java +++ b/src/Main.java @@ -4,7 +4,8 @@ public class Main { private static ISubscriber subscribers [] = { new SimpleSubscriber(), new SphereCircumference(), - new FibonacciSeries() + new FibonacciSeries(), + new LucasSeries() }; public static void main(String[] args) { Topic mathTopic = new Topic(); From fff8e6e6ad336cfb20ca07b0177ce1c6b1566376 Mon Sep 17 00:00:00 2001 From: Ali Gad <54474531+aligad1999@users.noreply.github.com> Date: Mon, 2 Mar 2020 18:09:19 +0200 Subject: [PATCH 11/16] my Sphere Area task calculating Sphere Area --- git_assignment_20170362/build.xml | 73 + .../Git_assignment_20170362.rs | 1 + .../git_assignment_20170362/ISubscriber.class | Bin 0 -> 224 bytes .../git_assignment_20170362/Main.class | Bin 0 -> 1539 bytes .../ReallySimpleSubscriber.class | Bin 0 -> 943 bytes .../SimpleSubscriber.class | Bin 0 -> 918 bytes .../git_assignment_20170362/SphereArea.class | Bin 0 -> 1471 bytes .../git_assignment_20170362/Topic.class | Bin 0 -> 1492 bytes git_assignment_20170362/manifest.mf | 3 + .../nbproject/build-impl.xml | 1420 +++++++++++++++++ .../nbproject/genfiles.properties | 8 + .../nbproject/private/private.properties | 2 + .../nbproject/project.properties | 74 + git_assignment_20170362/nbproject/project.xml | 15 + .../git_assignment_20170362/ISubscriber.java | 11 + .../src/git_assignment_20170362/Main.java | 30 + .../ReallySimpleSubscriber.java | 12 + .../SimpleSubscriber.java | 12 + .../git_assignment_20170362/SphereArea.java | 22 + .../src/git_assignment_20170362/Topic.java | 40 + 20 files changed, 1723 insertions(+) create mode 100644 git_assignment_20170362/build.xml create mode 100644 git_assignment_20170362/build/classes/git_assignment_20170362/Git_assignment_20170362.rs create mode 100644 git_assignment_20170362/build/classes/git_assignment_20170362/ISubscriber.class create mode 100644 git_assignment_20170362/build/classes/git_assignment_20170362/Main.class create mode 100644 git_assignment_20170362/build/classes/git_assignment_20170362/ReallySimpleSubscriber.class create mode 100644 git_assignment_20170362/build/classes/git_assignment_20170362/SimpleSubscriber.class create mode 100644 git_assignment_20170362/build/classes/git_assignment_20170362/SphereArea.class create mode 100644 git_assignment_20170362/build/classes/git_assignment_20170362/Topic.class create mode 100644 git_assignment_20170362/manifest.mf create mode 100644 git_assignment_20170362/nbproject/build-impl.xml create mode 100644 git_assignment_20170362/nbproject/genfiles.properties create mode 100644 git_assignment_20170362/nbproject/private/private.properties create mode 100644 git_assignment_20170362/nbproject/project.properties create mode 100644 git_assignment_20170362/nbproject/project.xml create mode 100644 git_assignment_20170362/src/git_assignment_20170362/ISubscriber.java create mode 100644 git_assignment_20170362/src/git_assignment_20170362/Main.java create mode 100644 git_assignment_20170362/src/git_assignment_20170362/ReallySimpleSubscriber.java create mode 100644 git_assignment_20170362/src/git_assignment_20170362/SimpleSubscriber.java create mode 100644 git_assignment_20170362/src/git_assignment_20170362/SphereArea.java create mode 100644 git_assignment_20170362/src/git_assignment_20170362/Topic.java diff --git a/git_assignment_20170362/build.xml b/git_assignment_20170362/build.xml new file mode 100644 index 0000000..54aee63 --- /dev/null +++ b/git_assignment_20170362/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project git_assignment_20170362. + + + diff --git a/git_assignment_20170362/build/classes/git_assignment_20170362/Git_assignment_20170362.rs b/git_assignment_20170362/build/classes/git_assignment_20170362/Git_assignment_20170362.rs new file mode 100644 index 0000000..da7815b --- /dev/null +++ b/git_assignment_20170362/build/classes/git_assignment_20170362/Git_assignment_20170362.rs @@ -0,0 +1 @@ +git_assignment_20170362.Main diff --git a/git_assignment_20170362/build/classes/git_assignment_20170362/ISubscriber.class b/git_assignment_20170362/build/classes/git_assignment_20170362/ISubscriber.class new file mode 100644 index 0000000000000000000000000000000000000000..66d6b6e55049b778a7543a5d8dc779ec47bccead GIT binary patch literal 224 zcmYk0y9&ZU6h!CxijT&|%F;%g#1~rF3xcQ+unn7VT~>4>yBon@v+x7_C~>vXYGz>O zFwfWh0bq(&fJT5Op{;YL4!5{SZDv%;hS2G+kK!t#lh87Xol#mY275v`H!{@hQWn~V zJ7L6`9h;38OQA0cerhx%Pux?;b#ajk4D&E$y!O-Wo zcYNEEJHqoBCZCpSGI+*)U)J1)aD!*X`O8=5uPhb|o7PX@GDC7jx-wW}i07xCFle`$ zRlzV&lCIclH;8PT?>KZaRBGDXdBQ!Z_6LVrP?uC}JhE1qOP7jh4T=mS`KP7l`~@#K z+^rR?z>{umSyhdbc7};anqMVr+^bR5%x}mT(hVNex0@|#Gn|Pe3;`r8<`XQ_71a); zQ?P9Ay27JJ3F)@lfolASWQKk#;P$^|-U%L>Z1BzM6+S&xK8|tDje^y}I)GNE7t58oIED&3fqvqCv)NDhp)0 z7Ld)tBeHBj#udCl7RiL=e?4Z!>$hIVP>h_rk8Gm$0f>|O`4%0A+yU1;Umk8ANoEvt>aMs_x<6_*k- zClh-}ywcd4?_YM29MboY>L6X&g|Uym^6VbWt(i-E=vVdQVf{&}0}LTW|F&@q;{wHL zYM@BcS4sRjiN8xorEdWV!X$AH=P4sKgr1<7!VOH~B57SkAM%)@-qr~>jTx#kONbMQ zeWxM`9hY>(bj&dt#aB8`(OiB^Xe}fKCX*j6<08h{^p@iBJZsL}O+a+XCE8>o^jycv! zxQn`ldlv3nc)(D2E|t`~4B1BWkRkUf^aR6lM=J4l6!b*&p7(t6lsjRc`-eP|=00=g z^s$T?+MR*aM?8+@Km|hSqwV&iXYI#Nx7`E5eSgxG!O$1oQ7`UCl1lC{tf)}SkCVBN zq1x!2@G*CNt_E&bM^X)T45YkN!;v-!&O9^J!)VY_LiYq$ajP4SqQ2;evG89g>cF)O z6#=X)r0$PJ6iH7Ih*BE=TABfC=VNV|rZ#L`wD8bI15Ji&e*<|rlD;P*hTS*9_rpzR z&*6a+CBr-1iIe%A_%{I#S6&*E&>)59e3JUuv9XQ~8=Kg&(6Zs8!qECZZi(7Cy8YgX z=o5AIf7RGq6ks8-JBhUjXemO&d^M#{hVDC3MUysy2gF~24~If|3|r?(x4?O-=8Ppu zEb1_Iku;6wnLvuTk__=@M+R$X`uhrNSfVv&xIjCfAxrYmd5LZ=Sw=R$ehT(Ed0wWo zkT|ngq5pOofXgV;je4O%MNIMmeIXgLt6z}$hU|w^Ux&QzG literal 0 HcmV?d00001 diff --git a/git_assignment_20170362/build/classes/git_assignment_20170362/SimpleSubscriber.class b/git_assignment_20170362/build/classes/git_assignment_20170362/SimpleSubscriber.class new file mode 100644 index 0000000000000000000000000000000000000000..758c4d59cb8e9e81f459087e7b18b522bc02724f GIT binary patch literal 918 zcma)5TW=CU7(K&nVO?!S@Y1T?iWi_Qi`CeN8WS}!HX+uCY2s5eup^yjcb4o9nEot% zpou2_0DqM68q3~2Hsh=@q>x~13+{?%p3`-rU#G6sr6Y+cA3&>OMM139{@K~Dr%$d_i zGGS*`pl!L9+5mufiDX7;%-LoJF2EhThMaFw*W(J1bVju?yJxuOYN%SaKl%0lV> zSj4gP1%a^B{8!SfRy~WdWyU#haM8j82X!P@H$PrK0In;zq2eZPskn_ha&@;C_b{ViRz(nr0OsU8FNgbbSWvNuB^61eRDyV*;Gu#? z3_aWuoPnhn{Ij~D+w%;J%^Btb3aHEvS*_LjUX5>AeZqypKq;|;6FlJh%xFPJk z;6^>3GaFVxWWiR#_W#+*)<+u!_VFYI>n|9D; zZkIJYMq0yZoT0qN1a}7DHF`Q`oyIC$Z z^h(jG098;#%77>?DWGBMcRfuXO)t-AQj<4DDHQ_k(yZBZrJn^Ho0Q*b}56;u*cMiRX&{}gH z2Q{jc=r%!qA%Bk)>95F+Yf2Pxuuw-Sr870F(ka4p0m&1YpuP`o__oF@iTxkxM`vf;|3;7Brx8EUKBEz z#3_@zDZM+LfsHeIIcwlt1}3HrobSX16BaHSC>od%$b^mMuoB2+HwXp#N>7~UPNAXX zYM~@URTStd%bMq?M&JreZ@Hc+)uejlgdtO&xt@A7HF;`!^7Of>!mV-}wm3_ajv47m zH7k&`$LUgz6Sq0Lo6}9fP^y&@XXaB#ZA7$lKp5Auqk&y;2(Rq7bmx*}+v+Os5ihEsZ zjKAiFcKDS z;JCnO#1M6K*9#lR=qM@ipXcu{fddc*D(eU)oxwck`6M9;CVF8*$yo$WqG+7{W^M~d;~v2vk%XQO-f4w}=nSMa;u{7M1OPf128m-i=@v}0(WAUS zhT~i{$V*nG_-p4spko7u!0nS8=oEN`ecW^je1*9?0uym{?XqM%=%=`rFLAHAxJzsd* W+}g+{hs-v(N$@-|1WrWxC;tH7f + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/git_assignment_20170362/nbproject/genfiles.properties b/git_assignment_20170362/nbproject/genfiles.properties new file mode 100644 index 0000000..d91b398 --- /dev/null +++ b/git_assignment_20170362/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=ec6531ee +build.xml.script.CRC32=0b61d11f +build.xml.stylesheet.CRC32=8064a381@1.80.1.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=ec6531ee +nbproject/build-impl.xml.script.CRC32=4f59a6ff +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/git_assignment_20170362/nbproject/private/private.properties b/git_assignment_20170362/nbproject/private/private.properties new file mode 100644 index 0000000..ece2773 --- /dev/null +++ b/git_assignment_20170362/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\ALI FCI\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/git_assignment_20170362/nbproject/project.properties b/git_assignment_20170362/nbproject/project.properties new file mode 100644 index 0000000..be4148f --- /dev/null +++ b/git_assignment_20170362/nbproject/project.properties @@ -0,0 +1,74 @@ +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.test.classpath=\ + ${run.test.classpath} +# 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}/git_assignment_20170362.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=git_assignment_20170362.Main +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.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/git_assignment_20170362/nbproject/project.xml b/git_assignment_20170362/nbproject/project.xml new file mode 100644 index 0000000..4c373ad --- /dev/null +++ b/git_assignment_20170362/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + git_assignment_20170362 + + + + + + + + + diff --git a/git_assignment_20170362/src/git_assignment_20170362/ISubscriber.java b/git_assignment_20170362/src/git_assignment_20170362/ISubscriber.java new file mode 100644 index 0000000..cebbe67 --- /dev/null +++ b/git_assignment_20170362/src/git_assignment_20170362/ISubscriber.java @@ -0,0 +1,11 @@ +/** + * + * @author ALI FCI + */ +package git_assignment_20170362; + +public interface ISubscriber { + public abstract void notifySubscriber(String input); + + +} diff --git a/git_assignment_20170362/src/git_assignment_20170362/Main.java b/git_assignment_20170362/src/git_assignment_20170362/Main.java new file mode 100644 index 0000000..37a1380 --- /dev/null +++ b/git_assignment_20170362/src/git_assignment_20170362/Main.java @@ -0,0 +1,30 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package git_assignment_20170362; + +import java.util.Scanner; + +public class Main { + + private static ISubscriber subscribers [] = { + new SimpleSubscriber(), + new ReallySimpleSubscriber(), + new SphereArea(), + }; + public static void main(String[] args) { + Topic mathTopic = new Topic(); + for (ISubscriber sub : subscribers) { + mathTopic.addSubscriber(sub); + } + + System.out.println("Enter the raduis of Sphere : " ); + + Scanner sc = new Scanner(System.in); + String input = sc.next(); + mathTopic.dispatchEvent(input); + } + +} diff --git a/git_assignment_20170362/src/git_assignment_20170362/ReallySimpleSubscriber.java b/git_assignment_20170362/src/git_assignment_20170362/ReallySimpleSubscriber.java new file mode 100644 index 0000000..c7b534a --- /dev/null +++ b/git_assignment_20170362/src/git_assignment_20170362/ReallySimpleSubscriber.java @@ -0,0 +1,12 @@ +package git_assignment_20170362; + +public class ReallySimpleSubscriber implements ISubscriber { + + @Override + public void notifySubscriber(String input) { + // TODO Auto-generated method stub + System.out.println("Hello, I am really a simple subscriber and I am notified with " + input); + } +} + + diff --git a/git_assignment_20170362/src/git_assignment_20170362/SimpleSubscriber.java b/git_assignment_20170362/src/git_assignment_20170362/SimpleSubscriber.java new file mode 100644 index 0000000..9fb9c19 --- /dev/null +++ b/git_assignment_20170362/src/git_assignment_20170362/SimpleSubscriber.java @@ -0,0 +1,12 @@ +package git_assignment_20170362; + +public class SimpleSubscriber implements ISubscriber { + + @Override + public void notifySubscriber(String input) { + // TODO Auto-generated method stub + + System.out.println("Hello, I am a simple subscriber and I am notified with " + input); + } + +} diff --git a/git_assignment_20170362/src/git_assignment_20170362/SphereArea.java b/git_assignment_20170362/src/git_assignment_20170362/SphereArea.java new file mode 100644 index 0000000..324ec3d --- /dev/null +++ b/git_assignment_20170362/src/git_assignment_20170362/SphereArea.java @@ -0,0 +1,22 @@ +package git_assignment_20170362; + +public class SphereArea implements ISubscriber{ + + static double area; + + public static void calcSphereArea(int raduis) + { + area = 4* Math.PI * Math.pow(raduis, 2); + area = Double.parseDouble(String.format("%.2f", area)); + System.out.println("Aree of the Sphere = " + area); + + } + + @Override + public void notifySubscriber(String input) { + int raduis = Integer.parseInt(input); + calcSphereArea(raduis); + + } + +} diff --git a/git_assignment_20170362/src/git_assignment_20170362/Topic.java b/git_assignment_20170362/src/git_assignment_20170362/Topic.java new file mode 100644 index 0000000..d49d856 --- /dev/null +++ b/git_assignment_20170362/src/git_assignment_20170362/Topic.java @@ -0,0 +1,40 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package git_assignment_20170362; + +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author ALI FCI + */ +public class Topic { + + private List subscribers; + + public Topic() { + subscribers = new ArrayList(); + } + + public void addSubscriber(ISubscriber sub) { + subscribers.add(sub); + } + + public List getSubscribers() { + return subscribers; + } + + public void dispatchEvent(String input) { + for (ISubscriber sub : this.getSubscribers()) { + sub.notifySubscriber(input); + } + } + + void dispatchEvent(double input) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } +} From 3239c7d3c9dafc599000e873e65663e8313568af Mon Sep 17 00:00:00 2001 From: alialfie Date: Mon, 2 Mar 2020 20:55:37 +0200 Subject: [PATCH 12/16] Create TwoPowerN.java added 2PowerN function and subscriber class. 20170171 --- src/Main.java | 3 ++- src/TwoPowerN.java | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/TwoPowerN.java diff --git a/src/Main.java b/src/Main.java index 57ddc43..31bacbc 100644 --- a/src/Main.java +++ b/src/Main.java @@ -5,7 +5,8 @@ public class Main { new SimpleSubscriber(), new SphereCircumference(), new FibonacciSeries(), - new LucasSeries() + new LucasSeries(), + new TwoPowerN() }; public static void main(String[] args) { Topic mathTopic = new Topic(); diff --git a/src/TwoPowerN.java b/src/TwoPowerN.java new file mode 100644 index 0000000..f7ee208 --- /dev/null +++ b/src/TwoPowerN.java @@ -0,0 +1,7 @@ +public class TwoPowerN implements ISubscriber{ + @Override + public void notifySubscriber(int N) { + double result = Math.pow(2, N); + System.out.println("2 power " + N + " equals: " + result); + } +} \ No newline at end of file From cc4bffd9180995a817a320267ecf6145f5e15a65 Mon Sep 17 00:00:00 2001 From: sehes2solve Date: Mon, 2 Mar 2020 22:46:01 +0200 Subject: [PATCH 13/16] added user friendly message --- .../git_assignment_initial/Main.class | Bin 1129 -> 1159 bytes src/LucasSeries.java | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/out/production/git_assignment_initial/Main.class b/out/production/git_assignment_initial/Main.class index c0e1833465d8fac9adf90097f8f719a0ea93acf6..c3b4ebf8f0885802a970aa708b0084c4865c76c2 100644 GIT binary patch delta 479 zcmYk2M@|Dl6hvQ-J?@!iut+vJgUJ~aOforV7I=ve3sy$3V9AmL%sr5R1rkUcfE#cG zZomroZ6w5|>;FDdai0k$4KXtInX>e> zW=1n>2&`w$5Vx2$lvtcMlv!LbR9IZpEZv{PRWzlk4zE-yQA4f5J<4C4p9WM>9k9$w zc&Czy)qpkD18Ud^*kmhUo1O4o<&1xHo!`q}pIz>RgU-WoQtkzXv3{8%GE1zyb+Qcz zDnYmV33V@nL%qDQ0vVw}=HORABTcgTG}9tXU6_gN-&k!6UP0wiEc!TYg56RuO(_{E zI7fLQXB1a3Myn`Xab#&HCFsewbT* q6gufK_*dnikO~M`D=JX2{xhE2bk3?-V^{-h}wjtphhJOGk!7(oY delta 450 zcmYL_xlTe+6h+s2@VM~24j2UI5kW--6$EFT5Qmr;Z7d0~z!)?}Z7eMPfcGOBI}1O+ zzp(TVtkiR{u-WJAefQZp=RSr$gO&I1*Eb-~flCK7idh$%nGg}?OqW&ULd=tQ2~aSw zVB|%`l499Ko0%1t7E@PU+Du(@X*ac~SbwgySpK*o=G|L~Vkcb|&dKFft*VI<(`>M5 z5k9ZnRnoUNwTtv|wNkI2T`RUU+mtk&>}bmDYWCRoKCDx(WIy#pWLvOsO^S3r=_OpS z+Y9@m$sW-H!puvrpla~PS8qDE?Okanp|XZ zvN-Y{U`Qq$;YCKoi_8@mB_WwPNl7whK1qDzlHwyJju`fjggA;xg{_#fWVn;BP diff --git a/src/LucasSeries.java b/src/LucasSeries.java index ef01f43..3ccca39 100644 --- a/src/LucasSeries.java +++ b/src/LucasSeries.java @@ -17,6 +17,6 @@ private long lucas_series(int idx) public void notifySubscriber(int input) { Arrays.fill(mem,0); - System.out.println("The result of Lucas Series is " + lucas_series(input)); + System.out.println("The Result of Lucas Series is " + lucas_series(input)); } } From b4e9ca1afd62dd39bca449654f33e0811bc12855 Mon Sep 17 00:00:00 2001 From: a7medfarag Date: Mon, 2 Mar 2020 22:55:29 +0200 Subject: [PATCH 14/16] Create README.md --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..daa44ae --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# git_assignment_initial + + +import java.util.Arrays; +import java.util.Scanner; + +/** + * + * @author ahmed farag + */ +public class CircleCircumference implements ISubscriber { + + void CalculateCircleCircumference (float radius) + { + radius=0; + Scanner inbut=new Scanner(System.in); + System.out.print("Enter Radius of Circle : "); + radius=inbut.nextFloat(); + double circlecircumference=0; + circlecircumference=2*(3.14)*radius; + System.out.print("Circle Cumference Equal = "+circlecircumference); + } + @Override + public void notifySubscriber(float input) + { + System.out.println("The result of Lucas Series is " + CalculateCircleCircumference (input)); + } + + +} From 9716f6af35f775593f58d68c2295be42e45f807f Mon Sep 17 00:00:00 2001 From: BeshBeshy Date: Tue, 3 Mar 2020 20:32:46 +0200 Subject: [PATCH 15/16] 20140246 Added circle area class and updated main --- src/Main.java | 3 ++- src/circle_area.java | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/circle_area.java diff --git a/src/Main.java b/src/Main.java index 31bacbc..e15f4da 100644 --- a/src/Main.java +++ b/src/Main.java @@ -6,7 +6,8 @@ public class Main { new SphereCircumference(), new FibonacciSeries(), new LucasSeries(), - new TwoPowerN() + new TwoPowerN(), + new circle_area() }; public static void main(String[] args) { Topic mathTopic = new Topic(); diff --git a/src/circle_area.java b/src/circle_area.java new file mode 100644 index 0000000..b5ebdd4 --- /dev/null +++ b/src/circle_area.java @@ -0,0 +1,7 @@ +public class CircleArea implements ISubscriber{ + @Override + public void notifySubscriber(double r) { + double RSquare = Math.pow(r, 2); + System.out.println("Circle area for a radius equals to " + r + " equals: " + ((3.14)*RSquare)); + } +} \ No newline at end of file From 319803950fc7bd7f3c6b4ba3ae87421eade393a9 Mon Sep 17 00:00:00 2001 From: Mohamed mohsen <36299904+Mohamedmohsenn@users.noreply.github.com> Date: Tue, 3 Mar 2020 21:18:16 +0200 Subject: [PATCH 16/16] Update Main.java --- src/Main.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Main.java b/src/Main.java index 31bacbc..5dd5d11 100644 --- a/src/Main.java +++ b/src/Main.java @@ -6,7 +6,8 @@ public class Main { new SphereCircumference(), new FibonacciSeries(), new LucasSeries(), - new TwoPowerN() + new TwoPowerN(), + new MultiplicationSeries() }; public static void main(String[] args) { Topic mathTopic = new Topic();