Commit f38a91c0 authored by mohamad's avatar mohamad

Refactor packages

parent a6e3b2bf
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
\ No newline at end of file
...@@ -26,29 +26,34 @@ ...@@ -26,29 +26,34 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent"><![CDATA[{ <component name="PropertiesComponent">{
"keyToString": { &quot;keyToString&quot;: {
"RunOnceActivity.OpenProjectViewOnStart": "true", &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true" &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/mohamad/Desktop/Demo&quot;,
&quot;project.structure.last.edited&quot;: &quot;Facets&quot;,
&quot;project.structure.proportion&quot;: &quot;0.0&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.2&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;
}, },
"keyToStringList": { &quot;keyToStringList&quot;: {
"com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File": [ &quot;com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File&quot;: [
"PLAIN_TEXT" &quot;PLAIN_TEXT&quot;
] ]
} }
}]]></component> }</component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyClassDialog.RECENTS_KEY"> <key name="CopyClassDialog.RECENTS_KEY">
<recent name="FibonacciSeries.implementation" /> <recent name="FibonacciSeries.implementation" />
</key> </key>
</component> </component>
<component name="RunManager" selected="Application.FibonacciSeries.runners.Main"> <component name="RunManager" selected="Application.fibonacciSeries.runners.Main">
<configuration name="FibonacciSeries.runners.Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="FibonacciSeries.runners.Main" /> <option name="MAIN_CLASS_NAME" value="threading.runners.Main" />
<module name="Lab1" /> <module name="Lab1" />
<extension name="coverage"> <extension name="coverage">
<pattern> <pattern>
<option name="PATTERN" value="FibonacciSeries.runners.*" /> <option name="PATTERN" value="threading.runners.*" />
<option name="ENABLED" value="true" /> <option name="ENABLED" value="true" />
</pattern> </pattern>
</extension> </extension>
...@@ -56,12 +61,12 @@ ...@@ -56,12 +61,12 @@
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration name="fibonacciSeries.runners.Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="threading.runners.Main" /> <option name="MAIN_CLASS_NAME" value="fibonacciSeries.runners.Main" />
<module name="Lab1" /> <module name="Lab1" />
<extension name="coverage"> <extension name="coverage">
<pattern> <pattern>
<option name="PATTERN" value="threading.runners.*" /> <option name="PATTERN" value="fibonacciSeries.runners.*" />
<option name="ENABLED" value="true" /> <option name="ENABLED" value="true" />
</pattern> </pattern>
</extension> </extension>
...@@ -71,7 +76,7 @@ ...@@ -71,7 +76,7 @@
</configuration> </configuration>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Application.FibonacciSeries.runners.Main" /> <item itemvalue="Application.fibonacciSeries.runners.Main" />
<item itemvalue="Application.Main" /> <item itemvalue="Application.Main" />
</list> </list>
</recent_temporary> </recent_temporary>
......
...@@ -6,4 +6,4 @@ COPY . /app ...@@ -6,4 +6,4 @@ COPY . /app
WORKDIR /app WORKDIR /app
CMD java src/main/java/threading/runners/Main.java CMD java src/main/java/primeNumbers/runners/Main.java
\ No newline at end of file \ No newline at end of file
package FibonacciSeries.abstractions; package fibonacciSeries.abstractions;
public interface IFibonacciCalculator { public interface IFibonacciCalculator {
double calculate(long number); long calculate(long number);
} }
package fibonacciSeries.abstractions;
import java.util.List;
public interface IFibonacciRangeCalculator {
List<Long> calculate(long start, long end);
}
package FibonacciSeries.implementation; package fibonacciSeries.implementation.item;
import FibonacciSeries.abstractions.IFibonacciCalculator; import fibonacciSeries.abstractions.IFibonacciCalculator;
public class MathFibonacciCalculator implements IFibonacciCalculator { public class MathFibonacciCalculator implements IFibonacciCalculator {
@Override @Override
public double calculate(long number) { public long calculate(long number) {
double item1 = (1 + Math.sqrt(5))/2; double item1 = (1 + Math.sqrt(5))/2;
double item2 = (1 - Math.sqrt(5))/2; double item2 = (1 - Math.sqrt(5))/2;
item1 = Math.pow(item1,number); item1 = Math.pow(item1,number);
item2 = Math.pow(item2,number); item2 = Math.pow(item2,number);
return Math.round((item1 - item2)/Math.sqrt(5)); return (long)Math.round((item1 - item2)/Math.sqrt(5));
} }
} }
package FibonacciSeries.implementation; package fibonacciSeries.implementation.item;
import FibonacciSeries.abstractions.IFibonacciCalculator; import fibonacciSeries.abstractions.IFibonacciCalculator;
public class NormalFibonacciCalculator implements IFibonacciCalculator { public class NormalFibonacciCalculator implements IFibonacciCalculator {
@Override @Override
public double calculate(long number) { public long calculate(long number) {
long firstItem = 0; long firstItem = 0;
long secondItem = 1; long secondItem = 1;
......
package FibonacciSeries.implementation; package fibonacciSeries.implementation.item;
import FibonacciSeries.abstractions.IFibonacciCalculator; import fibonacciSeries.abstractions.IFibonacciCalculator;
public class ParallelFibonacciCalculator implements IFibonacciCalculator { public class ParallelFibonacciCalculator implements IFibonacciCalculator {
@Override @Override
public double calculate(long number) { public long calculate(long number) {
return 0; return 0;
} }
} }
package fibonacciSeries.implementation.range;
import fibonacciSeries.abstractions.IFibonacciRangeCalculator;
import java.util.ArrayList;
import java.util.List;
public class FibonacciRangeCalculatorUsingStructure implements IFibonacciRangeCalculator {
private IFibonacciStructure _firstItem;
private IFibonacciStructure _secondItem;
public FibonacciRangeCalculatorUsingStructure(IFibonacciStructure _firstItem, IFibonacciStructure _secondItem) {
this._firstItem = _firstItem;
this._secondItem = _secondItem;
}
@Override
public List<Long> calculate(long start, long end) {
ArrayList<Long> result = new ArrayList<>();
return result;
}
}
package FibonacciSeries.runners; package fibonacciSeries.runners;
import FibonacciSeries.abstractions.IFibonacciCalculator; import fibonacciSeries.abstractions.IFibonacciCalculator;
import FibonacciSeries.implementation.MathFibonacciCalculator; import fibonacciSeries.implementation.item.MathFibonacciCalculator;
import FibonacciSeries.implementation.NormalFibonacciCalculator;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {
......
package fibonacciSeries.utilities;
public class FibonacciStructure {
private Long _xParameter;
private Long _yParameter;
private Integer Index;
public FibonacciStructure(Long _xParameter, Long _yParameter, Integer index) {
this._xParameter = _xParameter;
this._yParameter = _yParameter;
Index = index;
}
public Long getFibonacciValue(Integer trigger0, Integer trigger1) {
return _xParameter * trigger0 + _yParameter * trigger1;
}
}
package threading.abstractions; package primeNumbers.abstractions;
import java.util.Collection; import java.util.Collection;
......
package threading.implementation; package primeNumbers.implementation;
import threading.abstractions.IPrimeNumbersExtractor; import primeNumbers.abstractions.IPrimeNumbersExtractor;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
......
package threading.implementation; package primeNumbers.implementation;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
......
package threading.runners; package primeNumbers.runners;
import threading.abstractions.IPrimeNumbersExtractor; import primeNumbers.abstractions.IPrimeNumbersExtractor;
import threading.implementation.ParallelPrimeNumbersExtractor; import primeNumbers.implementation.ParallelPrimeNumbersExtractor;
import java.util.Collection; import java.util.Collection;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment