From 6083d9d1f66473ffe7ded82195cc0133a7f9408a Mon Sep 17 00:00:00 2001 From: ahmeddrawy Date: Fri, 28 Feb 2020 17:03:53 +0200 Subject: [PATCH 01/22] init commit for fork --- init.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 init.txt diff --git a/init.txt b/init.txt new file mode 100644 index 0000000..87fae37 --- /dev/null +++ b/init.txt @@ -0,0 +1,2 @@ +init repo + From ef91029b8257fc91a34939e6f04f7f8e3068b2da Mon Sep 17 00:00:00 2001 From: ahmeddrawy Date: Fri, 28 Feb 2020 17:18:50 +0200 Subject: [PATCH 02/22] adding circle area class andd its object in main --- src/CircleAreaObserver.java | 10 ++++++++++ src/Main.java | 1 + 2 files changed, 11 insertions(+) create mode 100644 src/CircleAreaObserver.java diff --git a/src/CircleAreaObserver.java b/src/CircleAreaObserver.java new file mode 100644 index 0000000..6fa47fd --- /dev/null +++ b/src/CircleAreaObserver.java @@ -0,0 +1,10 @@ +public class CircleAreaObserver implements ISubscriber { + @Override + public void notifySubscriber(String input) { + System.out.println("Circle of radius = " + " has Area = " + areaOfCircle(Integer.parseInt(input))); + } + private double areaOfCircle(int r){ + return Math.PI *r *2; + + } +} diff --git a/src/Main.java b/src/Main.java index 9b8c2b0..1a7a1fc 100644 --- a/src/Main.java +++ b/src/Main.java @@ -4,6 +4,7 @@ public class Main { private static ISubscriber subscribers [] = { new SimpleSubscriber(), new ReallySimpleSubscriber(), + new CircleAreaObserver() }; public static void main(String[] args) { Topic mathTopic = new Topic(); From e343a770ebf0291ac920098bc4b1d8c3cd20e13b Mon Sep 17 00:00:00 2001 From: fares Date: Fri, 28 Feb 2020 20:39:57 +0200 Subject: [PATCH 03/22] removed example classess simpleSubscriber and ReallySimpleSubscriber. added ShereAreaSub class with overrided notifySubscriber function to calculate sphere area. removed example classess objects in main from subscribers list and added object of SphereAreaSub to that list --- src/Main.java | 3 +-- src/ReallySimpleSubscriber.java | 8 -------- src/SimpleSubscriber.java | 10 ---------- src/SphereAreaSub.java | 13 +++++++++++++ 4 files changed, 14 insertions(+), 20 deletions(-) delete mode 100644 src/ReallySimpleSubscriber.java delete mode 100644 src/SimpleSubscriber.java create mode 100644 src/SphereAreaSub.java diff --git a/src/Main.java b/src/Main.java index 9b8c2b0..6e9cae3 100644 --- a/src/Main.java +++ b/src/Main.java @@ -2,8 +2,7 @@ public class Main { private static ISubscriber subscribers [] = { - new SimpleSubscriber(), - new ReallySimpleSubscriber(), + new SphereAreaSub() }; public static void main(String[] args) { Topic mathTopic = new Topic(); 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); - } -} diff --git a/src/SimpleSubscriber.java b/src/SimpleSubscriber.java deleted file mode 100644 index 5b0e4aa..0000000 --- a/src/SimpleSubscriber.java +++ /dev/null @@ -1,10 +0,0 @@ - -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/src/SphereAreaSub.java b/src/SphereAreaSub.java new file mode 100644 index 0000000..30d94be --- /dev/null +++ b/src/SphereAreaSub.java @@ -0,0 +1,13 @@ + +public class SphereAreaSub implements ISubscriber{ + + + public void notifySubscriber(String input) { // input will be a single integer for all functions. + int r = Integer.parseInt(input);// radius + double area; + area = 4 * 3.14 * (r*r); // 4Pi*r^2. + System.out.println(area); + } + + +} From c6a5993793c7a1fc6d4f8def25490ba7a17525cb Mon Sep 17 00:00:00 2001 From: ahmed Date: Fri, 28 Feb 2020 23:57:54 +0200 Subject: [PATCH 04/22] Adding CircleCircumference() --- src/CircleCircumference.java | 9 +++++++++ src/Main.java | 3 +-- src/ReallySimpleSubscriber.java | 8 -------- src/SimpleSubscriber.java | 10 ---------- 4 files changed, 10 insertions(+), 20 deletions(-) create mode 100644 src/CircleCircumference.java delete mode 100644 src/ReallySimpleSubscriber.java delete mode 100644 src/SimpleSubscriber.java diff --git a/src/CircleCircumference.java b/src/CircleCircumference.java new file mode 100644 index 0000000..d04088a --- /dev/null +++ b/src/CircleCircumference.java @@ -0,0 +1,9 @@ +public class CircleCircumference implements ISubscriber { + @Override + public void notifySubscriber(String input) { + double radius=Double.parseDouble(input); + //System.out.println("Hello, I am really a simple subscriber and I am notified with " + input); + double circumference= Math.PI * 2*radius; + System.out.println( "The circumference of the circle is: "+circumference) ; + } +} \ No newline at end of file diff --git a/src/Main.java b/src/Main.java index 9b8c2b0..3711766 100644 --- a/src/Main.java +++ b/src/Main.java @@ -2,8 +2,7 @@ public class Main { private static ISubscriber subscribers [] = { - new SimpleSubscriber(), - new ReallySimpleSubscriber(), + new CircleCircumference() }; public static void main(String[] args) { Topic mathTopic = new Topic(); 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); - } -} diff --git a/src/SimpleSubscriber.java b/src/SimpleSubscriber.java deleted file mode 100644 index 5b0e4aa..0000000 --- a/src/SimpleSubscriber.java +++ /dev/null @@ -1,10 +0,0 @@ - -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); - } - -} From 9f83e942517f3766a860a4a4f38168bb8aef7d6e Mon Sep 17 00:00:00 2001 From: ahmed Date: Sat, 29 Feb 2020 00:27:29 +0200 Subject: [PATCH 05/22] adding CircleCircumference() --- src/CircleCircumference.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CircleCircumference.java b/src/CircleCircumference.java index d04088a..de57f9d 100644 --- a/src/CircleCircumference.java +++ b/src/CircleCircumference.java @@ -4,6 +4,6 @@ public void notifySubscriber(String input) { double radius=Double.parseDouble(input); //System.out.println("Hello, I am really a simple subscriber and I am notified with " + input); double circumference= Math.PI * 2*radius; - System.out.println( "The circumference of the circle is: "+circumference) ; + System.out.println( "The circumference of this circle is: "+circumference) ; } } \ No newline at end of file From 4f865c56f5d33734a537ddfd641e65a926de1a8e Mon Sep 17 00:00:00 2001 From: ahmed Date: Sat, 29 Feb 2020 00:49:39 +0200 Subject: [PATCH 06/22] m --- src/CircleCircumference.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CircleCircumference.java b/src/CircleCircumference.java index de57f9d..bd36554 100644 --- a/src/CircleCircumference.java +++ b/src/CircleCircumference.java @@ -1,9 +1,9 @@ public class CircleCircumference implements ISubscriber { - @Override + public void notifySubscriber(String input) { - double radius=Double.parseDouble(input); - //System.out.println("Hello, I am really a simple subscriber and I am notified with " + input); - double circumference= Math.PI * 2*radius; - System.out.println( "The circumference of this circle is: "+circumference) ; + double radius=Double.parseDouble(input); + //System.out.println("Hello, I am really a simple subscriber and I am notified with " + input); + double circumference= Math.PI * 2*radius; + System.out.println( "The circumference of this circle is: "+circumference) ; } } \ No newline at end of file From f08a4686d2be38738f8f00b941da3b1fc0b4854a Mon Sep 17 00:00:00 2001 From: NaglaEssam12 <59181709+NaglaEssam12@users.noreply.github.com> Date: Sat, 29 Feb 2020 13:47:30 +0200 Subject: [PATCH 07/22] Add Lucas Series Class that implement Function --- src/LucasSeriesSub.java | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/LucasSeriesSub.java diff --git a/src/LucasSeriesSub.java b/src/LucasSeriesSub.java new file mode 100644 index 0000000..afde73a --- /dev/null +++ b/src/LucasSeriesSub.java @@ -0,0 +1,40 @@ +import java.util.ArrayList; + +public class LucasSeriesSub 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); + int numOfTerms = Integer.parseInt(input); + ArrayListlucesResult = new ArrayList(); + int temp1 = 2 , temp2 = 1; + int j = 0 , temp = 0; + if(numOfTerms == 1) + { + lucesResult.add(temp1); + } + else if (numOfTerms == 2) + { + lucesResult.add(temp1); + lucesResult.add(temp2); + } + else if (numOfTerms > 2) + { + lucesResult.add(temp1); + lucesResult.add(temp2); + for(int i = 2 ; i < numOfTerms ; i++) + { + temp1 = lucesResult.get(j); + temp2 = lucesResult.get(++j); + temp = temp1 + temp2; + lucesResult.add(temp); + } + } + else + { + lucesResult.add(0); + } + System.out.println("The Series is : " + lucesResult); + } + +} From 1ec02227d3ab73a0f1b1e7c0ab4361c1a77912a7 Mon Sep 17 00:00:00 2001 From: NaglaEssam12 <59181709+NaglaEssam12@users.noreply.github.com> Date: Sat, 29 Feb 2020 13:50:08 +0200 Subject: [PATCH 08/22] Add object of LucasSeriesSub to List of Subscriber --- src/Main.java | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/Main.java b/src/Main.java index 9b8c2b0..9251bd8 100644 --- a/src/Main.java +++ b/src/Main.java @@ -1,17 +1,20 @@ -import java.util.Scanner; - -public class Main { - private static ISubscriber subscribers [] = { - new SimpleSubscriber(), - new ReallySimpleSubscriber(), - }; - public static void main(String[] args) { - Topic mathTopic = new Topic(); - for (ISubscriber sub : subscribers) { - mathTopic.addSubscriber(sub); - } - Scanner sc = new Scanner(System.in); - String input = sc.next(); - mathTopic.dispatchEvent(input); - } -} +import java.util.Scanner; + +public class Main { + private static ISubscriber subscribers [] = { + new SimpleSubscriber(), + new ReallySimpleSubscriber(), + new LucasSeriesSub(), + }; + + public static void main(String[] args) { + Topic mathTopic = new Topic(); + for (ISubscriber sub : subscribers) { + mathTopic.addSubscriber(sub); + } + System.out.println("Enter Num Of Terms that you want : "); + Scanner sc = new Scanner(System.in); + String input = sc.next(); + mathTopic.dispatchEvent(input); + } +} From efa6edbdbc87f8f5892d6ca125a73d317d25722c Mon Sep 17 00:00:00 2001 From: fares Date: Sun, 1 Mar 2020 16:11:30 +0200 Subject: [PATCH 09/22] added a description to println in notifySubscriber function in SphereAreaSub , to know what does this print means and where it came from --- src/SphereAreaSub.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SphereAreaSub.java b/src/SphereAreaSub.java index 30d94be..ae5818d 100644 --- a/src/SphereAreaSub.java +++ b/src/SphereAreaSub.java @@ -6,7 +6,7 @@ public void notifySubscriber(String input) { // input will be a single integer f int r = Integer.parseInt(input);// radius double area; area = 4 * 3.14 * (r*r); // 4Pi*r^2. - System.out.println(area); + System.out.println("Sphere Area with r = "+ r +": " + area); } From 367475b370d93495bdf2bffa5532e180bace4794 Mon Sep 17 00:00:00 2001 From: ayaamr11 <36492846+ayaamr11@users.noreply.github.com> Date: Sun, 1 Mar 2020 20:43:13 +0200 Subject: [PATCH 10/22] Create MultiplicationSeries.java --- src/MultiplicationSeries.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/MultiplicationSeries.java diff --git a/src/MultiplicationSeries.java b/src/MultiplicationSeries.java new file mode 100644 index 0000000..be9b02a --- /dev/null +++ b/src/MultiplicationSeries.java @@ -0,0 +1,16 @@ + +public class MultiplicationSeries implements ISubscriber { + public void notifySubscriber(String input){ + // TODO Auto-generated method stub + System.out.print(" the multiplication series of " + input); + + int n =Integer.parseInt(input); + int result = n; + while(n>0) { + n-=1; + result =result *n; + + } + System.out.println(" is " + result ); + } +} \ No newline at end of file From a54e848264367366278fb0ad2c33361aff6664cb Mon Sep 17 00:00:00 2001 From: ayaamr11 <36492846+ayaamr11@users.noreply.github.com> Date: Sun, 1 Mar 2020 20:51:59 +0200 Subject: [PATCH 11/22] modifications --- src/Main.java | 1 + src/MultiplicationSeries.java | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Main.java b/src/Main.java index 9b8c2b0..fccb5db 100644 --- a/src/Main.java +++ b/src/Main.java @@ -4,6 +4,7 @@ public class Main { private static ISubscriber subscribers [] = { new SimpleSubscriber(), new ReallySimpleSubscriber(), + new MultiplicationSeries(), }; public static void main(String[] args) { Topic mathTopic = new Topic(); diff --git a/src/MultiplicationSeries.java b/src/MultiplicationSeries.java index be9b02a..29bbebb 100644 --- a/src/MultiplicationSeries.java +++ b/src/MultiplicationSeries.java @@ -6,10 +6,14 @@ public void notifySubscriber(String input){ int n =Integer.parseInt(input); int result = n; - while(n>0) { + System.out.println(n); + + while(n>1) { n-=1; result =result *n; - + System.out.println(n); + System.out.println(result); + } System.out.println(" is " + result ); } From a4eb2139853269becd0ad5e1c9c4771108a4e74c Mon Sep 17 00:00:00 2001 From: ayaamr11 <36492846+ayaamr11@users.noreply.github.com> Date: Sun, 1 Mar 2020 20:59:20 +0200 Subject: [PATCH 12/22] Update MultiplicationSeries.java --- src/MultiplicationSeries.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/MultiplicationSeries.java b/src/MultiplicationSeries.java index 29bbebb..bf88277 100644 --- a/src/MultiplicationSeries.java +++ b/src/MultiplicationSeries.java @@ -1,20 +1,17 @@ - public class MultiplicationSeries implements ISubscriber { public void notifySubscriber(String input){ // TODO Auto-generated method stub - System.out.print(" the multiplication series of " + input); - + int n =Integer.parseInt(input); int result = n; - System.out.println(n); + while(n>1) { n-=1; result =result *n; - System.out.println(n); - System.out.println(result); + } - System.out.println(" is " + result ); + System.out.println("the multiplication series of " + input +" is " + result ); } } \ No newline at end of file From 9cc4442f3e6aaee872d76abaf75783ea807f91fb Mon Sep 17 00:00:00 2001 From: ayaamr11 <36492846+ayaamr11@users.noreply.github.com> Date: Sun, 1 Mar 2020 21:09:21 +0200 Subject: [PATCH 13/22] Update MultiplicationSeries.java --- src/MultiplicationSeries.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MultiplicationSeries.java b/src/MultiplicationSeries.java index bf88277..79c5dc4 100644 --- a/src/MultiplicationSeries.java +++ b/src/MultiplicationSeries.java @@ -14,4 +14,4 @@ public void notifySubscriber(String input){ } System.out.println("the multiplication series of " + input +" is " + result ); } -} \ No newline at end of file +} From 8b8d83054ea2fc97e01413ee4921e39abc2c257f Mon Sep 17 00:00:00 2001 From: mina5alaf <36233029+mina5alaf@users.noreply.github.com> Date: Mon, 2 Mar 2020 20:09:50 +0200 Subject: [PATCH 14/22] SphereVolume class added with overriding NotifySubscriber method --- src/Main.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Main.java b/src/Main.java index 9b8c2b0..4c9162b 100644 --- a/src/Main.java +++ b/src/Main.java @@ -4,6 +4,7 @@ public class Main { private static ISubscriber subscribers [] = { new SimpleSubscriber(), new ReallySimpleSubscriber(), + new SphereVolume() }; public static void main(String[] args) { Topic mathTopic = new Topic(); From cddfc101ffbbe5356c17daeeb76f17078eb2ab9d Mon Sep 17 00:00:00 2001 From: mina5alaf <36233029+mina5alaf@users.noreply.github.com> Date: Mon, 2 Mar 2020 20:12:07 +0200 Subject: [PATCH 15/22] Class SphereVolume added with overriding the method "NotifySubscriber" and in Main class i added new SphereVolume --- src/Main.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main.java b/src/Main.java index 4c9162b..c823f20 100644 --- a/src/Main.java +++ b/src/Main.java @@ -4,7 +4,7 @@ public class Main { private static ISubscriber subscribers [] = { new SimpleSubscriber(), new ReallySimpleSubscriber(), - new SphereVolume() + new SphereVolume(), }; public static void main(String[] args) { Topic mathTopic = new Topic(); From b7441550f6fe082efbe47462881c1524b512424d Mon Sep 17 00:00:00 2001 From: mina5alaf <36233029+mina5alaf@users.noreply.github.com> Date: Mon, 2 Mar 2020 20:16:59 +0200 Subject: [PATCH 16/22] Added class SphereVolume with overriding Notifysubscriber --- src/SphereVolume.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/SphereVolume.java diff --git a/src/SphereVolume.java b/src/SphereVolume.java new file mode 100644 index 0000000..695433b --- /dev/null +++ b/src/SphereVolume.java @@ -0,0 +1,11 @@ + +public class SphereVolume implements ISubscriber{ + public void notifySubscriber(String input) { + Float Rad; + double Result; + Rad = Float.parseFloat(input); + Result=(4/3)*(3.14)*(Rad*Rad*Rad); + System.out.println("Sphere Volume =" + Result); + } + +} From d74ac4a5a3f668202792c3431bdcd46b027020d9 Mon Sep 17 00:00:00 2001 From: mina5alaf <36233029+mina5alaf@users.noreply.github.com> Date: Mon, 2 Mar 2020 20:21:16 +0200 Subject: [PATCH 17/22] Added class SphereVolume --- src/SphereVolume.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SphereVolume.java b/src/SphereVolume.java index 695433b..9651a8b 100644 --- a/src/SphereVolume.java +++ b/src/SphereVolume.java @@ -2,10 +2,10 @@ public class SphereVolume implements ISubscriber{ public void notifySubscriber(String input) { Float Rad; - double Result; + double Res; Rad = Float.parseFloat(input); - Result=(4/3)*(3.14)*(Rad*Rad*Rad); - System.out.println("Sphere Volume =" + Result); + Res=(4/3)*(3.14)*(Rad*Rad*Rad); + System.out.println("Sphere Volume =" + Res); } } From 41d81436e32b7bad69a5c179563e299b34e64633 Mon Sep 17 00:00:00 2001 From: youssefadel Date: Mon, 2 Mar 2020 22:29:33 +0200 Subject: [PATCH 18/22] added power function 20170345 added 2 power N function --- src/Main.java | 1 + src/Power.java | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 src/Power.java diff --git a/src/Main.java b/src/Main.java index 9b8c2b0..f5f2df2 100644 --- a/src/Main.java +++ b/src/Main.java @@ -4,6 +4,7 @@ public class Main { private static ISubscriber subscribers [] = { new SimpleSubscriber(), new ReallySimpleSubscriber(), + new Power(), }; public static void main(String[] args) { Topic mathTopic = new Topic(); diff --git a/src/Power.java b/src/Power.java new file mode 100644 index 0000000..0fb2488 --- /dev/null +++ b/src/Power.java @@ -0,0 +1,8 @@ +import java.math.*; +public class Power implements ISubscriber { + @Override + public void notifySubscriber(String input) { + // TODO Auto-generated method stub + System.out.println("2 Power "+input+": "+Math.pow(2, Double.parseDouble(input))); + } +} From d3438ba2e624bec761ea5f77f70b75a72eff9132 Mon Sep 17 00:00:00 2001 From: NaglaEssam12 <59181709+NaglaEssam12@users.noreply.github.com> Date: Mon, 2 Mar 2020 23:30:36 +0200 Subject: [PATCH 19/22] 20170313 / Add Lucas Series Class that Implement Function(Lucas Series ) --- src/LucasSeriesSub.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/LucasSeriesSub.java b/src/LucasSeriesSub.java index afde73a..0280c3f 100644 --- a/src/LucasSeriesSub.java +++ b/src/LucasSeriesSub.java @@ -3,8 +3,6 @@ public class LucasSeriesSub 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); int numOfTerms = Integer.parseInt(input); ArrayListlucesResult = new ArrayList(); int temp1 = 2 , temp2 = 1; @@ -32,7 +30,8 @@ else if (numOfTerms > 2) } else { - lucesResult.add(0); + System.out.println("Not invalid Input"); + System.exit(0); } System.out.println("The Series is : " + lucesResult); } From 4b8fd04b48fc6f07982c23362e3858edd70cf1ee Mon Sep 17 00:00:00 2001 From: NaglaEssam12 <59181709+NaglaEssam12@users.noreply.github.com> Date: Mon, 2 Mar 2020 23:33:33 +0200 Subject: [PATCH 20/22] 20170313/ Add object of LucasSeriesSub Class to list of Subscribers --- src/Main.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Main.java b/src/Main.java index 9251bd8..c25cec1 100644 --- a/src/Main.java +++ b/src/Main.java @@ -2,8 +2,6 @@ public class Main { private static ISubscriber subscribers [] = { - new SimpleSubscriber(), - new ReallySimpleSubscriber(), new LucasSeriesSub(), }; @@ -12,7 +10,6 @@ public static void main(String[] args) { for (ISubscriber sub : subscribers) { mathTopic.addSubscriber(sub); } - System.out.println("Enter Num Of Terms that you want : "); Scanner sc = new Scanner(System.in); String input = sc.next(); mathTopic.dispatchEvent(input); From 101ca2b3bfc845d0e161a2c1ab36349370df0e11 Mon Sep 17 00:00:00 2001 From: NaglaEssam12 <59181709+NaglaEssam12@users.noreply.github.com> Date: Mon, 2 Mar 2020 23:37:32 +0200 Subject: [PATCH 21/22] 20170313 / delete ReallySimpleSubscriber Class --- 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 f4c61a28741c141766d3dd580a7c0de45f5c256f Mon Sep 17 00:00:00 2001 From: NaglaEssam12 <59181709+NaglaEssam12@users.noreply.github.com> Date: Mon, 2 Mar 2020 23:38:17 +0200 Subject: [PATCH 22/22] 20170313 / delete Simple Subscriber Class --- src/SimpleSubscriber.java | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 src/SimpleSubscriber.java diff --git a/src/SimpleSubscriber.java b/src/SimpleSubscriber.java deleted file mode 100644 index 5b0e4aa..0000000 --- a/src/SimpleSubscriber.java +++ /dev/null @@ -1,10 +0,0 @@ - -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); - } - -}