From de06f36f168d0010cf6688d821bd7fc19e79c0d2 Mon Sep 17 00:00:00 2001
From: AshrafSamir <36134927+AshrafSamir@users.noreply.github.com>
Date: Wed, 26 Feb 2020 22:28:53 +0200
Subject: [PATCH 01/34] Nothing changed
---
.idea/.gitignore | 2 ++
.idea/.name | 1 +
.idea/misc.xml | 6 ++++++
.idea/modules.xml | 8 ++++++++
.idea/vcs.xml | 6 ++++++
GitAssignmentObserver.iml | 12 ++++++++++++
6 files changed, 35 insertions(+)
create mode 100644 .idea/.gitignore
create mode 100644 .idea/.name
create mode 100644 .idea/misc.xml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/vcs.xml
create mode 100644 GitAssignmentObserver.iml
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..e7e9d11
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,2 @@
+# Default ignored files
+/workspace.xml
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..477e576
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+GitAssignmentObserver
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..d03eb01
--- /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..3dd0b66
--- /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..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GitAssignmentObserver.iml b/GitAssignmentObserver.iml
new file mode 100644
index 0000000..26db12c
--- /dev/null
+++ b/GitAssignmentObserver.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From c0ed3779178a4a7d236ced6e4bc685776478cca6 Mon Sep 17 00:00:00 2001
From: AshrafSamir <36134927+AshrafSamir@users.noreply.github.com>
Date: Wed, 26 Feb 2020 22:55:06 +0200
Subject: [PATCH 02/34] This my funtion 2PowerN
---
.idea/misc.xml | 2 +-
GitAssignmentObserver.iml | 2 +-
src/Main.java | 1 +
src/TwoPowerN.java | 12 ++++++++++++
4 files changed, 15 insertions(+), 2 deletions(-)
create mode 100644 src/TwoPowerN.java
diff --git a/.idea/misc.xml b/.idea/misc.xml
index d03eb01..aa95c45 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/GitAssignmentObserver.iml b/GitAssignmentObserver.iml
index 26db12c..8598de7 100644
--- a/GitAssignmentObserver.iml
+++ b/GitAssignmentObserver.iml
@@ -7,6 +7,6 @@
-
+
\ No newline at end of file
diff --git a/src/Main.java b/src/Main.java
index 9b8c2b0..8d841df 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 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..8f38ca6
--- /dev/null
+++ b/src/TwoPowerN.java
@@ -0,0 +1,12 @@
+public class TwoPowerN implements ISubscriber{
+
+ @Override
+ public void notifySubscriber(String input) {
+ int n = Integer.parseInt(input);
+ int sum = 1;
+ for(int i=0;i
Date: Fri, 28 Feb 2020 10:27:56 +0200
Subject: [PATCH 03/34] Modified gitignore for IntelliJ users
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 539bdba..f1df1f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,12 @@
.metadata
bin/
+out/
tmp/
*.tmp
*.bak
*.swp
*~.nib
+*.idea
local.properties
.settings/
.loadpath
From 4f0fc112ab4e63568bca29694cb80d6f81b42d26 Mon Sep 17 00:00:00 2001
From: Ahmad Khaled <36166958+ahmadkkhaled@users.noreply.github.com>
Date: Fri, 28 Feb 2020 10:32:22 +0200
Subject: [PATCH 04/34] Modified .gitignore for IntelliJ users
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 539bdba..f1df1f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,12 @@
.metadata
bin/
+out/
tmp/
*.tmp
*.bak
*.swp
*~.nib
+*.idea
local.properties
.settings/
.loadpath
From d9094d0faa51508e2f81ec6a96b53963c08551da Mon Sep 17 00:00:00 2001
From: Ahmad Khaled <36166958+ahmadkkhaled@users.noreply.github.com>
Date: Fri, 28 Feb 2020 11:00:28 +0200
Subject: [PATCH 05/34] Added class Circle
---
src/Circle.java | 10 ++++++++++
src/Main.java | 3 +--
2 files changed, 11 insertions(+), 2 deletions(-)
create mode 100644 src/Circle.java
diff --git a/src/Circle.java b/src/Circle.java
new file mode 100644
index 0000000..14f6570
--- /dev/null
+++ b/src/Circle.java
@@ -0,0 +1,10 @@
+public class Circle implements ISubscriber{
+ public void notifySubscriber(String input){
+ Double radius = Double.parseDouble(input);
+ System.out.println("The circle area is: " + calculateArea(radius));
+ }
+
+ private double calculateArea(double radius){
+ return Math.PI * radius * radius;
+ }
+}
diff --git a/src/Main.java b/src/Main.java
index 9b8c2b0..32fffe2 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 Circle()
};
public static void main(String[] args) {
Topic mathTopic = new Topic();
From 6ac26bc339213e7687704a700d8c8c4aba648760 Mon Sep 17 00:00:00 2001
From: Ahmad Khaled <36166958+ahmadkkhaled@users.noreply.github.com>
Date: Fri, 28 Feb 2020 11:17:01 +0200
Subject: [PATCH 06/34] 20170377 changed radius type from Double to Integer
---
src/Circle.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Circle.java b/src/Circle.java
index 14f6570..850ebea 100644
--- a/src/Circle.java
+++ b/src/Circle.java
@@ -1,10 +1,10 @@
public class Circle implements ISubscriber{
public void notifySubscriber(String input){
- Double radius = Double.parseDouble(input);
+ Integer radius = Integer.parseInt(input);
System.out.println("The circle area is: " + calculateArea(radius));
}
- private double calculateArea(double radius){
+ private double calculateArea(Integer radius){
return Math.PI * radius * radius;
}
}
From 5da5013c414523ed7cebb54d1c937596f24a7d8d Mon Sep 17 00:00:00 2001
From: Ahmad Khaled <36166958+ahmadkkhaled@users.noreply.github.com>
Date: Fri, 28 Feb 2020 15:37:11 +0200
Subject: [PATCH 07/34] 20170377 removed SimpleSubscriber(s) from Main
---
src/Main.java | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/Main.java b/src/Main.java
index 52f1f37..15725e4 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 TwoPowerN(),
new Circle()
};
From c49519215c34390889071bb58396f5316a6e68fe Mon Sep 17 00:00:00 2001
From: mohamed7632 <36171712+mohamed7632@users.noreply.github.com>
Date: Fri, 28 Feb 2020 17:11:19 +0200
Subject: [PATCH 08/34] git commit -m "20170235 added new files
---
src/Main.java | 1 +
src/Shperevolume.java | 15 +++++++++++++++
2 files changed, 16 insertions(+)
create mode 100644 src/Shperevolume.java
diff --git a/src/Main.java b/src/Main.java
index 9b8c2b0..14b2704 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 Shperevolume()
};
public static void main(String[] args) {
Topic mathTopic = new Topic();
diff --git a/src/Shperevolume.java b/src/Shperevolume.java
new file mode 100644
index 0000000..dff2400
--- /dev/null
+++ b/src/Shperevolume.java
@@ -0,0 +1,15 @@
+
+
+
+public class Shperevolume implements ISubscriber {
+
+ public void notifySubscriber(String input) {
+
+ double redius=Integer.parseInt(input);
+
+
+ double volume = (4*22*redius*redius*redius)/(3*7);
+ System.out.println(volume);
+ }
+
+}
From 1423856e65b0ff6905e1351634fb79cc569691f3 Mon Sep 17 00:00:00 2001
From: Ahmad Khaled <36166958+ahmadkkhaled@users.noreply.github.com>
Date: Fri, 28 Feb 2020 17:47:59 +0200
Subject: [PATCH 09/34] 20170377 Modified printed message in class Spherevolume
---
src/Shperevolume.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Shperevolume.java b/src/Shperevolume.java
index dff2400..ba98972 100644
--- a/src/Shperevolume.java
+++ b/src/Shperevolume.java
@@ -9,7 +9,7 @@ public void notifySubscriber(String input) {
double volume = (4*22*redius*redius*redius)/(3*7);
- System.out.println(volume);
+ System.out.println("The sphere volume is: " + volume);
}
}
From 02baf0ac1b8d0b64ae86ff2db2bb01136e8738ba Mon Sep 17 00:00:00 2001
From: mai41 <36419468+mai41@users.noreply.github.com>
Date: Fri, 28 Feb 2020 22:26:35 +0200
Subject: [PATCH 10/34] Add files via upload
---
Team26.java | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 Team26.java
diff --git a/Team26.java b/Team26.java
new file mode 100644
index 0000000..6bb737c
--- /dev/null
+++ b/Team26.java
@@ -0,0 +1,27 @@
+/*
+ * 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 team26;
+import java.lang.Math.*;
+/**
+ *
+ * @author pc
+ */
+public class Team26 {
+ public double CircleCircumference (int radius){
+ return (2*Math.PI*radius);
+ }
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String[] args) {
+ // TODO code application logic here
+ int r=10;
+ Team26 t=new Team26();
+ System.out.println(t.CircleCircumference(r));
+ }
+
+}
From 8c6f11d14ff408f5cecbb561bdb5ae339fa13a38 Mon Sep 17 00:00:00 2001
From: mai41 <36419468+mai41@users.noreply.github.com>
Date: Fri, 28 Feb 2020 22:39:21 +0200
Subject: [PATCH 11/34] Delete .classpath
---
.classpath | 6 ------
1 file changed, 6 deletions(-)
delete mode 100644 .classpath
diff --git a/.classpath b/.classpath
deleted file mode 100644
index fceb480..0000000
--- a/.classpath
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
From eb36eafe9840a4231b341894fb1f1e14977bb4ce Mon Sep 17 00:00:00 2001
From: mai41 <36419468+mai41@users.noreply.github.com>
Date: Fri, 28 Feb 2020 22:40:28 +0200
Subject: [PATCH 12/34] Delete .gitignore
---
.gitignore | 58 ------------------------------------------------------
1 file changed, 58 deletions(-)
delete mode 100644 .gitignore
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 6e17738..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,58 +0,0 @@
-.metadata
-bin/
-out/
-tmp/
-*.tmp
-*.bak
-*.swp
-*~.nib
-.idea/
-local.properties
-.settings/
-.loadpath
-.recommenders
-
-# External tool builders
-.externalToolBuilders/
-
-# Locally stored "Eclipse launch configurations"
-*.launch
-
-# PyDev specific (Python IDE for Eclipse)
-*.pydevproject
-
-# CDT-specific (C/C++ Development Tooling)
-.cproject
-
-# CDT- autotools
-.autotools
-
-# Java annotation processor (APT)
-.factorypath
-
-# PDT-specific (PHP Development Tools)
-.buildpath
-
-# sbteclipse plugin
-.target
-
-# Tern plugin
-.tern-project
-
-# TeXlipse plugin
-.texlipse
-
-# STS (Spring Tool Suite)
-.springBeans
-
-# Code Recommenders
-.recommenders/
-
-# Annotation Processing
-.apt_generated/
-.apt_generated_test/
-
-# Scala IDE specific (Scala & Java development for Eclipse)
-.cache-main
-.scala_dependencies
-.worksheet
\ No newline at end of file
From 669c466875e3db1233bba8ca5840c097a2120518 Mon Sep 17 00:00:00 2001
From: mai41 <36419468+mai41@users.noreply.github.com>
Date: Fri, 28 Feb 2020 23:49:52 +0200
Subject: [PATCH 13/34] Delete Team26.java
---
Team26.java | 27 ---------------------------
1 file changed, 27 deletions(-)
delete mode 100644 Team26.java
diff --git a/Team26.java b/Team26.java
deleted file mode 100644
index 6bb737c..0000000
--- a/Team26.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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 team26;
-import java.lang.Math.*;
-/**
- *
- * @author pc
- */
-public class Team26 {
- public double CircleCircumference (int radius){
- return (2*Math.PI*radius);
- }
-
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- // TODO code application logic here
- int r=10;
- Team26 t=new Team26();
- System.out.println(t.CircleCircumference(r));
- }
-
-}
From a0c7946fe20fd0f5076e7707b569a70476c95a5e Mon Sep 17 00:00:00 2001
From: mai41 <36419468+mai41@users.noreply.github.com>
Date: Sat, 29 Feb 2020 00:43:19 +0200
Subject: [PATCH 14/34] Add files via upload
---
CircleCircumference.java | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 CircleCircumference.java
diff --git a/CircleCircumference.java b/CircleCircumference.java
new file mode 100644
index 0000000..72746df
--- /dev/null
+++ b/CircleCircumference.java
@@ -0,0 +1,17 @@
+/*
+ * 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.
+ */
+import java.lang.Math.*;
+/**
+ *
+ * @author pc
+ */
+public class CircleCircumference implements ISubscriber{
+ @Override
+ public void notifySubscriber(String input){
+ double radius = Integer.parseInt(input);
+ System.out.println ("CircleCircumference: "+2*Math.PI*radius);
+ }
+}
From 803ae3f08189bee7f70e7660bea6ce1609a553ba Mon Sep 17 00:00:00 2001
From: mai41 <36419468+mai41@users.noreply.github.com>
Date: Sat, 29 Feb 2020 00:43:58 +0200
Subject: [PATCH 15/34] Add files via upload
---
Main.java | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 Main.java
diff --git a/Main.java b/Main.java
new file mode 100644
index 0000000..9635e0a
--- /dev/null
+++ b/Main.java
@@ -0,0 +1,19 @@
+import java.util.Scanner;
+
+public class Main {
+ private static ISubscriber subscribers [] = {
+ new TwoPowerN(),
+ new Circle(),
+ new Shperevolume(),
+ new CircleCircumference()
+ };
+ 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);
+ }
+}
From fcea9fcac20cb47d9b2675d91578fa38942f1281 Mon Sep 17 00:00:00 2001
From: mai41 <36419468+mai41@users.noreply.github.com>
Date: Sat, 29 Feb 2020 01:25:27 +0200
Subject: [PATCH 16/34] Update Main.java
---
Main.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Main.java b/Main.java
index 9635e0a..3c6d9b8 100644
--- a/Main.java
+++ b/Main.java
@@ -5,7 +5,7 @@ public class Main {
new TwoPowerN(),
new Circle(),
new Shperevolume(),
- new CircleCircumference()
+ new CircleCircumference(),
};
public static void main(String[] args) {
Topic mathTopic = new Topic();
From 3e4e11d1c31df8e3da3a87de00170a6754637ff9 Mon Sep 17 00:00:00 2001
From: Ahmad Khaled <36166958+ahmadkkhaled@users.noreply.github.com>
Date: Sat, 29 Feb 2020 19:32:05 +0200
Subject: [PATCH 17/34] 20170377 Moved source code to directory src/
---
CircleCircumference.java | 17 -----------------
Main.java | 19 -------------------
src/CircleCircumference.java | 7 +++++++
src/Main.java | 1 +
4 files changed, 8 insertions(+), 36 deletions(-)
delete mode 100644 CircleCircumference.java
delete mode 100644 Main.java
create mode 100644 src/CircleCircumference.java
diff --git a/CircleCircumference.java b/CircleCircumference.java
deleted file mode 100644
index 72746df..0000000
--- a/CircleCircumference.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * 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.
- */
-import java.lang.Math.*;
-/**
- *
- * @author pc
- */
-public class CircleCircumference implements ISubscriber{
- @Override
- public void notifySubscriber(String input){
- double radius = Integer.parseInt(input);
- System.out.println ("CircleCircumference: "+2*Math.PI*radius);
- }
-}
diff --git a/Main.java b/Main.java
deleted file mode 100644
index 3c6d9b8..0000000
--- a/Main.java
+++ /dev/null
@@ -1,19 +0,0 @@
-import java.util.Scanner;
-
-public class Main {
- private static ISubscriber subscribers [] = {
- new TwoPowerN(),
- new Circle(),
- new Shperevolume(),
- new CircleCircumference(),
- };
- 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);
- }
-}
diff --git a/src/CircleCircumference.java b/src/CircleCircumference.java
new file mode 100644
index 0000000..eaf506e
--- /dev/null
+++ b/src/CircleCircumference.java
@@ -0,0 +1,7 @@
+public class CircleCircumference implements ISubscriber{
+ @Override
+ public void notifySubscriber(String input){
+ double radius = Integer.parseInt(input);
+ System.out.println ("CircleCircumference: "+2*Math.PI*radius);
+ }
+}
diff --git a/src/Main.java b/src/Main.java
index ae105ed..c7a5698 100644
--- a/src/Main.java
+++ b/src/Main.java
@@ -5,6 +5,7 @@ public class Main {
new TwoPowerN(),
new Circle(),
new Shperevolume(),
+ new CircleCircumference()
};
public static void main(String[] args) {
Topic mathTopic = new Topic();
From bbe7d048cdb47a313edc6ba2ad8d32c66a1f1c89 Mon Sep 17 00:00:00 2001
From: Ahmad Khaled <36166958+ahmadkkhaled@users.noreply.github.com>
Date: Sat, 29 Feb 2020 19:35:17 +0200
Subject: [PATCH 18/34] 20170377 Added .gitignore to branch CircleCircumference
---
.gitignore | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
create mode 100644 .gitignore
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6e17738
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,58 @@
+.metadata
+bin/
+out/
+tmp/
+*.tmp
+*.bak
+*.swp
+*~.nib
+.idea/
+local.properties
+.settings/
+.loadpath
+.recommenders
+
+# External tool builders
+.externalToolBuilders/
+
+# Locally stored "Eclipse launch configurations"
+*.launch
+
+# PyDev specific (Python IDE for Eclipse)
+*.pydevproject
+
+# CDT-specific (C/C++ Development Tooling)
+.cproject
+
+# CDT- autotools
+.autotools
+
+# Java annotation processor (APT)
+.factorypath
+
+# PDT-specific (PHP Development Tools)
+.buildpath
+
+# sbteclipse plugin
+.target
+
+# Tern plugin
+.tern-project
+
+# TeXlipse plugin
+.texlipse
+
+# STS (Spring Tool Suite)
+.springBeans
+
+# Code Recommenders
+.recommenders/
+
+# Annotation Processing
+.apt_generated/
+.apt_generated_test/
+
+# Scala IDE specific (Scala & Java development for Eclipse)
+.cache-main
+.scala_dependencies
+.worksheet
\ No newline at end of file
From 29eee1d59383089af5a474ba18395628230849d8 Mon Sep 17 00:00:00 2001
From: MayadaMohamed11 <36480871+MayadaMohamed11@users.noreply.github.com>
Date: Sat, 29 Feb 2020 21:29:56 +0200
Subject: [PATCH 19/34] Update Main.java
---
src/Main.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Main.java b/src/Main.java
index c7a5698..df5e4ee 100644
--- a/src/Main.java
+++ b/src/Main.java
@@ -6,6 +6,7 @@ public class Main {
new Circle(),
new Shperevolume(),
new CircleCircumference()
+ new CircleVolum();
};
public static void main(String[] args) {
Topic mathTopic = new Topic();
From b978cac65b3e321832766ec7f0c988a7c8e66f93 Mon Sep 17 00:00:00 2001
From: MayadaMohamed11 <36480871+MayadaMohamed11@users.noreply.github.com>
Date: Sat, 29 Feb 2020 21:37:27 +0200
Subject: [PATCH 20/34] Add files via upload
---
CircleVolum.java | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 CircleVolum.java
diff --git a/CircleVolum.java b/CircleVolum.java
new file mode 100644
index 0000000..ebc55f9
--- /dev/null
+++ b/CircleVolum.java
@@ -0,0 +1,19 @@
+/*
+ * 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 circlevolum;
+
+import java.util.Scanner;
+
+/**
+ *
+ *
+ */
+public class CircleVolum implements ISubscriber{
+ public void notifySubscriber(String input){
+ Integer radius = Integer.parseInt(input);
+ System.out.println ("Circlevolum: "+4/3*Math.PI*radius);
+ }
+}
From 43985e0716d3ec52cacde377440c7890bcd7fb3a Mon Sep 17 00:00:00 2001
From: MayadaMohamed11 <36480871+MayadaMohamed11@users.noreply.github.com>
Date: Sat, 29 Feb 2020 21:40:26 +0200
Subject: [PATCH 21/34] Update CircleVolum.java
---
CircleVolum.java | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/CircleVolum.java b/CircleVolum.java
index ebc55f9..9e525ad 100644
--- a/CircleVolum.java
+++ b/CircleVolum.java
@@ -1,16 +1,3 @@
-/*
- * 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 circlevolum;
-
-import java.util.Scanner;
-
-/**
- *
- *
- */
public class CircleVolum implements ISubscriber{
public void notifySubscriber(String input){
Integer radius = Integer.parseInt(input);
From 44f592990e0dc4dc35efd7888c4e839c09ad6cae Mon Sep 17 00:00:00 2001
From: unknown
Date: Sat, 29 Feb 2020 22:18:45 +0200
Subject: [PATCH 22/34] Lucas series added
---
src/Lucas.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 src/Lucas.java
diff --git a/src/Lucas.java b/src/Lucas.java
new file mode 100644
index 0000000..2c3489c
--- /dev/null
+++ b/src/Lucas.java
@@ -0,0 +1,18 @@
+public class Lucas implements ISubscriber {
+ int tmp[] = {2,1};
+ @Override
+ public void notifySubscriber(String input) {
+ int intInput = Integer.parseInt(input);
+ for (int i=0; i
Date: Sat, 29 Feb 2020 22:20:13 +0200
Subject: [PATCH 23/34] Updated "Main" Class to operate the Lucas class
---
src/Main.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/Main.java b/src/Main.java
index c7a5698..e792ed3 100644
--- a/src/Main.java
+++ b/src/Main.java
@@ -5,7 +5,8 @@ public class Main {
new TwoPowerN(),
new Circle(),
new Shperevolume(),
- new CircleCircumference()
+ new CircleCircumference(),
+ new Lucas()
};
public static void main(String[] args) {
Topic mathTopic = new Topic();
From 1ac81b2a6031abb6c6785b755149e328ae7bd608 Mon Sep 17 00:00:00 2001
From: Bssant
Date: Sat, 29 Feb 2020 22:32:22 +0200
Subject: [PATCH 24/34] 20170075/ adedd SphereCircumference
---
GitAssignmentObserver.iml | 5 +----
src/Main.java | 3 ++-
src/SphereCircumference.java | 8 ++++++++
3 files changed, 11 insertions(+), 5 deletions(-)
create mode 100644 src/SphereCircumference.java
diff --git a/GitAssignmentObserver.iml b/GitAssignmentObserver.iml
index 8598de7..48426fc 100644
--- a/GitAssignmentObserver.iml
+++ b/GitAssignmentObserver.iml
@@ -3,10 +3,7 @@
-
-
-
+
-
\ No newline at end of file
diff --git a/src/Main.java b/src/Main.java
index c7a5698..fe4347d 100644
--- a/src/Main.java
+++ b/src/Main.java
@@ -5,7 +5,8 @@ public class Main {
new TwoPowerN(),
new Circle(),
new Shperevolume(),
- new CircleCircumference()
+ new CircleCircumference(),
+ new SphereCircumference()
};
public static void main(String[] args) {
Topic mathTopic = new Topic();
diff --git a/src/SphereCircumference.java b/src/SphereCircumference.java
new file mode 100644
index 0000000..a7a74d1
--- /dev/null
+++ b/src/SphereCircumference.java
@@ -0,0 +1,8 @@
+public class SphereCircumference implements ISubscriber {
+ @Override
+ public void notifySubscriber(String input){
+ double r = Integer.parseInt(input);
+ System.out.println ("Circumference of a Sphere: "+2*Math.PI*r);
+ }
+
+}
From 1494875b4ba80abe0a817d7c65224f8ebc64d33e Mon Sep 17 00:00:00 2001
From: abdelrahmanIEl-Batal
Date: Sat, 29 Feb 2020 23:44:04 +0200
Subject: [PATCH 25/34] Added SphereArea class, Name : Abdelrahman Ibrahim, ID:
20170139
---
src/SphereArea.java | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 src/SphereArea.java
diff --git a/src/SphereArea.java b/src/SphereArea.java
new file mode 100644
index 0000000..4f4c410
--- /dev/null
+++ b/src/SphereArea.java
@@ -0,0 +1,4 @@
+package PACKAGE_NAME;
+
+public class SphereArea {
+}
From fde60fb4beeb1d0edacc37791a4945b4cbcb5c66 Mon Sep 17 00:00:00 2001
From: abdelrahmanIEl-Batal
Date: Sat, 29 Feb 2020 23:56:11 +0200
Subject: [PATCH 26/34] Added SphereArea, Name:Abdelrahman Ibrahim, ID:20170139
---
git_assignment_initial.iml | 11 +++++++++++
src/Main.java | 3 ++-
src/SphereArea.java | 10 ++++++++--
3 files changed, 21 insertions(+), 3 deletions(-)
create mode 100644 git_assignment_initial.iml
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
diff --git a/src/Main.java b/src/Main.java
index e792ed3..3c26952 100644
--- a/src/Main.java
+++ b/src/Main.java
@@ -6,7 +6,8 @@ public class Main {
new Circle(),
new Shperevolume(),
new CircleCircumference(),
- new Lucas()
+ new Lucas(),
+ new SphereArea()
};
public static void main(String[] args) {
Topic mathTopic = new Topic();
diff --git a/src/SphereArea.java b/src/SphereArea.java
index 4f4c410..fbff9c0 100644
--- a/src/SphereArea.java
+++ b/src/SphereArea.java
@@ -1,4 +1,10 @@
-package PACKAGE_NAME;
-public class SphereArea {
+public class SphereArea implements ISubscriber{
+
+ @Override
+ public void notifySubscriber(String input) {
+ int intInput = Integer.parseInt(input);
+ double res = 4.0 * 3.14159265359 * intInput * intInput;
+ System.out.print("The sphere area is : " + res + "\n");
+ }
}
From a75511b708a0ed3188a1b91ef8ed5ccfcea2bb68 Mon Sep 17 00:00:00 2001
From: Ahmad Khaled <36166958+ahmadkkhaled@users.noreply.github.com>
Date: Sun, 1 Mar 2020 20:39:38 +0200
Subject: [PATCH 27/34] 20170377 Improved presentation of Lucas series
---
GitAssignmentObserver.iml | 19 +++++++++++--------
src/Lucas.java | 9 +++++----
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/GitAssignmentObserver.iml b/GitAssignmentObserver.iml
index 48426fc..deb0535 100644
--- a/GitAssignmentObserver.iml
+++ b/GitAssignmentObserver.iml
@@ -1,9 +1,12 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Lucas.java b/src/Lucas.java
index 2c3489c..3205227 100644
--- a/src/Lucas.java
+++ b/src/Lucas.java
@@ -2,17 +2,18 @@ public class Lucas implements ISubscriber {
int tmp[] = {2,1};
@Override
public void notifySubscriber(String input) {
+ System.out.print("Lucas: ");
int intInput = Integer.parseInt(input);
for (int i=0; i
Date: Sun, 1 Mar 2020 20:47:01 +0200
Subject: [PATCH 28/34] 20170377 moved class CircleVolum to src
---
CircleVolum.java => src/CircleVolum.java | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename CircleVolum.java => src/CircleVolum.java (100%)
diff --git a/CircleVolum.java b/src/CircleVolum.java
similarity index 100%
rename from CircleVolum.java
rename to src/CircleVolum.java
From 3b85c410688cd839740011051e31d2b269705fce Mon Sep 17 00:00:00 2001
From: Ahmad Khaled <36166958+ahmadkkhaled@users.noreply.github.com>
Date: Sun, 1 Mar 2020 20:48:09 +0200
Subject: [PATCH 29/34] 20170377 Resolved syntax error in Main.java
---
src/Main.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Main.java b/src/Main.java
index df5e4ee..efc426a 100644
--- a/src/Main.java
+++ b/src/Main.java
@@ -5,8 +5,8 @@ public class Main {
new TwoPowerN(),
new Circle(),
new Shperevolume(),
- new CircleCircumference()
- new CircleVolum();
+ new CircleCircumference(),
+ new CircleVolum()
};
public static void main(String[] args) {
Topic mathTopic = new Topic();
From ecf48400acf7441a5f9b65f152cb500dacbde2a9 Mon Sep 17 00:00:00 2001
From: Ahmad Khaled <36166958+ahmadkkhaled@users.noreply.github.com>
Date: Sun, 1 Mar 2020 20:52:55 +0200
Subject: [PATCH 30/34] 20170377 Removed IDE generated files
---
.project | 17 -----------------
GitAssignmentObserver.iml | 12 ------------
git_assignment_initial.iml | 11 -----------
3 files changed, 40 deletions(-)
delete mode 100644 .project
delete mode 100644 GitAssignmentObserver.iml
delete mode 100644 git_assignment_initial.iml
diff --git a/.project b/.project
deleted file mode 100644
index a91a890..0000000
--- a/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- GitAssignmentObserver
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
-
-
diff --git a/GitAssignmentObserver.iml b/GitAssignmentObserver.iml
deleted file mode 100644
index deb0535..0000000
--- a/GitAssignmentObserver.iml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/git_assignment_initial.iml b/git_assignment_initial.iml
deleted file mode 100644
index c90834f..0000000
--- a/git_assignment_initial.iml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
From 89fbd3f978fecb6b0c829f90947bb71748c8ccd3 Mon Sep 17 00:00:00 2001
From: AshrafSamir <36134927+AshrafSamir@users.noreply.github.com>
Date: Mon, 2 Mar 2020 19:32:01 +0200
Subject: [PATCH 31/34] 20170053 just added a comment in his funtion
---
src/TwoPowerN.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/TwoPowerN.java b/src/TwoPowerN.java
index 8f38ca6..671530c 100644
--- a/src/TwoPowerN.java
+++ b/src/TwoPowerN.java
@@ -1,5 +1,6 @@
public class TwoPowerN implements ISubscriber{
+ //20170053
@Override
public void notifySubscriber(String input) {
int n = Integer.parseInt(input);
From 9216bd8b81c24bb9c9b08043c67a335aee13ed6d Mon Sep 17 00:00:00 2001
From: ahmed abdelrhman
Date: Mon, 2 Mar 2020 21:40:31 +0200
Subject: [PATCH 32/34] adding l
---
Circle.java | 10 ++++++++++
CircleCircumference.java | 7 +++++++
CircleVolum.java | 6 ++++++
ISubscriber.java | 4 ++++
Lucas.java | 19 +++++++++++++++++++
Main.java | 24 ++++++++++++++++++++++++
ReallySimpleSubscriber.java | 8 ++++++++
Shperevolume.java | 15 +++++++++++++++
SimpleSubscriber.java | 10 ++++++++++
SphereArea.java | 10 ++++++++++
SphereCircumference.java | 8 ++++++++
Topic.java | 25 +++++++++++++++++++++++++
TwoPowerN.java | 12 ++++++++++++
fibonacci.java | 19 +++++++++++++++++++
14 files changed, 177 insertions(+)
create mode 100644 Circle.java
create mode 100644 CircleCircumference.java
create mode 100644 CircleVolum.java
create mode 100644 ISubscriber.java
create mode 100644 Lucas.java
create mode 100644 Main.java
create mode 100644 ReallySimpleSubscriber.java
create mode 100644 Shperevolume.java
create mode 100644 SimpleSubscriber.java
create mode 100644 SphereArea.java
create mode 100644 SphereCircumference.java
create mode 100644 Topic.java
create mode 100644 TwoPowerN.java
create mode 100644 fibonacci.java
diff --git a/Circle.java b/Circle.java
new file mode 100644
index 0000000..685db03
--- /dev/null
+++ b/Circle.java
@@ -0,0 +1,10 @@
+public class Circle implements ISubscriber{
+ public void notifySubscriber(String input){
+ Integer radius = Integer.parseInt(input);
+ System.out.println("The circle area is: " + calculateArea(radius));
+ }
+
+ private double calculateArea(Integer radius){
+ return Math.PI * radius * radius;
+ }
+}
diff --git a/CircleCircumference.java b/CircleCircumference.java
new file mode 100644
index 0000000..43e04ee
--- /dev/null
+++ b/CircleCircumference.java
@@ -0,0 +1,7 @@
+public class CircleCircumference implements ISubscriber{
+ @Override
+ public void notifySubscriber(String input){
+ double radius = Integer.parseInt(input);
+ System.out.println ("CircleCircumference: "+2*Math.PI*radius);
+ }
+}
diff --git a/CircleVolum.java b/CircleVolum.java
new file mode 100644
index 0000000..e94d952
--- /dev/null
+++ b/CircleVolum.java
@@ -0,0 +1,6 @@
+public class CircleVolum implements ISubscriber{
+ public void notifySubscriber(String input){
+ Integer radius = Integer.parseInt(input);
+ System.out.println ("Circlevolum: "+4/3*Math.PI*radius);
+ }
+}
diff --git a/ISubscriber.java b/ISubscriber.java
new file mode 100644
index 0000000..d3a605c
--- /dev/null
+++ b/ISubscriber.java
@@ -0,0 +1,4 @@
+
+public interface ISubscriber {
+ public abstract void notifySubscriber(String input);
+}
diff --git a/Lucas.java b/Lucas.java
new file mode 100644
index 0000000..3205227
--- /dev/null
+++ b/Lucas.java
@@ -0,0 +1,19 @@
+public class Lucas implements ISubscriber {
+ int tmp[] = {2,1};
+ @Override
+ public void notifySubscriber(String input) {
+ System.out.print("Lucas: ");
+ int intInput = Integer.parseInt(input);
+ for (int i=0; i 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);
+ }
+ }
+}
diff --git a/TwoPowerN.java b/TwoPowerN.java
new file mode 100644
index 0000000..8f38ca6
--- /dev/null
+++ b/TwoPowerN.java
@@ -0,0 +1,12 @@
+public class TwoPowerN implements ISubscriber{
+
+ @Override
+ public void notifySubscriber(String input) {
+ int n = Integer.parseInt(input);
+ int sum = 1;
+ for(int i=0;i
Date: Mon, 2 Mar 2020 23:22:18 +0200
Subject: [PATCH 33/34] 20170377 source code files and improved presentation of
fibonacci
---
Circle.java | 10 ----------
CircleCircumference.java | 7 -------
CircleVolum.java | 6 ------
ISubscriber.java | 4 ----
Lucas.java | 19 -------------------
Main.java | 24 ------------------------
ReallySimpleSubscriber.java | 8 --------
Shperevolume.java | 15 ---------------
SimpleSubscriber.java | 10 ----------
SphereArea.java | 10 ----------
SphereCircumference.java | 8 --------
Topic.java | 25 -------------------------
TwoPowerN.java | 12 ------------
fibonacci.java | 19 -------------------
src/Main.java | 1 +
src/fibonacci.java | 15 +++++++++++++++
16 files changed, 16 insertions(+), 177 deletions(-)
delete mode 100644 Circle.java
delete mode 100644 CircleCircumference.java
delete mode 100644 CircleVolum.java
delete mode 100644 ISubscriber.java
delete mode 100644 Lucas.java
delete mode 100644 Main.java
delete mode 100644 ReallySimpleSubscriber.java
delete mode 100644 Shperevolume.java
delete mode 100644 SimpleSubscriber.java
delete mode 100644 SphereArea.java
delete mode 100644 SphereCircumference.java
delete mode 100644 Topic.java
delete mode 100644 TwoPowerN.java
delete mode 100644 fibonacci.java
create mode 100644 src/fibonacci.java
diff --git a/Circle.java b/Circle.java
deleted file mode 100644
index 685db03..0000000
--- a/Circle.java
+++ /dev/null
@@ -1,10 +0,0 @@
-public class Circle implements ISubscriber{
- public void notifySubscriber(String input){
- Integer radius = Integer.parseInt(input);
- System.out.println("The circle area is: " + calculateArea(radius));
- }
-
- private double calculateArea(Integer radius){
- return Math.PI * radius * radius;
- }
-}
diff --git a/CircleCircumference.java b/CircleCircumference.java
deleted file mode 100644
index 43e04ee..0000000
--- a/CircleCircumference.java
+++ /dev/null
@@ -1,7 +0,0 @@
-public class CircleCircumference implements ISubscriber{
- @Override
- public void notifySubscriber(String input){
- double radius = Integer.parseInt(input);
- System.out.println ("CircleCircumference: "+2*Math.PI*radius);
- }
-}
diff --git a/CircleVolum.java b/CircleVolum.java
deleted file mode 100644
index e94d952..0000000
--- a/CircleVolum.java
+++ /dev/null
@@ -1,6 +0,0 @@
-public class CircleVolum implements ISubscriber{
- public void notifySubscriber(String input){
- Integer radius = Integer.parseInt(input);
- System.out.println ("Circlevolum: "+4/3*Math.PI*radius);
- }
-}
diff --git a/ISubscriber.java b/ISubscriber.java
deleted file mode 100644
index d3a605c..0000000
--- a/ISubscriber.java
+++ /dev/null
@@ -1,4 +0,0 @@
-
-public interface ISubscriber {
- public abstract void notifySubscriber(String input);
-}
diff --git a/Lucas.java b/Lucas.java
deleted file mode 100644
index 3205227..0000000
--- a/Lucas.java
+++ /dev/null
@@ -1,19 +0,0 @@
-public class Lucas implements ISubscriber {
- int tmp[] = {2,1};
- @Override
- public void notifySubscriber(String input) {
- System.out.print("Lucas: ");
- int intInput = Integer.parseInt(input);
- for (int i=0; i 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);
- }
- }
-}
diff --git a/TwoPowerN.java b/TwoPowerN.java
deleted file mode 100644
index 8f38ca6..0000000
--- a/TwoPowerN.java
+++ /dev/null
@@ -1,12 +0,0 @@
-public class TwoPowerN implements ISubscriber{
-
- @Override
- public void notifySubscriber(String input) {
- int n = Integer.parseInt(input);
- int sum = 1;
- for(int i=0;i
Date: Tue, 3 Mar 2020 20:46:24 +0200
Subject: [PATCH 34/34] Create MultiplicationSeries.java
20170111 added new files
---
src/MultiplicationSeries.java | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 src/MultiplicationSeries.java
diff --git a/src/MultiplicationSeries.java b/src/MultiplicationSeries.java
new file mode 100644
index 0000000..951e989
--- /dev/null
+++ b/src/MultiplicationSeries.java
@@ -0,0 +1,21 @@
+import java.text.DecimalFormat;
+
+public class MultiplicationSeries implements ISubscriber{
+
+ public void notifySubscriber(String input) {
+ DecimalFormat df= new DecimalFormat();
+ double n= Integer.parseInt(input);
+ System.out.println("Term "+df.format(n)+" is "+df.format(getTerm(n))+". ");
+ }
+
+ public static double getTerm(double j){
+ if (j==1) return 1;
+ if (j==2) return 2;
+ if (j<=0){
+ System.out.println("Error");
+ }
+ return getTerm(j-1)*getTerm(j-2);
+
+ }
+
+}