Jakob Kienegger 6 lat temu
rodzic
commit
d602130f40

BIN
Lin_Algebra/Eingabe.class


+ 15 - 0
Lin_Algebra/Eingabe.ctxt

@@ -0,0 +1,15 @@
+#BlueJ class context
+comment0.target=Eingabe
+comment1.params=
+comment1.target=Eingabe()
+comment2.params=dim_m\ dim_n
+comment2.target=void\ einlesen(int,\ int)
+comment3.params=zahl
+comment3.target=double\ faktorCheck(Element)
+comment4.params=zahl\ multi
+comment4.target=double\ rechnen(Element,\ double)
+comment5.params=
+comment5.target=void\ zeilenFaktor()
+comment6.params=
+comment6.target=void\ gauss()
+numComments=7

+ 83 - 0
Lin_Algebra/Eingabe.java

@@ -0,0 +1,83 @@
+
+/** 
+ * @author (Jakob Kienegger) 
+ * @version (27.04.19)
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class Eingabe
+{
+  private Element[][] matrix;
+  private double multi = 1;
+  private int n;
+  private int m;
+  
+    public Eingabe() throws IOException
+    {
+       n = 3;
+       m = 4;
+    }
+    
+    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));
+          }
+        
+      }
+    
+    }
+    public double faktorCheck(Element zahl)
+    {
+        if(zahl.gibZahl() != 1)
+        {
+            multi = 1/(zahl.gibZahl());
+            zahl.multiZahl(multi);
+        }
+        return multi;
+    }
+    
+    public double rechnen(Element zahl, double multi)
+    {
+        zahl.multiZahl(multi);
+        return zahl.gibZahl();
+    }
+   
+    public void zeilenFaktor()
+    {
+        for(int i=0; i<n; i++)
+        {
+            this.multi = faktorCheck(matrix[i][0]);
+            for(int j=1; j<m; j++)
+            {
+                matrix[i][j].multiZahl(this.multi); 
+            }
+        }   
+        
+    }
+    
+    public void gauss() throws IOException
+    {
+        einlesen(m, n);
+        zeilenFaktor();
+        for(int i=0; i<
+        
+    }
+    
+  /*
+    
+    */
+   
+   
+}

BIN
Lin_Algebra/Element.class


+ 13 - 0
Lin_Algebra/Element.ctxt

@@ -0,0 +1,13 @@
+#BlueJ class context
+comment0.target=Element
+comment0.text=\n\ @author\ (Jakob\ Kienegger)\ \n\ @version\ (27.04.19)\n
+comment1.params=zahl
+comment1.target=Element(double)
+comment1.text=\n\ Konstruktor\ f\u00FCr\ Objekte\ der\ Klasse\ Element\n
+comment2.params=
+comment2.target=double\ gibZahl()
+comment3.params=multi
+comment3.target=double\ multiZahl(double)
+comment4.params=zahl
+comment4.target=void\ changeZahl(double)
+numComments=5

+ 35 - 0
Lin_Algebra/Element.java

@@ -0,0 +1,35 @@
+
+/**
+ * @author (Jakob Kienegger) 
+ * @version (27.04.19)
+ */
+public class Element
+{
+  
+    private double zahl;
+
+    /**
+     * Konstruktor für Objekte der Klasse Element
+     */
+    public Element(double zahl)
+   {
+       this.zahl = zahl;
+   }
+   
+    public double gibZahl()
+   {
+       return zahl;
+   }
+   
+    public double multiZahl(double multi)
+   {
+       zahl = zahl * multi;
+       return zahl;
+   }
+    
+    public void changeZahl(double zahl)
+    {
+        this.zahl = zahl;
+    }
+
+}

+ 14 - 0
Lin_Algebra/README.TXT

@@ -0,0 +1,14 @@
+------------------------------------------------------------------------
+Dies ist die README-Datei des Projekts. Hier sollten Sie Ihr Projekt
+beschreiben.
+Erzählen Sie dem Leser (jemand, der nichts über dieses Projekt weiss),
+alles, was er/sie wissen muss. Üblicherweise sollte der Kommentar 
+zumindest die folgenden Angaben umfassen:
+------------------------------------------------------------------------
+
+PROJEKTBEZEICHNUNG:
+PROJEKTZWECK:
+VERSION oder DATUM:
+WIE IST DAS PROJEKT ZU STARTEN:
+AUTOR(EN):
+BENUTZERHINWEISE:

+ 53 - 0
Lin_Algebra/package.bluej

@@ -0,0 +1,53 @@
+#BlueJ package file
+dependency1.from=Eingabe
+dependency1.to=Element
+dependency1.type=UsesDependency
+editor.fx.0.height=873
+editor.fx.0.width=720
+editor.fx.0.x=720
+editor.fx.0.y=0
+editor.fx.1.height=873
+editor.fx.1.width=720
+editor.fx.1.x=0
+editor.fx.1.y=0
+objectbench.height=94
+objectbench.width=781
+package.divider.horizontal=0.5549295774647888
+package.divider.vertical=0.8705128205128205
+package.editor.height=672
+package.editor.width=1289
+package.editor.x=0
+package.editor.y=0
+package.frame.height=873
+package.frame.width=1440
+package.numDependencies=1
+package.numTargets=3
+package.showExtends=true
+package.showUses=true
+project.charset=UTF-8
+readme.height=58
+readme.name=@README
+readme.width=47
+readme.x=10
+readme.y=10
+target1.height=50
+target1.name=Element
+target1.showInterface=false
+target1.type=ClassTarget
+target1.width=90
+target1.x=370
+target1.y=90
+target2.height=50
+target2.name=Datenfeld
+target2.showInterface=false
+target2.type=ClassTarget
+target2.width=100
+target2.x=60
+target2.y=100
+target3.height=50
+target3.name=Eingabe
+target3.showInterface=false
+target3.type=ClassTarget
+target3.width=80
+target3.x=70
+target3.y=190