Browse Source

added main methoed for standalone usage

Frederick 6 years ago
parent
commit
a24f73116c
7 changed files with 236 additions and 24 deletions
  1. 9 0
      .idea/Jakobs_Arbeits_Ecke.iml
  2. 8 0
      .idea/modules.xml
  3. 6 0
      .idea/vcs.xml
  4. 167 0
      .idea/workspace.xml
  5. BIN
      Lin_Algebra/Eingabe.class
  6. 46 24
      Lin_Algebra/Eingabe.java
  7. 0 0
      hallo

+ 9 - 0
.idea/Jakobs_Arbeits_Ecke.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/Jakobs_Arbeits_Ecke.iml" filepath="$PROJECT_DIR$/.idea/Jakobs_Arbeits_Ecke.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>

+ 167 - 0
.idea/workspace.xml

@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ChangeListManager">
+    <list default="true" id="bd86310a-4897-4275-b7d6-8db0ce9c60dd" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/hallo" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/Lin_Algebra/Eingabe.class" beforeDir="false" afterPath="$PROJECT_DIR$/Lin_Algebra/Eingabe.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/Lin_Algebra/Eingabe.java" beforeDir="false" afterPath="$PROJECT_DIR$/Lin_Algebra/Eingabe.java" afterDir="false" />
+    </list>
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="DefaultGradleProjectSettings">
+    <option name="testRunner" value="GRADLE" />
+    <option name="delegatedBuild" value="true" />
+  </component>
+  <component name="FileEditorManager">
+    <leaf>
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/Lin_Algebra/Eingabe.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="642">
+              <caret line="144" column="20" selection-start-line="144" selection-start-column="20" selection-end-line="144" selection-end-column="20" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+    </leaf>
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="IdeDocumentHistory">
+    <option name="CHANGED_PATHS">
+      <list>
+        <option value="$PROJECT_DIR$/Lin_Algebra/Eingabe.java" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectConfigurationFiles">
+    <option name="files">
+      <list>
+        <option value="$PROJECT_DIR$/.idea/Jakobs_Arbeits_Ecke.iml" />
+        <option value="$PROJECT_DIR$/.idea/vcs.xml" />
+        <option value="$PROJECT_DIR$/.idea/modules.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectFrameBounds" extendedState="4">
+    <option name="x" value="1974" />
+    <option name="y" value="24" />
+    <option name="width" value="933" />
+    <option name="height" value="1056" />
+  </component>
+  <component name="ProjectView">
+    <navigator proportions="" version="1">
+      <foldersAlwaysOnTop value="true" />
+    </navigator>
+    <panes>
+      <pane id="Scope" />
+      <pane id="ProjectPane">
+        <subPane>
+          <expand>
+            <path>
+              <item name="Jakobs_Arbeits_Ecke" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Jakobs_Arbeits_Ecke" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="Jakobs_Arbeits_Ecke" type="b2602c69:ProjectViewProjectNode" />
+              <item name="Jakobs_Arbeits_Ecke" type="462c0819:PsiDirectoryNode" />
+              <item name="Lin_Algebra" type="462c0819:PsiDirectoryNode" />
+            </path>
+          </expand>
+          <select />
+        </subPane>
+      </pane>
+      <pane id="PackagesPane" />
+    </panes>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+  </component>
+  <component name="RunDashboard">
+    <option name="ruleStates">
+      <list>
+        <RuleState>
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
+        </RuleState>
+        <RuleState>
+          <option name="name" value="StatusDashboardGroupingRule" />
+        </RuleState>
+      </list>
+    </option>
+  </component>
+  <component name="SvnConfiguration">
+    <configuration />
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="bd86310a-4897-4275-b7d6-8db0ce9c60dd" name="Default Changelist" comment="" />
+      <created>1556394629042</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1556394629042</updated>
+    </task>
+    <servers />
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="1974" y="24" width="933" height="1056" extended-state="4" />
+    <editor active="true" />
+    <layout>
+      <window_info id="Favorites" side_tool="true" />
+      <window_info id="Image Layers" />
+      <window_info id="Designer" />
+      <window_info id="UI Designer" />
+      <window_info id="Capture Tool" />
+      <window_info id="Learn" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24971752" />
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
+      <window_info anchor="bottom" id="Version Control" weight="0.32900432" />
+      <window_info anchor="bottom" id="Terminal" />
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
+      <window_info anchor="bottom" id="Message" order="0" />
+      <window_info anchor="bottom" id="Find" order="1" />
+      <window_info anchor="bottom" id="Run" order="2" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
+      <window_info anchor="bottom" id="TODO" order="6" />
+      <window_info anchor="right" id="Palette" />
+      <window_info anchor="right" id="Theme Preview" />
+      <window_info anchor="right" id="Capture Analysis" />
+      <window_info anchor="right" id="Palette&#9;" />
+      <window_info anchor="right" id="Maven" />
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
+    </layout>
+  </component>
+  <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/Lin_Algebra/Eingabe.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="642">
+          <caret line="144" column="20" selection-start-line="144" selection-start-column="20" selection-end-line="144" selection-end-column="20" />
+        </state>
+      </provider>
+    </entry>
+  </component>
+  <component name="masterDetails">
+    <states>
+      <state key="ProjectJDKs.UI">
+        <settings>
+          <last-edited>1.8</last-edited>
+          <splitter-proportions>
+            <option name="proportions">
+              <list>
+                <option value="0.2" />
+              </list>
+            </option>
+          </splitter-proportions>
+        </settings>
+      </state>
+    </states>
+  </component>
+</project>

BIN
Lin_Algebra/Eingabe.class


+ 46 - 24
Lin_Algebra/Eingabe.java

@@ -9,34 +9,43 @@ import java.util.*;
 
 public class Eingabe
 {
-  private Element[][] matrix;
-  private double multi = 1;
-  private int n;
-  private int m;
-  
-    public Eingabe() throws IOException
+    private Element[][] matrix;
+    private double multi = 1;
+    private int n;
+    private int m;
+
+    public Eingabe()
     {
-       n = 3;
-       m = 4;
+        n = 3;
+        m = 4;
     }
-    
-    public void einlesen(int dim_m, int dim_n) throws IOException
-    {
+
+    public void einlesen(int dim_m, int dim_n) throws IOException {
         m = dim_m;
         n = dim_n;
-      for(int i=0; i<n; i++)
-      {
-          for(int j=0; j<m; j++)
-          {
-              InputStreamReader isr = new InputStreamReader(System.in);
-              BufferedReader br = new BufferedReader(isr);
-              System.out.print( + i + "," + j + ": ");
-              String eingabe = br.readLine();
-              matrix[i][j] = new Element(Integer.parseInt(eingabe));
-          }
-        
-      }
-    
+        //InputStreamReader isr = null;
+        BufferedReader br = null;
+        matrix = new Element[m][n];
+        for (int i = 0; i < n; i++) {
+            for (int j = 0; j < m; j++) {
+                try {
+                    br = new BufferedReader(new InputStreamReader(System.in));
+                    System.out.print(+i + "," + j + ": ");
+                    String eingabe = br.readLine();
+                    matrix[i][j] = new Element(Integer.parseInt(eingabe));
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+
+        }
+        if (br != null) {
+            try {
+                br.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
     }
     public double faktorCheck(Element zahl)
     {
@@ -122,6 +131,19 @@ public class Eingabe
         }
         ausgabe();
     }
+
+    public static void main (String[] args) {
+
+        Eingabe a = new Eingabe();
+
+        try {
+            a.einlesen(2,2);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        a.ausgabe();
+    }
     
   /*
     

+ 0 - 0
hallo