diff --git a/.classpath b/.classpath deleted file mode 100644 index fceb480..0000000 --- a/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/.gitignore b/.gitignore index 539bdba..6e17738 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,12 @@ .metadata bin/ +out/ tmp/ *.tmp *.bak *.swp *~.nib +.idea/ local.properties .settings/ .loadpath 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/src/Circle.java b/src/Circle.java new file mode 100644 index 0000000..850ebea --- /dev/null +++ b/src/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/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/CircleVolum.java b/src/CircleVolum.java new file mode 100644 index 0000000..9e525ad --- /dev/null +++ b/src/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/src/Lucas.java b/src/Lucas.java new file mode 100644 index 0000000..3205227 --- /dev/null +++ b/src/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