commit 899a05907b9051c121aca5ff64786e55b2b94425 Author: Mykola Fesenko Date: Tue Jul 29 08:08:23 2025 +0200 backup diff --git a/1/.gitingore b/1/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/1/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/1/MeinErstesProgramm.class b/1/MeinErstesProgramm.class new file mode 100644 index 0000000..9a66d93 Binary files /dev/null and b/1/MeinErstesProgramm.class differ diff --git a/1/MeinErstesProgramm.java b/1/MeinErstesProgramm.java new file mode 100644 index 0000000..0efd642 --- /dev/null +++ b/1/MeinErstesProgramm.java @@ -0,0 +1,5 @@ +public class MeinErstesProgramm { + public static void main(String args[]) { + System.out.println("Hello World!"); + } +} \ No newline at end of file diff --git a/1/MeinErstesProgramm.~ava b/1/MeinErstesProgramm.~ava new file mode 100644 index 0000000..6de4b3a --- /dev/null +++ b/1/MeinErstesProgramm.~ava @@ -0,0 +1,6 @@ +public class MeinErstesProgramm { + public static void main(String args[]) { + int a = System.in.read(); + System.out.println("Hello World!" + (a * 4)); + } +} \ No newline at end of file diff --git a/1/ProgExpr.class b/1/ProgExpr.class new file mode 100644 index 0000000..1880fc1 Binary files /dev/null and b/1/ProgExpr.class differ diff --git a/1/ProgExpr.java b/1/ProgExpr.java new file mode 100644 index 0000000..b760004 --- /dev/null +++ b/1/ProgExpr.java @@ -0,0 +1,10 @@ +public class ProgExpr { + public static void main (String args[]) { + int guthaben = 1000; // VAriable Guthaben deklarieren + System.out.println("Guthaben = " + guthaben); // schreiben + int einzahlung = 500; // VAriable einzahlung deklarieren + System.out.println("Einzahlung = " + einzahlung); + guthaben = guthaben + einzahlung; // guthaben + einzahlung + System.out.println("Guthaben = " + guthaben); // Ausgabe + } +} \ No newline at end of file diff --git a/1/ProgExpr.~ava b/1/ProgExpr.~ava new file mode 100644 index 0000000..2259e22 --- /dev/null +++ b/1/ProgExpr.~ava @@ -0,0 +1,10 @@ +public class ProgExpr { + public static void main (String args[]) { + int guthaben = 1000; // VAriable Guthaben deklarieren + System.out.println("Guthaben = " + guthaben); // schreiben + int einzahlung = 500; // VAriable einzahlung deklarieren + System.out.println("Einzahlung = " + einzahlung); + guthaben = guthaben + einzahlung; // guthaben + einzahlung + System.out.println("Guthaben = " + guthaben); // ausgabe + } +} \ No newline at end of file diff --git a/1/ProgFor.class b/1/ProgFor.class new file mode 100644 index 0000000..3f6b077 Binary files /dev/null and b/1/ProgFor.class differ diff --git a/1/ProgFor.java b/1/ProgFor.java new file mode 100644 index 0000000..e0cb15c --- /dev/null +++ b/1/ProgFor.java @@ -0,0 +1,13 @@ +public class ProgFor { + public static void main (String args[]) { + int guthaben = 1000; + int einzahlung = 500; // variables deklaration + System.out.println("Guthaben = " + guthaben); + System.out.println("Einzahlung = " + einzahlung + " pro Monat"); // schreiben text + for ( int monat=1; monat<=6; monat = monat + 1 ) { // for-schleife, ausführt scih 6 Mal + guthaben += einzahlung; // math-oper, guthaben + einzahlung + System.out.println(monat + ". Monat:"); + System.out.println(" Guthaben = " + guthaben); + } + } +} \ No newline at end of file diff --git a/1/ProgFor.~ava b/1/ProgFor.~ava new file mode 100644 index 0000000..f59d8fe --- /dev/null +++ b/1/ProgFor.~ava @@ -0,0 +1,13 @@ +public class ProgFor { + public static void main (String args[]) { + int guthaben = 1000; + int einzahlung = 500; // variables deklaration + System.out.println("Guthaben = " + guthaben); + System.out.println("Einzahlung = " + einzahlung + " pro Monat"); // schreiben text + for ( int monat=1; monat<=6; monat = monat + 1 ) { // for-schleife, ausführt scih 6 Mal + guthaben = guthaben + einzahlung; // math-oper, guthaben + einzahlung + System.out.println(monat + ". Monat:"); + System.out.println(" Guthaben = " + guthaben); + } + } +} \ No newline at end of file diff --git a/1/ProgIf.class b/1/ProgIf.class new file mode 100644 index 0000000..d7b606e Binary files /dev/null and b/1/ProgIf.class differ diff --git a/1/ProgIf.java b/1/ProgIf.java new file mode 100644 index 0000000..a706dc7 --- /dev/null +++ b/1/ProgIf.java @@ -0,0 +1,9 @@ +public class ProgIf { + public static void main (String args[]) { + int guthaben = 2000000; // Variable guthaben deklarieren + System.out.println("Guthaben = " + guthaben); + if ( guthaben >= 1000000 ) { // wenn guthaben mehr als 1000000 + System.out.println("Gratuliere, Du bist Millionaer!"); // dann schreiben + } + } +} \ No newline at end of file diff --git a/1/ProgIf.~ava b/1/ProgIf.~ava new file mode 100644 index 0000000..63f5c90 --- /dev/null +++ b/1/ProgIf.~ava @@ -0,0 +1,9 @@ +public class ProgIf { + public static void main (String args[]) { + int guthaben = 2000000; // Variable guthaben deklarieren + System.out.println("Guthaben = " + guthaben); + if ( guthaben >= 1000000 ) { + System.out.println("Gratuliere, Du bist Millionaer!"); + } + } +} \ No newline at end of file diff --git a/1/ProgWhile.class b/1/ProgWhile.class new file mode 100644 index 0000000..8e328c8 Binary files /dev/null and b/1/ProgWhile.class differ diff --git a/1/ProgWhile.java b/1/ProgWhile.java new file mode 100644 index 0000000..beed482 --- /dev/null +++ b/1/ProgWhile.java @@ -0,0 +1,14 @@ +public class ProgWhile { + public static void main (String args[]) { + int guthaben = 1000; + int sparziel = 8000; + int einzahlung = 600; // variables deklaration + System.out.println ("Guthaben = " + guthaben); + System.out.println ("Sparziel = " + sparziel); // schreiben + while ( guthaben < sparziel ) { // while-schleife , ausführt sich bis guthaben > sparziel + guthaben += einzahlung; // math-oper, guthaben + einzahlung + System.out.println ("neues Guthaben = " + guthaben); + } + System.out.println( "Sparziel erreicht."); + } +} \ No newline at end of file diff --git a/1/ProgWhile.~ava b/1/ProgWhile.~ava new file mode 100644 index 0000000..d78b30d --- /dev/null +++ b/1/ProgWhile.~ava @@ -0,0 +1,14 @@ +public class ProgWhile { + public static void main (String args[]) { + int guthaben = 1000; + int sparziel = 8000; + int einzahlung = 600; // variables deklaration + System.out.println ("Guthaben = " + guthaben); + System.out.println ("Sparziel = " + sparziel); // schreiben + while ( guthaben < sparziel ) { // while-schleife , ausführt sich bis guthaben > sparziel + guthaben = guthaben + einzahlung; + System.out.println ("neues Guthaben = " + guthaben); + } + System.out.println( "Sparziel erreicht."); + } +} \ No newline at end of file diff --git a/10/.gitingore b/10/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/10/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/10/Aufgabe.class b/10/Aufgabe.class new file mode 100644 index 0000000..3da1e5c Binary files /dev/null and b/10/Aufgabe.class differ diff --git a/10/Aufgabe.java b/10/Aufgabe.java new file mode 100644 index 0000000..6c9a173 --- /dev/null +++ b/10/Aufgabe.java @@ -0,0 +1,38 @@ +import java.text.DecimalFormat; +public class Aufgabe { + public static void main(String args[]) { + DecimalFormat d = new DecimalFormat("0.00"); + + System.out.println("-------------------------------"); + Raum raum = new Raum("Wohnzimmer",4.5,8,2.5,3,2); + + + System.out.println(raum.name + " - Decke : " + d.format(raum.berFlaecheDecke())); + System.out.println(raum.name + " - Waende : " + d.format(raum.berFlaecheWaende())); + System.out.println(raum.name + " - Malen : " + d.format(raum.berFlaecheMalen())); + + System.out.println("-------------------------------"); + Raum raum2 = new Raum("Badezimmer",5.6,5,2.5,2,1); + + + System.out.println(raum2.name + " - Decke : " + d.format(raum2.berFlaecheDecke())); + System.out.println(raum2.name + " - Waende : " + d.format(raum2.berFlaecheWaende())); + System.out.println(raum2.name + " - Malen : " + d.format(raum2.berFlaecheMalen())); + + System.out.println("-------------------------------"); + Raum raum3 = new Raum("Küche",5,6,2.5,1,1); + + + System.out.println(raum3.name + " - Decke : " + d.format(raum3.berFlaecheDecke())); + System.out.println(raum3.name + " - Waende : " + d.format(raum3.berFlaecheWaende())); + System.out.println(raum3.name + " - Malen : " + d.format(raum3.berFlaecheMalen())); + + System.out.println("-------------------------------"); + Raum raum4 = new Raum("Wohnzimmer 2",10,5,2.5,3,1); + + + System.out.println(raum4.name + " - Decke : " + d.format(raum4.berFlaecheDecke())); + System.out.println(raum4.name + " - Waende : " + d.format(raum4.berFlaecheWaende())); + System.out.println(raum4.name + " - Malen : " + d.format(raum4.berFlaecheMalen())); + } +} diff --git a/10/Aufgabe.~ava b/10/Aufgabe.~ava new file mode 100644 index 0000000..6b5355d --- /dev/null +++ b/10/Aufgabe.~ava @@ -0,0 +1,36 @@ +import java.text.DecimalFormat; +public class Aufgabe { + public static void main(String args[]) { + DecimalFormat d = new DecimalFormat("0.00"); + + Raum raum = new Raum("Wohnzimmer",4.5,8,2.5,3,2); + + + System.out.println(raum.name + " - Decke : " + d.format(raum.berFlaecheDecke())); + System.out.println(raum.name + " - Waende : " + d.format(raum.berFlaecheWaende())); + System.out.println(raum.name + " - Malen : " + d.format(raum.berFlaecheMalen())); + + + Raum raum2 = new Raum("Badezimmer",5.6,5,2.5,2,1); + + + System.out.println(raum2.name + " - Decke : " + d.format(raum2.berFlaecheDecke())); + System.out.println(raum2.name + " - Waende : " + d.format(raum2.berFlaecheWaende())); + System.out.println(raum2.name + " - Malen : " + d.format(raum2.berFlaecheMalen())); + + + Raum raum3 = new Raum("Küche",5,6,2.5,1,1); + + + System.out.println(raum3.name + " - Decke : " + d.format(raum3.berFlaecheDecke())); + System.out.println(raum3.name + " - Waende : " + d.format(raum3.berFlaecheWaende())); + System.out.println(raum3.name + " - Malen : " + d.format(raum3.berFlaecheMalen())); + + Raum raum4 = new Raum("Wohnzimmer 2",10,5,2.5,3,1); + + + System.out.println(raum4.name + " - Decke : " + d.format(raum4.berFlaecheDecke())); + System.out.println(raum4.name + " - Waende : " + d.format(raum4.berFlaecheWaende())); + System.out.println(raum4.name + " - Malen : " + d.format(raum4.berFlaecheMalen())); + } +} diff --git a/10/Datei1.java b/10/Datei1.java new file mode 100644 index 0000000..e69de29 diff --git a/10/Raum.class b/10/Raum.class new file mode 100644 index 0000000..182b84b Binary files /dev/null and b/10/Raum.class differ diff --git a/10/Raum.java b/10/Raum.java new file mode 100644 index 0000000..18d6186 --- /dev/null +++ b/10/Raum.java @@ -0,0 +1,53 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 02.04.2025 + * @author + */ + +public class Raum { + + // Anfang Attribute + public String name; + public double laenge; + public double breite; + public double hoehe; + public int anzFenster; + public int anzTueren; + // Ende Attribute + + public Raum(String name, double laenge, double breite, double hoehe, int anzFenster, int anzTueren) { + this.name = name; + this.laenge = laenge; + this.breite = breite; + this.hoehe = hoehe; + this.anzFenster = anzFenster; + this.anzTueren = anzTueren; + } + + // Anfang Methoden + public double berFlaecheDecke() { + + return laenge*breite; + } + + public double berFlaecheWaende() { + double ergebniss = 0; + ergebniss += 2*(hoehe*laenge); + ergebniss += 2*(hoehe*breite); + for (int i = 0; i < anzFenster; i++) { + ergebniss -= (1 * 1.2); + } + for (int i = 0; i < anzTueren; i++) { + ergebniss -= (0.9 * 2.1); + } + return ergebniss; + } + + public double berFlaecheMalen() { + return (berFlaecheWaende() + berFlaecheDecke()); + } + + // Ende Methoden +} // end of Raum diff --git a/10/Raum.uml b/10/Raum.uml new file mode 100644 index 0000000..4cc66e8 --- /dev/null +++ b/10/Raum.uml @@ -0,0 +1,27 @@ +[Files] +File0=Raum.java + +[Box: - Raum] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/10/Raum.~ava b/10/Raum.~ava new file mode 100644 index 0000000..5cc50c8 --- /dev/null +++ b/10/Raum.~ava @@ -0,0 +1,55 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 02.04.2025 + * @author + */ + +public class Raum { + + // Anfang Attribute + public String name; + public double laenge; + public double breite; + public double hoehe; + public int anzFenster; + public int anzTueren; + // Ende Attribute + + public Raum(String name, double laenge, double breite, double hoehe, int anzFenster, int anzTueren) { + this.name = name; + this.laenge = laenge; + this.breite = breite; + this.hoehe = hoehe; + this.anzFenster = anzFenster; + this.anzTueren = anzTueren; + } + + // Anfang Methoden + public double berFlaecheDecke() { + + return laenge*breite; + } + + public double berFlaecheWaende() { + double ergebniss = 0; + ergebniss += 2*(hoehe*laenge); + for (int i = 0; i < 2; i++) { + ergebniss += hoehe*breite; + } + for (int i = 0; i < anzFenster; i++) { + ergebniss -= (1 * 1.2); + } + for (int i = 0; i < anzTueren; i++) { + ergebniss -= (0.9 * 2.1); + } + return ergebniss; + } + + public double berFlaecheMalen() { + return (berFlaecheWaende() + berFlaecheDecke()); + } + + // Ende Methoden +} // end of Raum diff --git a/11/.gitingore b/11/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/11/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/11/Bank.class b/11/Bank.class new file mode 100644 index 0000000..d4ca84e Binary files /dev/null and b/11/Bank.class differ diff --git a/11/Bank.java b/11/Bank.java new file mode 100644 index 0000000..764ecaf --- /dev/null +++ b/11/Bank.java @@ -0,0 +1,47 @@ +import java.util.Scanner; +public class Bank { + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + String nl = System.lineSeparator(); + + Kunde k1 = new Kunde("Meier",0); + Konto ko1 = new Konto(1,2567.89); + + k1.setKundeKonto(ko1); + + boolean end = false; + double summe = 0; + while(!end) { + System.out.println("Was wollen Sie?"); + System.out.println("1. Kontostand anzeigen \n2. Einzahlen\n3. Auszahlen\n0. Beenden"); + + System.out.println(); + System.out.print("Wahl: "); + String wahl = input.next(); + System.out.println(); + switch (wahl) { + case "1": + System.out.println("Ihre Kontostand: " +k1.getKundeKonto().getKontostand()); + break; + case "2": + System.out.println("Einzahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + k1.getKundeKonto().einzahlen(summe); + break; + case "3": + System.out.println("Auszahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + k1.getKundeKonto().auszahlen(summe); + break; + case "0": + end = true; + break; + } + System.out.println("----------------------------"); + + } + System.out.println("Auf Wiedersehen!"); + } +} \ No newline at end of file diff --git a/11/Bank.~ava b/11/Bank.~ava new file mode 100644 index 0000000..764ecaf --- /dev/null +++ b/11/Bank.~ava @@ -0,0 +1,47 @@ +import java.util.Scanner; +public class Bank { + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + String nl = System.lineSeparator(); + + Kunde k1 = new Kunde("Meier",0); + Konto ko1 = new Konto(1,2567.89); + + k1.setKundeKonto(ko1); + + boolean end = false; + double summe = 0; + while(!end) { + System.out.println("Was wollen Sie?"); + System.out.println("1. Kontostand anzeigen \n2. Einzahlen\n3. Auszahlen\n0. Beenden"); + + System.out.println(); + System.out.print("Wahl: "); + String wahl = input.next(); + System.out.println(); + switch (wahl) { + case "1": + System.out.println("Ihre Kontostand: " +k1.getKundeKonto().getKontostand()); + break; + case "2": + System.out.println("Einzahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + k1.getKundeKonto().einzahlen(summe); + break; + case "3": + System.out.println("Auszahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + k1.getKundeKonto().auszahlen(summe); + break; + case "0": + end = true; + break; + } + System.out.println("----------------------------"); + + } + System.out.println("Auf Wiedersehen!"); + } +} \ No newline at end of file diff --git a/11/Girokonto.class b/11/Girokonto.class new file mode 100644 index 0000000..cf748f2 Binary files /dev/null and b/11/Girokonto.class differ diff --git a/11/Girokonto.java b/11/Girokonto.java new file mode 100644 index 0000000..9daa073 --- /dev/null +++ b/11/Girokonto.java @@ -0,0 +1,20 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Girokonto extends Konto { + + // Anfang Attribute + // Ende Attribute + + public Girokonto(int kontonr, double kontostand) { + super(kontonr, kontostand); + } + + // Anfang Methoden + // Ende Methoden +} // end of Girokonto diff --git a/11/Girokonto.uml b/11/Girokonto.uml new file mode 100644 index 0000000..a8df35f --- /dev/null +++ b/11/Girokonto.uml @@ -0,0 +1,27 @@ +[Files] +File0=Girokonto.java + +[Box: - Girokonto] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/11/Girokonto.~ava b/11/Girokonto.~ava new file mode 100644 index 0000000..576c987 --- /dev/null +++ b/11/Girokonto.~ava @@ -0,0 +1,16 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Girokonto extends Konto{ + + // Anfang Attribute + // Ende Attribute + + // Anfang Methoden + // Ende Methoden +} // end of Girokonto diff --git a/11/Konto.class b/11/Konto.class new file mode 100644 index 0000000..9179fd0 Binary files /dev/null and b/11/Konto.class differ diff --git a/11/Konto.java b/11/Konto.java new file mode 100644 index 0000000..fb27596 --- /dev/null +++ b/11/Konto.java @@ -0,0 +1,60 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Konto { + + // Anfang Attribute + private int kontonr; + private double kontostand; + // Ende Attribute + + protected Konto(int kontonr, double kontostand) { + this.kontonr = kontonr; + this.kontostand = kontostand; + } + + // Anfang Methoden + public int getKontonr() { + return kontonr; + } + + public void setKontonr(int kontonrNeu) { + kontonr = kontonrNeu; + } + + public double getKontostand() { + return kontostand; + } + + public void setKontostand(double kontostandNeu) { + kontostand = kontostandNeu; + } + + public void einzahlen(double summe) { + if (summe >= 0) { + this.kontostand+=summe; + } + else { + System.out.println("Es ist ein Fehler aufgetreten!"); + } + + } + + public void auszahlen(double summe) { + if (summe >= 0 && this.kontostand >= summe) { + this.kontostand-=summe; + } + else { + System.out.println("Es ist ein Fehler aufgetreten!"); + } // end of if-else + + + } + + // Ende Methoden +} // end of Konto diff --git a/11/Konto.uml b/11/Konto.uml new file mode 100644 index 0000000..27f50f6 --- /dev/null +++ b/11/Konto.uml @@ -0,0 +1,49 @@ +[Files] +File0=Girokonto.java +File1=Konto.java +File2=Sparkonto.java + +[Box: - Girokonto] +X=459 +Y=66 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Konto] +X=21 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Sparkonto] +X=478 +Y=191 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Connections] +V0=Girokonto#Konto#Inheritends####0#0#0###0#0 +V1=Sparkonto#Konto#Inheritends####0#0#0###0#0 + +[Interactive] +I0= + diff --git a/11/Konto.~ava b/11/Konto.~ava new file mode 100644 index 0000000..c7fd2ea --- /dev/null +++ b/11/Konto.~ava @@ -0,0 +1,60 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Konto { + + // Anfang Attribute + private int kontonr; + private double kontostand; + // Ende Attribute + + public Konto(int kontonr, double kontostand) { + this.kontonr = kontonr; + this.kontostand = kontostand; + } + + // Anfang Methoden + public int getKontonr() { + return kontonr; + } + + public void setKontonr(int kontonrNeu) { + kontonr = kontonrNeu; + } + + public double getKontostand() { + return kontostand; + } + + public void setKontostand(double kontostandNeu) { + kontostand = kontostandNeu; + } + + public void einzahlen(double summe) { + if (summe >= 0) { + this.kontostand+=summe; + } + else { + System.out.println("Es ist ein Fehler aufgetreten!"); + } + + } + + public void auszahlen(double summe) { + if (summe >= 0 && this.kontostand >= summe) { + this.kontostand-=summe; + } + else { + System.out.println("Es ist ein Fehler aufgetreten!"); + } // end of if-else + + + } + + // Ende Methoden +} // end of Konto diff --git a/11/Kunde.class b/11/Kunde.class new file mode 100644 index 0000000..5d330f3 Binary files /dev/null and b/11/Kunde.class differ diff --git a/11/Kunde.java b/11/Kunde.java new file mode 100644 index 0000000..b2d058f --- /dev/null +++ b/11/Kunde.java @@ -0,0 +1,48 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Kunde { + + // Anfang Attribute + private int kundenummer; + private Konto kundeKonto; + private String name; + // Ende Attribute + + public Kunde(String name, int kundenummer) { + this.kundenummer = kundenummer; + this.name = name; + } + + // Anfang Methoden + public int getKundenummer() { + return kundenummer; + } + + public void setKundenummer(int kundenummerNeu) { + kundenummer = kundenummerNeu; + } + + public Konto getKundeKonto() { + return kundeKonto; + } + + public void setKundeKonto(Konto kundeKontoNeu) { + kundeKonto = kundeKontoNeu; + } + + public String getName() { + return name; + } + + public void setName(String nameNeu) { + name = nameNeu; + } + + // Ende Methoden +} // end of Kunde diff --git a/11/Kunde.uml b/11/Kunde.uml new file mode 100644 index 0000000..84fbd02 --- /dev/null +++ b/11/Kunde.uml @@ -0,0 +1,39 @@ +[Files] +File0=Konto.java +File1=Kunde.java + +[Box: - Konto] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Kunde] +X=562 +Y=27 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Connections] +V0=Kunde#Konto#AssociationDirected####0#0#0###0#0 + +[Interactive] +I0= + diff --git a/11/Kunde.~ava b/11/Kunde.~ava new file mode 100644 index 0000000..b8227e1 --- /dev/null +++ b/11/Kunde.~ava @@ -0,0 +1,49 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Kunde { + + // Anfang Attribute + private int kundenummer; + private Konto kundeKonto; + private String name; + // Ende Attribute + + public Kunde(Konto kundeKonto, String name, int kundenummer) { + this.kundenummer = kundenummer; + this.kundeKonto = kundeKonto; + this.name = name; + } + + // Anfang Methoden + public int getKundenummer() { + return kundenummer; + } + + public void setKundenummer(int kundenummerNeu) { + kundenummer = kundenummerNeu; + } + + public Konto getKundeKonto() { + return kundeKonto; + } + + public void setKundeKonto(Konto kundeKontoNeu) { + kundeKonto = kundeKontoNeu; + } + + public String getName() { + return name; + } + + public void setName(String nameNeu) { + name = nameNeu; + } + + // Ende Methoden +} // end of Kunde diff --git a/11/Sparkonto.class b/11/Sparkonto.class new file mode 100644 index 0000000..e04aacd Binary files /dev/null and b/11/Sparkonto.class differ diff --git a/11/Sparkonto.java b/11/Sparkonto.java new file mode 100644 index 0000000..1756a2e --- /dev/null +++ b/11/Sparkonto.java @@ -0,0 +1,20 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Sparkonto extends Konto { + + // Anfang Attribute + // Ende Attribute + + public Sparkonto(int kontonr, double kontostand) { + super(kontonr,kontostand); + } + + // Anfang Methoden + // Ende Methoden +} // end of Sparkonto diff --git a/11/Sparkonto.~ava b/11/Sparkonto.~ava new file mode 100644 index 0000000..e7e73a3 --- /dev/null +++ b/11/Sparkonto.~ava @@ -0,0 +1,19 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Sparkonto extends Konto { + + // Anfang Attribute + // Ende Attribute + + public Sparkonto(int kontonr, double kontostand) { + } + + // Anfang Methoden + // Ende Methoden +} // end of Sparkonto diff --git a/12/.gitingore b/12/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/12/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/12/Arbeit.class b/12/Arbeit.class new file mode 100644 index 0000000..3fddb54 Binary files /dev/null and b/12/Arbeit.class differ diff --git a/12/Arbeit.java b/12/Arbeit.java new file mode 100644 index 0000000..7055d04 --- /dev/null +++ b/12/Arbeit.java @@ -0,0 +1,31 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Arbeit { + + // Anfang Attribute + private boolean vollzeit; + private double gehalt; + private String firma; + // Ende Attribute + + // Anfang Methoden + public boolean getVollzeit() { + return vollzeit; + } + + public double getGehalt() { + return gehalt; + } + + public String getFirma() { + return firma; + } + + // Ende Methoden +} // end of Arbeit diff --git a/12/Bank.class b/12/Bank.class new file mode 100644 index 0000000..d4ca84e Binary files /dev/null and b/12/Bank.class differ diff --git a/12/Bank.java b/12/Bank.java new file mode 100644 index 0000000..764ecaf --- /dev/null +++ b/12/Bank.java @@ -0,0 +1,47 @@ +import java.util.Scanner; +public class Bank { + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + String nl = System.lineSeparator(); + + Kunde k1 = new Kunde("Meier",0); + Konto ko1 = new Konto(1,2567.89); + + k1.setKundeKonto(ko1); + + boolean end = false; + double summe = 0; + while(!end) { + System.out.println("Was wollen Sie?"); + System.out.println("1. Kontostand anzeigen \n2. Einzahlen\n3. Auszahlen\n0. Beenden"); + + System.out.println(); + System.out.print("Wahl: "); + String wahl = input.next(); + System.out.println(); + switch (wahl) { + case "1": + System.out.println("Ihre Kontostand: " +k1.getKundeKonto().getKontostand()); + break; + case "2": + System.out.println("Einzahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + k1.getKundeKonto().einzahlen(summe); + break; + case "3": + System.out.println("Auszahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + k1.getKundeKonto().auszahlen(summe); + break; + case "0": + end = true; + break; + } + System.out.println("----------------------------"); + + } + System.out.println("Auf Wiedersehen!"); + } +} \ No newline at end of file diff --git a/12/Bank.~ava b/12/Bank.~ava new file mode 100644 index 0000000..764ecaf --- /dev/null +++ b/12/Bank.~ava @@ -0,0 +1,47 @@ +import java.util.Scanner; +public class Bank { + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + String nl = System.lineSeparator(); + + Kunde k1 = new Kunde("Meier",0); + Konto ko1 = new Konto(1,2567.89); + + k1.setKundeKonto(ko1); + + boolean end = false; + double summe = 0; + while(!end) { + System.out.println("Was wollen Sie?"); + System.out.println("1. Kontostand anzeigen \n2. Einzahlen\n3. Auszahlen\n0. Beenden"); + + System.out.println(); + System.out.print("Wahl: "); + String wahl = input.next(); + System.out.println(); + switch (wahl) { + case "1": + System.out.println("Ihre Kontostand: " +k1.getKundeKonto().getKontostand()); + break; + case "2": + System.out.println("Einzahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + k1.getKundeKonto().einzahlen(summe); + break; + case "3": + System.out.println("Auszahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + k1.getKundeKonto().auszahlen(summe); + break; + case "0": + end = true; + break; + } + System.out.println("----------------------------"); + + } + System.out.println("Auf Wiedersehen!"); + } +} \ No newline at end of file diff --git a/12/Girokonto.class b/12/Girokonto.class new file mode 100644 index 0000000..c7ab091 Binary files /dev/null and b/12/Girokonto.class differ diff --git a/12/Girokonto.java b/12/Girokonto.java new file mode 100644 index 0000000..41ea362 --- /dev/null +++ b/12/Girokonto.java @@ -0,0 +1,31 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Girokonto extends Konto { + + // Anfang Attribute + private double dispoBetrag; + private double dispoZins; + // Ende Attribute + + public Girokonto(int kontonr, double kontostand) { + super(kontonr, kontostand); + } + + // Anfang Methoden + + public double getDispoBetrag() { + return dispoBetrag; + } + + public double getDispoZins() { + return dispoZins; + } + + // Ende Methoden +} // end of Girokonto diff --git a/12/Girokonto.uml b/12/Girokonto.uml new file mode 100644 index 0000000..a8df35f --- /dev/null +++ b/12/Girokonto.uml @@ -0,0 +1,27 @@ +[Files] +File0=Girokonto.java + +[Box: - Girokonto] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/12/Girokonto.~ava b/12/Girokonto.~ava new file mode 100644 index 0000000..576c987 --- /dev/null +++ b/12/Girokonto.~ava @@ -0,0 +1,16 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Girokonto extends Konto{ + + // Anfang Attribute + // Ende Attribute + + // Anfang Methoden + // Ende Methoden +} // end of Girokonto diff --git a/12/Konto.class b/12/Konto.class new file mode 100644 index 0000000..e4b5d13 Binary files /dev/null and b/12/Konto.class differ diff --git a/12/Konto.java b/12/Konto.java new file mode 100644 index 0000000..68ee710 --- /dev/null +++ b/12/Konto.java @@ -0,0 +1,73 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Konto { + + // Anfang Attribute + private int kontonr; + private double kontostand; + private String IBAN; + private boolean begrenzteÜberweisung; + // Ende Attribute + + protected Konto(int kontonr, double kontostand) { + this.kontonr = kontonr; + this.kontostand = kontostand; + } + + // Anfang Methoden + public int getKontonr() { + return kontonr; + } + + public void setKontonr(int kontonrNeu) { + kontonr = kontonrNeu; + } + + public double getKontostand() { + return kontostand; + } + + public void setKontostand(double kontostandNeu) { + kontostand = kontostandNeu; + } + + public void einzahlen(double summe) { + if (summe >= 0) { + this.kontostand+=summe; + } + else { + System.out.println("Es ist ein Fehler aufgetreten!"); + } + + } + public void überweisen(double summe, String IBAN) { + // TODO hier Quelltext einfügen + + } + + public String getIBAN() { + return IBAN; + } + + public boolean getBegrenzteÜberweisung() { + return begrenzteÜberweisung; + } + + public void auszahlen(double summe) { + if (summe >= 0 && kontostand >= summe) { + this.kontostand-=summe; + } + else { + System.out.println("Es ist ein Fehler aufgetreten!"); + } + + } + + // Ende Methoden +} // end of Konto diff --git a/12/Konto.uml b/12/Konto.uml new file mode 100644 index 0000000..2e93c0d --- /dev/null +++ b/12/Konto.uml @@ -0,0 +1,125 @@ +[Files] +File0=Girokonto.java +File1=Konto.java +File2=Lehrer.java +File3=Person.java +File4=Schuler.java +File5=Sekretar.java +File6=Sparkonto.java +File7=Teilzeit.java +File8=Vollzeit.java +File9=Zeitraum.java + +[Box: - Girokonto] +X=576 +Y=19 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Konto] +X=66 +Y=29 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Lehrer] +X=994 +Y=639 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Person] +X=463 +Y=221 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Schuler] +X=1051 +Y=122 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Sekretar] +X=1333 +Y=244 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Sparkonto] +X=13 +Y=437 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Teilzeit] +X=1657 +Y=25 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Vollzeit] +X=1621 +Y=360 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Zeitraum] +X=1229 +Y=534 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=11 +ShowObjectDiagram=0 + +[Connections] +V0=Girokonto#Konto#Inheritends####0#0#0###0#0 +V1=Lehrer#Person#Inheritends####0#0#0###0#0 +V2=Lehrer#Schuler#Aggregation####0#0#0###0#0 +V3=Person#Girokonto#AssociationDirected####0#0#0###0#0 +V4=Person#Sparkonto#AssociationDirected####0#0#0###0#0 +V5=Schuler#Person#Inheritends####0#0#0###0#0 +V6=Schuler#Zeitraum#AssociationDirected####0#0#0###0#0 +V7=Sekretar#Person#Inheritends####0#0#0###0#0 +V8=Sekretar#Schuler#Aggregation####0#0#0###0#0 +V9=Sekretar#Zeitraum#AssociationDirected####0#0#0###0#0 +V10=Sparkonto#Konto#Inheritends####0#0#0###0#0 +V11=Teilzeit#Schuler#Inheritends####0#0#0###0#0 +V12=Vollzeit#Schuler#Inheritends####0#0#0###0#0 + +[Interactive] +I0=Person pers = new Person(); +I1= +I2= + diff --git a/12/Konto.~ava b/12/Konto.~ava new file mode 100644 index 0000000..284b5ce --- /dev/null +++ b/12/Konto.~ava @@ -0,0 +1,68 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Konto { + + // Anfang Attribute + private int kontonr; + private double kontostand; + private String IBAN; + private boolean begrenzteÜberweisung; + // Ende Attribute + + protected Konto(int kontonr, double kontostand) { + this.kontonr = kontonr; + this.kontostand = kontostand; + } + + // Anfang Methoden + public int getKontonr() { + return kontonr; + } + + public void setKontonr(int kontonrNeu) { + kontonr = kontonrNeu; + } + + public double getKontostand() { + return kontostand; + } + + public void setKontostand(double kontostandNeu) { + kontostand = kontostandNeu; + } + + public void einzahlen(double summe) { + if (summe >= 0) { + this.kontostand+=summe; + } + else { + System.out.println("Es ist ein Fehler aufgetreten!"); + } + + } + public void überweisen(double summe, String IBAN) { + // TODO hier Quelltext einfügen + + } + + public String getIBAN() { + return IBAN; + } + + public boolean getBegrenzteÜberweisung() { + return begrenzteÜberweisung; + } + + public void auszahlen(double summe) { + // TODO hier Quelltext einfügen + + } + + // Ende Methoden +} // end of Konto diff --git a/12/Kunde.class b/12/Kunde.class new file mode 100644 index 0000000..5d330f3 Binary files /dev/null and b/12/Kunde.class differ diff --git a/12/Kunde.java b/12/Kunde.java new file mode 100644 index 0000000..b2d058f --- /dev/null +++ b/12/Kunde.java @@ -0,0 +1,48 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Kunde { + + // Anfang Attribute + private int kundenummer; + private Konto kundeKonto; + private String name; + // Ende Attribute + + public Kunde(String name, int kundenummer) { + this.kundenummer = kundenummer; + this.name = name; + } + + // Anfang Methoden + public int getKundenummer() { + return kundenummer; + } + + public void setKundenummer(int kundenummerNeu) { + kundenummer = kundenummerNeu; + } + + public Konto getKundeKonto() { + return kundeKonto; + } + + public void setKundeKonto(Konto kundeKontoNeu) { + kundeKonto = kundeKontoNeu; + } + + public String getName() { + return name; + } + + public void setName(String nameNeu) { + name = nameNeu; + } + + // Ende Methoden +} // end of Kunde diff --git a/12/Kunde.uml b/12/Kunde.uml new file mode 100644 index 0000000..84fbd02 --- /dev/null +++ b/12/Kunde.uml @@ -0,0 +1,39 @@ +[Files] +File0=Konto.java +File1=Kunde.java + +[Box: - Konto] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Kunde] +X=562 +Y=27 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Connections] +V0=Kunde#Konto#AssociationDirected####0#0#0###0#0 + +[Interactive] +I0= + diff --git a/12/Kunde.~ava b/12/Kunde.~ava new file mode 100644 index 0000000..b8227e1 --- /dev/null +++ b/12/Kunde.~ava @@ -0,0 +1,49 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Kunde { + + // Anfang Attribute + private int kundenummer; + private Konto kundeKonto; + private String name; + // Ende Attribute + + public Kunde(Konto kundeKonto, String name, int kundenummer) { + this.kundenummer = kundenummer; + this.kundeKonto = kundeKonto; + this.name = name; + } + + // Anfang Methoden + public int getKundenummer() { + return kundenummer; + } + + public void setKundenummer(int kundenummerNeu) { + kundenummer = kundenummerNeu; + } + + public Konto getKundeKonto() { + return kundeKonto; + } + + public void setKundeKonto(Konto kundeKontoNeu) { + kundeKonto = kundeKontoNeu; + } + + public String getName() { + return name; + } + + public void setName(String nameNeu) { + name = nameNeu; + } + + // Ende Methoden +} // end of Kunde diff --git a/12/Lehrer.java b/12/Lehrer.java new file mode 100644 index 0000000..3207984 --- /dev/null +++ b/12/Lehrer.java @@ -0,0 +1,40 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Lehrer extends Person { + + // Anfang Attribute + private Schuler[] schuler; + private String[] klassen; + private String fach; + private double gehalt; + private double deputat; + // Ende Attribute + + // Anfang Methoden + public Schuler[] getSchuler() { + return schuler; + } + public String[] getKlassen() { + return klassen; + } + + public String getFach() { + return fach; + } + + public double getGehalt() { + return gehalt; + } + + public double getDeputat() { + return deputat; + } + + // Ende Methoden +} // end of Lehrer diff --git a/12/Lehrer.~ava b/12/Lehrer.~ava new file mode 100644 index 0000000..eee9773 --- /dev/null +++ b/12/Lehrer.~ava @@ -0,0 +1,30 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Lehrer extends Person { + + // Anfang Attribute + private Schuler[] schuler; + private String klassen; + private String fach; + // Ende Attribute + + // Anfang Methoden + public Schuler[] getSchuler() { + return schuler; + } + public String getKlassen() { + return klassen; + } + + public String getFach() { + return fach; + } + + // Ende Methoden +} // end of Lehrer diff --git a/12/Person.class b/12/Person.class new file mode 100644 index 0000000..e1916d1 Binary files /dev/null and b/12/Person.class differ diff --git a/12/Person.java b/12/Person.java new file mode 100644 index 0000000..f86cc86 --- /dev/null +++ b/12/Person.java @@ -0,0 +1,50 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Person { + + // Anfang Attribute + private String name; + private int alter; + public Girokonto meinGiroKonto; + public Sparkonto meinSparKonto; + // Ende Attribute + + // Anfang Methoden + public String getName() { + return name; + } + + public int getAlter() { + return alter; + } + + public void setAlter(int alterNeu) { + alter = alterNeu; + } + + public void setName(String nameNeu) { + name = nameNeu; + } + public Girokonto getMeinGiroKonto() { + return meinGiroKonto; + } + + public void setMeinGiroKonto(Girokonto meinGiroKontoNeu) { + meinGiroKonto = meinGiroKontoNeu; + } + + public Sparkonto getMeinSparKonto() { + return meinSparKonto; + } + + public void setMeinSparKonto(Sparkonto meinSparKontoNeu) { + meinSparKonto = meinSparKontoNeu; + } + // Ende Methoden +} // end of Person diff --git a/12/Schuler.java b/12/Schuler.java new file mode 100644 index 0000000..115c91a --- /dev/null +++ b/12/Schuler.java @@ -0,0 +1,29 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Schuler extends Person { + + // Anfang Attribute + private String klasse; + private Zeitraum zeitraum; + // Ende Attribute + // Anfang Methoden + public String getKlasse() { + return klasse; + } + + public void setKlasse(String klasseNeu) { + klasse = klasseNeu; + } + + public Zeitraum getZeitraum() { + return zeitraum; + } + + // Ende Methoden +} // end of Schuler diff --git a/12/Sekretar.class b/12/Sekretar.class new file mode 100644 index 0000000..243968e Binary files /dev/null and b/12/Sekretar.class differ diff --git a/12/Sekretar.java b/12/Sekretar.java new file mode 100644 index 0000000..8b6ac32 --- /dev/null +++ b/12/Sekretar.java @@ -0,0 +1,36 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Sekretar extends Person { + + // Anfang Attribute + private Schuler[] schuler; + private double gehalt; + private String aufgabengebiet; + private Zeitraum zeitraum; + // Ende Attribute + + // Anfang Methoden + public Schuler[] getSchuler() { + return schuler; + } + + public double getGehalt() { + return gehalt; + } + + public String getAufgabengebiet() { + return aufgabengebiet; + } + + public Zeitraum getZeitraum() { + return zeitraum; + } + + // Ende Methoden +} // end of Sekretar diff --git a/12/Sekretar.~ava b/12/Sekretar.~ava new file mode 100644 index 0000000..374bfa8 --- /dev/null +++ b/12/Sekretar.~ava @@ -0,0 +1,21 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Sekretar extends Person { + + // Anfang Attribute + private Schuler schuler; + // Ende Attribute + + // Anfang Methoden + public Schuler getSchuler() { + return schuler; + } + + // Ende Methoden +} // end of Sekretar diff --git a/12/Sparkonto.class b/12/Sparkonto.class new file mode 100644 index 0000000..c570722 Binary files /dev/null and b/12/Sparkonto.class differ diff --git a/12/Sparkonto.java b/12/Sparkonto.java new file mode 100644 index 0000000..f8de037 --- /dev/null +++ b/12/Sparkonto.java @@ -0,0 +1,39 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Sparkonto extends Konto { + + // Anfang Attribute + private double zins; + private double monatlichLimit; + // Ende Attribute + + public Sparkonto(int kontonr, double kontostand) { + super(kontonr,kontostand); + } + + // Anfang Methoden + public double getZins() { + return zins; + } + + public void setZins(double zinsNeu) { + zins = zinsNeu; + } + + public void zinsBerechnen() { + // TODO hier Quelltext einfügen + + } + + public double getMonatlichLimit() { + return monatlichLimit; + } + + // Ende Methoden +} // end of Sparkonto diff --git a/12/Sparkonto.~ava b/12/Sparkonto.~ava new file mode 100644 index 0000000..e7e73a3 --- /dev/null +++ b/12/Sparkonto.~ava @@ -0,0 +1,19 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Sparkonto extends Konto { + + // Anfang Attribute + // Ende Attribute + + public Sparkonto(int kontonr, double kontostand) { + } + + // Anfang Methoden + // Ende Methoden +} // end of Sparkonto diff --git a/12/Teilzeit.class b/12/Teilzeit.class new file mode 100644 index 0000000..19ddb55 Binary files /dev/null and b/12/Teilzeit.class differ diff --git a/12/Teilzeit.java b/12/Teilzeit.java new file mode 100644 index 0000000..20e9c46 --- /dev/null +++ b/12/Teilzeit.java @@ -0,0 +1,34 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 01.07.2025 + * @author + */ + +public class Teilzeit extends Schuler { + + // Anfang Attribute + private boolean lockUnterricht; + private String ausbildingBetrieb; + private String beruf; + // Ende Attribute + + public Teilzeit(String klasse, Zeitraum zeitraum) { + } + + // Anfang Methoden + public boolean getLockUnterricht() { + return lockUnterricht; + } + + public String getAusbildingBetrieb() { + return ausbildingBetrieb; + } + + public String getBeruf() { + return beruf; + } + + // Ende Methoden +} // end of Teilzeit diff --git a/12/Vollzeit.class b/12/Vollzeit.class new file mode 100644 index 0000000..f338863 Binary files /dev/null and b/12/Vollzeit.class differ diff --git a/12/Vollzeit.java b/12/Vollzeit.java new file mode 100644 index 0000000..c94ff5a --- /dev/null +++ b/12/Vollzeit.java @@ -0,0 +1,19 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 01.07.2025 + * @author + */ + +public class Vollzeit extends Schuler { + + // Anfang Attribute + // Ende Attribute + + public Vollzeit(String klasse, Zeitraum zeitraum) { + } + + // Anfang Methoden + // Ende Methoden +} // end of Vollzeit diff --git a/12/Zeitraum.class b/12/Zeitraum.class new file mode 100644 index 0000000..2fbc51b Binary files /dev/null and b/12/Zeitraum.class differ diff --git a/12/Zeitraum.java b/12/Zeitraum.java new file mode 100644 index 0000000..df9027d --- /dev/null +++ b/12/Zeitraum.java @@ -0,0 +1,26 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Zeitraum { + + // Anfang Attribute + private boolean vollzeit; + private int anzStundenProWoche; + // Ende Attribute + + // Anfang Methoden + public boolean getVollzeit() { + return vollzeit; + } + + public int getAnzStundenProWoche() { + return anzStundenProWoche; + } + + // Ende Methoden +} // end of Zeitraum diff --git a/12/lehrer.class b/12/lehrer.class new file mode 100644 index 0000000..acc522f Binary files /dev/null and b/12/lehrer.class differ diff --git a/12/schuler.class b/12/schuler.class new file mode 100644 index 0000000..28b81ba Binary files /dev/null and b/12/schuler.class differ diff --git a/12/t.svg b/12/t.svg new file mode 100644 index 0000000..c4f596a --- /dev/null +++ b/12/t.svg @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Girokonto + + +Girokonto(kontonr: int, kontostand: double) + +auszahlen() + + + + + + Konto + + -kontonr: int + -kontostand: double + -IBAN: String + -begrenzteÜberweisung: boolean + + #Konto(kontonr: int, kontostand: double) + +getKontonr(): int + +setKontonr(kontonrNeu: int) + +getKontostand(): double + +setKontostand(kontostandNeu: double) + +einzahlen(summe: double) + +überweisen(summe: double, IBAN: String) + +getIBAN(): String + +getBegrenzteÜberweisung(): boolean + + + + + + Lehrer + + -schuler: Schuler[ ] + -klassen: String[ ] + -fach: String + + +getSchuler(): Schuler[ ] + +getKlassen(): String[ ] + +getFach(): String + + + + + + Person + + -name: String + -alter: int + + +getName(): String + +getAlter(): int + +setAlter(alterNeu: int) + +setName(nameNeu: String) + + + + + + Schuler + + -klasse: String + -zeitraum: Zeitraum + + +getKlasse(): String + +setKlasse(klasseNeu: String) + +getZeitraum(): Zeitraum + + + + + + Sekretar + + -schuler: Schuler[ ] + + +getSchuler(): Schuler[ ] + + + + + + Sparkonto + + -zins: double + -monatlichLimit: double + + +Sparkonto(kontonr: int, kontostand: double) + +getZins(): double + +setZins(zinsNeu: double) + +zinsBerechnen() + +getMonatlichLimit(): double + + + + + + Zeitraum + + -vollzeit: boolean + -anzStundenProWoche: int + + +getVollzeit(): boolean + +getAnzStundenProWoche(): int + + + diff --git a/13/.gitingore b/13/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/13/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/13/Angestellter.class b/13/Angestellter.class new file mode 100644 index 0000000..66f843e Binary files /dev/null and b/13/Angestellter.class differ diff --git a/13/Angestellter.java b/13/Angestellter.java new file mode 100644 index 0000000..943d9d4 --- /dev/null +++ b/13/Angestellter.java @@ -0,0 +1,34 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 25.06.2025 + * @author + */ + +public class Angestellter extends Mitarbeiter { + + // Anfang Attribute + private double gehalt; + // Ende Attribute + + public Angestellter(String vorname, String name) { + super(vorname, name); + } + + // Anfang Methoden + public double getGehalt() { + return gehalt; + } + + public void setGehalt(double gehaltNeu) { + gehalt = gehaltNeu; + } + + public void gehalt_erhoehen(double prozent) { + gehalt += (gehalt * prozent); + + } + + // Ende Methoden +} // end of Angestellter diff --git a/13/Angestellter.~ava b/13/Angestellter.~ava new file mode 100644 index 0000000..943d9d4 --- /dev/null +++ b/13/Angestellter.~ava @@ -0,0 +1,34 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 25.06.2025 + * @author + */ + +public class Angestellter extends Mitarbeiter { + + // Anfang Attribute + private double gehalt; + // Ende Attribute + + public Angestellter(String vorname, String name) { + super(vorname, name); + } + + // Anfang Methoden + public double getGehalt() { + return gehalt; + } + + public void setGehalt(double gehaltNeu) { + gehalt = gehaltNeu; + } + + public void gehalt_erhoehen(double prozent) { + gehalt += (gehalt * prozent); + + } + + // Ende Methoden +} // end of Angestellter diff --git a/13/Arbeiter.class b/13/Arbeiter.class new file mode 100644 index 0000000..9336678 Binary files /dev/null and b/13/Arbeiter.class differ diff --git a/13/Arbeiter.java b/13/Arbeiter.java new file mode 100644 index 0000000..cd313e7 --- /dev/null +++ b/13/Arbeiter.java @@ -0,0 +1,35 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 25.06.2025 + * @author + */ + +public class Arbeiter extends Mitarbeiter { + + // Anfang Attribute + private double lohnsatz; + private int arbeitstunden; + // Ende Attribute + + public Arbeiter(String vorname, String name) { + super(vorname,name); + } + + // Anfang Methoden + public double getLohn() { + // TODO hier Quelltext einfügen + return lohnsatz * arbeitstunden; + } + + public double getLohnsatz() { + return lohnsatz; + } + + public int getArbeitstunden() { + return arbeitstunden; + } + + // Ende Methoden +} // end of Arbeiter diff --git a/13/Arbeiter.~ava b/13/Arbeiter.~ava new file mode 100644 index 0000000..4360615 --- /dev/null +++ b/13/Arbeiter.~ava @@ -0,0 +1,35 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 25.06.2025 + * @author + */ + +public class Arbeiter extends Mitarbeiter { + + // Anfang Attribute + private double lohnsatz; + private int arbeitstunden; + // Ende Attribute + + public Arbeiter(String vorname, String name) { + super(vorname,name); + } + + // Anfang Methoden + public double getLohn() { + // TODO hier Quelltext einfügen + return 0; + } + + public double getLohnsatz() { + return lohnsatz; + } + + public int getArbeitstunden() { + return arbeitstunden; + } + + // Ende Methoden +} // end of Arbeiter diff --git a/13/Aufgabe1.class b/13/Aufgabe1.class new file mode 100644 index 0000000..9baffcb Binary files /dev/null and b/13/Aufgabe1.class differ diff --git a/13/Aufgabe1.java b/13/Aufgabe1.java new file mode 100644 index 0000000..2178d9e --- /dev/null +++ b/13/Aufgabe1.java @@ -0,0 +1,16 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 25.06.2025 + * @author + */ + +public class Aufgabe1 { + + // Anfang Attribute + // Ende Attribute + + // Anfang Methoden + // Ende Methoden +} // end of Aufgabe1 diff --git a/13/Aufgabe1.uml b/13/Aufgabe1.uml new file mode 100644 index 0000000..12865a7 --- /dev/null +++ b/13/Aufgabe1.uml @@ -0,0 +1,78 @@ +[Files] +File0=Angestellter.java +File1=Arbeiter.java +File2=Aufgabe1.java +File3=Auszubildender.java +File4=Mitarbeiter.java +File5=Vorgesetze.java + +[Box: - Angestellter] +X=90 +Y=387 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Arbeiter] +X=947 +Y=464 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Aufgabe1] +X=277 +Y=106 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Auszubildender] +X=549 +Y=446 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Mitarbeiter] +X=601 +Y=66 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Vorgesetze] +X=53 +Y=673 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=190 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=11 +ShowObjectDiagram=0 + +[Connections] +V0=Angestellter#Mitarbeiter#Inheritends####0#0#0###0#0 +V1=Arbeiter#Mitarbeiter#Inheritends####0#0#0###0#0 +V2=Auszubildender#Mitarbeiter#Inheritends####0#0#0###0#0 +V3=Vorgesetze#Angestellter#Inheritends####0#0#0###0#0 + +[Interactive] +I0= + diff --git a/13/Auszubildender.class b/13/Auszubildender.class new file mode 100644 index 0000000..056456d Binary files /dev/null and b/13/Auszubildender.class differ diff --git a/13/Auszubildender.java b/13/Auszubildender.java new file mode 100644 index 0000000..3aade30 --- /dev/null +++ b/13/Auszubildender.java @@ -0,0 +1,38 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 25.06.2025 + * @author + */ + +public class Auszubildender extends Mitarbeiter { + + // Anfang Attribute + private double verguetung; + private int auZeit; + // Ende Attribute + + public Auszubildender(String vorname, String name) { + super(vorname, name); + } + + // Anfang Methoden + public double getVerguetung() { + return verguetung; + } + + public int getAuZeit() { + return auZeit; + } + + public void setVerguetung(double verguetungNeu) { + verguetung = verguetungNeu; + } + + public void setAuZeit(int auZeitNeu) { + auZeit = auZeitNeu; + } + + // Ende Methoden +} // end of Auszubildender diff --git a/13/Mitarbeiter.class b/13/Mitarbeiter.class new file mode 100644 index 0000000..b626a3d Binary files /dev/null and b/13/Mitarbeiter.class differ diff --git a/13/Mitarbeiter.java b/13/Mitarbeiter.java new file mode 100644 index 0000000..b470b27 --- /dev/null +++ b/13/Mitarbeiter.java @@ -0,0 +1,58 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 25.06.2025 + * @author + */ + +public class Mitarbeiter { + + // Anfang Attribute + private String vorname; + private String name; + private String beruf; + private int mitarbeiternummer; + // Ende Attribute + + public Mitarbeiter(String vorname, String name) { + this.vorname = vorname; + this.name = name; + this.beruf = ""; + } + + // Anfang Methoden + public String getVorname() { + return vorname; + } + + public void setVorname(String vornameNeu) { + vorname = vornameNeu; + } + + public String getName() { + return name; + } + + public void setName(String nameNeu) { + name = nameNeu; + } + + public String getBeruf() { + return beruf; + } + + public void setBeruf(String berufNeu) { + beruf = berufNeu; + } + + public int getMitarbeiternummer() { + return mitarbeiternummer; + } + + public void setMitarbeiternummer(int mitarbeiternummerNeu) { + mitarbeiternummer = mitarbeiternummerNeu; + } + + // Ende Methoden +} // end of Mitarbeiter diff --git a/13/Vorgesetze.class b/13/Vorgesetze.class new file mode 100644 index 0000000..3730c8e Binary files /dev/null and b/13/Vorgesetze.class differ diff --git a/13/Vorgesetze.java b/13/Vorgesetze.java new file mode 100644 index 0000000..8149741 --- /dev/null +++ b/13/Vorgesetze.java @@ -0,0 +1,40 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 25.06.2025 + * @author + */ + +public class Vorgesetze extends Angestellter { + + // Anfang Attribute + private double zuschlag; + // Ende Attribute + + public Vorgesetze(String vorname, String name) { + super(vorname, name); + } + public void gehalt_erhoehen(double prozent) { + double gehalt = getGehalt(); + if (gehalt > 10000) { + setGehalt( prozentBerechnen(gehalt,0.01)); + } + else { + setGehalt( prozentBerechnen(gehalt,0.02)); + } // end of if-else + } + public double prozentBerechnen(double summe, double prozent) { + return summe+(summe + prozent); + } + // Anfang Methoden + public double getZuschlag() { + return zuschlag; + } + + public void setZuschlag(double zuschlagNeu) { + zuschlag = zuschlagNeu; + } + + // Ende Methoden +} // end of Vorgesetze diff --git a/13/Vorgesetze.~ava b/13/Vorgesetze.~ava new file mode 100644 index 0000000..8149741 --- /dev/null +++ b/13/Vorgesetze.~ava @@ -0,0 +1,40 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 25.06.2025 + * @author + */ + +public class Vorgesetze extends Angestellter { + + // Anfang Attribute + private double zuschlag; + // Ende Attribute + + public Vorgesetze(String vorname, String name) { + super(vorname, name); + } + public void gehalt_erhoehen(double prozent) { + double gehalt = getGehalt(); + if (gehalt > 10000) { + setGehalt( prozentBerechnen(gehalt,0.01)); + } + else { + setGehalt( prozentBerechnen(gehalt,0.02)); + } // end of if-else + } + public double prozentBerechnen(double summe, double prozent) { + return summe+(summe + prozent); + } + // Anfang Methoden + public double getZuschlag() { + return zuschlag; + } + + public void setZuschlag(double zuschlagNeu) { + zuschlag = zuschlagNeu; + } + + // Ende Methoden +} // end of Vorgesetze diff --git a/14/.gitingore b/14/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/14/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/14/12/.gitingore b/14/12/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/14/12/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/14/12/Arbeit.class b/14/12/Arbeit.class new file mode 100644 index 0000000..3fddb54 Binary files /dev/null and b/14/12/Arbeit.class differ diff --git a/14/12/Arbeit.java b/14/12/Arbeit.java new file mode 100644 index 0000000..7055d04 --- /dev/null +++ b/14/12/Arbeit.java @@ -0,0 +1,31 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Arbeit { + + // Anfang Attribute + private boolean vollzeit; + private double gehalt; + private String firma; + // Ende Attribute + + // Anfang Methoden + public boolean getVollzeit() { + return vollzeit; + } + + public double getGehalt() { + return gehalt; + } + + public String getFirma() { + return firma; + } + + // Ende Methoden +} // end of Arbeit diff --git a/14/12/Bank.class b/14/12/Bank.class new file mode 100644 index 0000000..16482d6 Binary files /dev/null and b/14/12/Bank.class differ diff --git a/14/12/Bank.java b/14/12/Bank.java new file mode 100644 index 0000000..0443b91 --- /dev/null +++ b/14/12/Bank.java @@ -0,0 +1,107 @@ +import java.util.Scanner; +import java.util.ArrayList; +public class Bank { + + + public static void main(String[] args) { + showBar(); + + Kunde kunde = new Kunde("Meier", 23); + // ArrayList konten = new ArrayList(); + // + // konten.add( new Girokonto(0,1000.0)); + // konten.add( new Girokonto(1,100430.0)); + // konten.add( new Girokonto(2,53.3)); + + kunde.setKundeKonto(new Girokonto(0,1000.0),0); + kunde.setKundeKonto(new Girokonto(1,10340.0),1); + kunde.setKundeKonto(new Girokonto(2,15.0),2); + + + + + + Scanner input = new Scanner(System.in); + String nl = System.lineSeparator(); + + + boolean end = false; + int index = 0; + while(!end) { + System.out.println("Was wollen Sie?"); + System.out.println("1. Übersicht \n2. Anzahl\n3. Konto wählen\n0. Beenden"); + + System.out.println(); + System.out.print("Wahl: "); + String wahl = input.next(); + System.out.println(); + switch (wahl) { + case "1": + kunde.uebersichtKonten(); + break; + case "2": + kunde.anzahlKonten(); + break; + case "3": + System.out.println("Wählen Sie Konto!"); + System.out.print("Index: "); + index = input.nextInt(); + KontoMenu(kunde.getKundeKonto(index)); + break; + case "0": + end = true; + break; + } + System.out.println("----------------------------"); + + } + System.out.println("Auf Wiedersehen!"); + + } + public static void KontoMenu(Konto konto) { + Scanner input = new Scanner(System.in); + String nl = System.lineSeparator(); + + boolean end = false; + double summe = 0; + while(!end) { + System.out.println("Was wollen Sie?"); + System.out.println("1. Kontostand anzeigen \n2. Einzahlen\n3. Auszahlen\n0. Beenden"); + + System.out.println(); + System.out.print("Wahl: "); + String wahl = input.next(); + System.out.println(); + switch (wahl) { + case "1": + System.out.println("Ihre Kontostand: " + konto.getKontostand() ); + break; + case "2": + System.out.println("Einzahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + konto.einzahlen(summe); + break; + case "3": + System.out.println("Auszahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + konto.auszahlen(summe); + break; + case "0": + end = true; + break; + } + showBar(); + + } + System.out.println("Auf Wiedersehen!"); + showBar(); + showBar(); + showBar(); + } + public static void showBar() { + System.out.println("----------------------------"); + } + +} \ No newline at end of file diff --git a/14/12/Bank.~ava b/14/12/Bank.~ava new file mode 100644 index 0000000..b7b4254 --- /dev/null +++ b/14/12/Bank.~ava @@ -0,0 +1,114 @@ +import java.util.Scanner; +import java.util.ArrayList; +public class Bank { + + + public static void main(String[] args) { + showBar(); + + Kunde kunde = new Kunde("Meier", 23); + // ArrayList konten = new ArrayList(); + // + // konten.add( new Girokonto(0,1000.0)); + // konten.add( new Girokonto(1,100430.0)); + // konten.add( new Girokonto(2,53.3)); + + kunde.setKundeKonto(new Girokonto(0,1000.0),0); + kunde.setKundeKonto(new Girokonto(1,10340.0),1); + kunde.setKundeKonto(new Girokonto(2,15.0),2); + + for (int i = 0; i < kunde.getKundeKonto().size(); i++) { + System.out.println(kunde.getKundeKonto(i).getKontonr()); + System.out.println(kunde.getKundeKonto(i).getKontostand()); + showBar(); + } // end of for + + + + Scanner input = new Scanner(System.in); + String nl = System.lineSeparator(); + + + + + + boolean end = false; + int index = 0; + while(!end) { + System.out.println("Was wollen Sie?"); + System.out.println("1. Übersicht \n2. Anzahl\n3. Konto wählen\n0. Beenden"); + + System.out.println(); + System.out.print("Wahl: "); + String wahl = input.next(); + System.out.println(); + switch (wahl) { + case "1": + kunde.uebersichtKonten(); + break; + case "2": + kunde.anzahlKonten(); + break; + case "3": + System.out.println("Wählen Sie Konto!"); + System.out.print("Index: "); + index = input.nextInt(); + KontoMenu(kunde.getKundeKonto(index)); + break; + case "0": + end = true; + break; + } + System.out.println("----------------------------"); + + } + System.out.println("Auf Wiedersehen!"); + + } + public static void KontoMenu(Konto konto) { + Scanner input = new Scanner(System.in); + String nl = System.lineSeparator(); + + boolean end = false; + double summe = 0; + while(!end) { + System.out.println("Was wollen Sie?"); + System.out.println("1. Kontostand anzeigen \n2. Einzahlen\n3. Auszahlen\n0. Beenden"); + + System.out.println(); + System.out.print("Wahl: "); + String wahl = input.next(); + System.out.println(); + switch (wahl) { + case "1": + System.out.println("Ihre Kontostand: " + konto.getKontostand() ); + break; + case "2": + System.out.println("Einzahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + konto.einzahlen(summe); + break; + case "3": + System.out.println("Auszahlung!"); + System.out.print("Tragen Sie die Summe: "); + summe = input.nextDouble(); + konto.auszahlen(summe); + break; + case "0": + end = true; + break; + } + showBar(); + + } + System.out.println("Auf Wiedersehen!"); + showBar(); + showBar(); + showBar(); + } + public static void showBar() { + System.out.println("----------------------------"); + } + +} \ No newline at end of file diff --git a/14/12/Girokonto.class b/14/12/Girokonto.class new file mode 100644 index 0000000..c7ab091 Binary files /dev/null and b/14/12/Girokonto.class differ diff --git a/14/12/Girokonto.java b/14/12/Girokonto.java new file mode 100644 index 0000000..41ea362 --- /dev/null +++ b/14/12/Girokonto.java @@ -0,0 +1,31 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Girokonto extends Konto { + + // Anfang Attribute + private double dispoBetrag; + private double dispoZins; + // Ende Attribute + + public Girokonto(int kontonr, double kontostand) { + super(kontonr, kontostand); + } + + // Anfang Methoden + + public double getDispoBetrag() { + return dispoBetrag; + } + + public double getDispoZins() { + return dispoZins; + } + + // Ende Methoden +} // end of Girokonto diff --git a/14/12/Girokonto.uml b/14/12/Girokonto.uml new file mode 100644 index 0000000..a8df35f --- /dev/null +++ b/14/12/Girokonto.uml @@ -0,0 +1,27 @@ +[Files] +File0=Girokonto.java + +[Box: - Girokonto] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/14/12/Girokonto.~ava b/14/12/Girokonto.~ava new file mode 100644 index 0000000..576c987 --- /dev/null +++ b/14/12/Girokonto.~ava @@ -0,0 +1,16 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Girokonto extends Konto{ + + // Anfang Attribute + // Ende Attribute + + // Anfang Methoden + // Ende Methoden +} // end of Girokonto diff --git a/14/12/Konto.class b/14/12/Konto.class new file mode 100644 index 0000000..e4b5d13 Binary files /dev/null and b/14/12/Konto.class differ diff --git a/14/12/Konto.java b/14/12/Konto.java new file mode 100644 index 0000000..68ee710 --- /dev/null +++ b/14/12/Konto.java @@ -0,0 +1,73 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Konto { + + // Anfang Attribute + private int kontonr; + private double kontostand; + private String IBAN; + private boolean begrenzteÜberweisung; + // Ende Attribute + + protected Konto(int kontonr, double kontostand) { + this.kontonr = kontonr; + this.kontostand = kontostand; + } + + // Anfang Methoden + public int getKontonr() { + return kontonr; + } + + public void setKontonr(int kontonrNeu) { + kontonr = kontonrNeu; + } + + public double getKontostand() { + return kontostand; + } + + public void setKontostand(double kontostandNeu) { + kontostand = kontostandNeu; + } + + public void einzahlen(double summe) { + if (summe >= 0) { + this.kontostand+=summe; + } + else { + System.out.println("Es ist ein Fehler aufgetreten!"); + } + + } + public void überweisen(double summe, String IBAN) { + // TODO hier Quelltext einfügen + + } + + public String getIBAN() { + return IBAN; + } + + public boolean getBegrenzteÜberweisung() { + return begrenzteÜberweisung; + } + + public void auszahlen(double summe) { + if (summe >= 0 && kontostand >= summe) { + this.kontostand-=summe; + } + else { + System.out.println("Es ist ein Fehler aufgetreten!"); + } + + } + + // Ende Methoden +} // end of Konto diff --git a/14/12/Konto.uml b/14/12/Konto.uml new file mode 100644 index 0000000..fd28921 --- /dev/null +++ b/14/12/Konto.uml @@ -0,0 +1,135 @@ +[Files] +File0=Girokonto.java +File1=Konto.java +File2=Kunde.java +File3=Lehrer.java +File4=Person.java +File5=Schuler.java +File6=Sekretar.java +File7=Sparkonto.java +File8=Teilzeit.java +File9=Vollzeit.java +File10=Zeitraum.java + +[Box: - Girokonto] +X=576 +Y=19 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Konto] +X=66 +Y=29 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Kunde] +X=461 +Y=580 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Lehrer] +X=994 +Y=639 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Person] +X=618 +Y=211 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Schuler] +X=1051 +Y=122 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Sekretar] +X=1333 +Y=244 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Sparkonto] +X=13 +Y=437 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Teilzeit] +X=1657 +Y=25 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Vollzeit] +X=1621 +Y=360 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Zeitraum] +X=1229 +Y=534 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=11 +ShowObjectDiagram=0 + +[Connections] +V0=Girokonto#Konto#Inheritends####0#0#0###0#0 +V1=Kunde#Konto#Aggregation####0#0#0###0#0 +V2=Lehrer#Person#Inheritends####0#0#0###0#0 +V3=Lehrer#Schuler#Aggregation####0#0#0###0#0 +V4=Person#Girokonto#AssociationDirected####0#0#0###0#0 +V5=Person#Sparkonto#AssociationDirected####0#0#0###0#0 +V6=Schuler#Person#Inheritends####0#0#0###0#0 +V7=Schuler#Zeitraum#AssociationDirected####0#0#0###0#0 +V8=Sekretar#Person#Inheritends####0#0#0###0#0 +V9=Sekretar#Schuler#Aggregation####0#0#0###0#0 +V10=Sekretar#Zeitraum#AssociationDirected####0#0#0###0#0 +V11=Sparkonto#Konto#Inheritends####0#0#0###0#0 +V12=Teilzeit#Schuler#Inheritends####0#0#0###0#0 +V13=Vollzeit#Schuler#Inheritends####0#0#0###0#0 + +[Interactive] +I0=Person pers = new Person(); +I1= +I2= + diff --git a/14/12/Konto.~ava b/14/12/Konto.~ava new file mode 100644 index 0000000..284b5ce --- /dev/null +++ b/14/12/Konto.~ava @@ -0,0 +1,68 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Konto { + + // Anfang Attribute + private int kontonr; + private double kontostand; + private String IBAN; + private boolean begrenzteÜberweisung; + // Ende Attribute + + protected Konto(int kontonr, double kontostand) { + this.kontonr = kontonr; + this.kontostand = kontostand; + } + + // Anfang Methoden + public int getKontonr() { + return kontonr; + } + + public void setKontonr(int kontonrNeu) { + kontonr = kontonrNeu; + } + + public double getKontostand() { + return kontostand; + } + + public void setKontostand(double kontostandNeu) { + kontostand = kontostandNeu; + } + + public void einzahlen(double summe) { + if (summe >= 0) { + this.kontostand+=summe; + } + else { + System.out.println("Es ist ein Fehler aufgetreten!"); + } + + } + public void überweisen(double summe, String IBAN) { + // TODO hier Quelltext einfügen + + } + + public String getIBAN() { + return IBAN; + } + + public boolean getBegrenzteÜberweisung() { + return begrenzteÜberweisung; + } + + public void auszahlen(double summe) { + // TODO hier Quelltext einfügen + + } + + // Ende Methoden +} // end of Konto diff --git a/14/12/Kunde.class b/14/12/Kunde.class new file mode 100644 index 0000000..76be74f Binary files /dev/null and b/14/12/Kunde.class differ diff --git a/14/12/Kunde.java b/14/12/Kunde.java new file mode 100644 index 0000000..100b44a --- /dev/null +++ b/14/12/Kunde.java @@ -0,0 +1,71 @@ +import java.util.ArrayList; +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Kunde { + + // Anfang Attribute + private int kundenummer; + private ArrayList kundeKonten = new ArrayList(); + private String name; + // Ende Attribute + + public Kunde(String name, int kundenummer) { + this.kundenummer = kundenummer; + this.name = name; + } + + // Anfang Methoden + public int getKundenummer() { + return kundenummer; + } + + public void setKundenummer(int kundenummerNeu) { + kundenummer = kundenummerNeu; + } + + public ArrayList getKundeKonto() { + return this.kundeKonten; + } + + public void setKundeKonten(ArrayList kundeKontenNeu) { + this.kundeKonten = kundeKontenNeu; + } + public void setKundeKonto(Konto neuKonto, int index ) { + this.kundeKonten.add(index,neuKonto); + + } + public Konto getKundeKonto(int index ) { + return this.kundeKonten.get(index); + + } + public String getName() { + return name; + } + + public void setName(String nameNeu) { + name = nameNeu; + } + + public void uebersichtKonten() { + System.out.println("----------------------------"); + for (int i = 0; i < this.getKundeKonto().size(); i++) { + System.out.println(this.getKundeKonto(i).getKontonr()); + System.out.println(this.getKundeKonto(i).getKontostand()); + System.out.println("----------------------------"); + } + + } + public void anzahlKonten() { + System.out.println("----------------------------"); + System.out.println("Sie haben: " + this.getKundeKonto().size() + " Konten"); + System.out.println("----------------------------"); + + } + // Ende Methoden +} // end of Kunde diff --git a/14/12/Kunde.uml b/14/12/Kunde.uml new file mode 100644 index 0000000..84fbd02 --- /dev/null +++ b/14/12/Kunde.uml @@ -0,0 +1,39 @@ +[Files] +File0=Konto.java +File1=Kunde.java + +[Box: - Konto] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Box: - Kunde] +X=562 +Y=27 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Connections] +V0=Kunde#Konto#AssociationDirected####0#0#0###0#0 + +[Interactive] +I0= + diff --git a/14/12/Kunde.~ava b/14/12/Kunde.~ava new file mode 100644 index 0000000..13794ec --- /dev/null +++ b/14/12/Kunde.~ava @@ -0,0 +1,71 @@ +import java.util.ArrayList; +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Kunde { + + // Anfang Attribute + private int kundenummer; + private ArrayList kundeKonten = new ArrayList(); + private String name; + // Ende Attribute + + public Kunde(String name, int kundenummer) { + this.kundenummer = kundenummer; + this.name = name; + } + + // Anfang Methoden + public int getKundenummer() { + return kundenummer; + } + + public void setKundenummer(int kundenummerNeu) { + kundenummer = kundenummerNeu; + } + + public ArrayList getKundeKonto() { + return this.kundeKonten; + } + + public void setKundeKonten(ArrayList kundeKontenNeu) { + this.kundeKonten = kundeKontenNeu; + } + public void setKundeKonto(Konto neuKonto, int index ) { + this.kundeKonten.add(index,neuKonto); + + } + public Konto getKundeKonto(int index ) { + return this.kundeKonten.get(index); + + } + public String getName() { + return name; + } + + public void setName(String nameNeu) { + name = nameNeu; + } + + public void uebersichtKonten() { + System.out.println("----------------------------"); + for (int i = 0; i < this.getKundeKonto().size(); i++) { + System.out.println(this.getKundeKonto(i).getKontonr()); + System.out.println(this.getKundeKonto(i).getKontostand()); + System.out.println("----------------------------"); + } + + } + public void anzahlKonten() { + System.out.println("----------------------------"); + System.out.println("Sie haben: " + this.getKundeKonto().size() + "konten"); + System.out.println("----------------------------"); + + } + // Ende Methoden +} // end of Kunde diff --git a/14/12/Lehrer.java b/14/12/Lehrer.java new file mode 100644 index 0000000..3207984 --- /dev/null +++ b/14/12/Lehrer.java @@ -0,0 +1,40 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Lehrer extends Person { + + // Anfang Attribute + private Schuler[] schuler; + private String[] klassen; + private String fach; + private double gehalt; + private double deputat; + // Ende Attribute + + // Anfang Methoden + public Schuler[] getSchuler() { + return schuler; + } + public String[] getKlassen() { + return klassen; + } + + public String getFach() { + return fach; + } + + public double getGehalt() { + return gehalt; + } + + public double getDeputat() { + return deputat; + } + + // Ende Methoden +} // end of Lehrer diff --git a/14/12/Lehrer.~ava b/14/12/Lehrer.~ava new file mode 100644 index 0000000..eee9773 --- /dev/null +++ b/14/12/Lehrer.~ava @@ -0,0 +1,30 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Lehrer extends Person { + + // Anfang Attribute + private Schuler[] schuler; + private String klassen; + private String fach; + // Ende Attribute + + // Anfang Methoden + public Schuler[] getSchuler() { + return schuler; + } + public String getKlassen() { + return klassen; + } + + public String getFach() { + return fach; + } + + // Ende Methoden +} // end of Lehrer diff --git a/14/12/Person.class b/14/12/Person.class new file mode 100644 index 0000000..e1916d1 Binary files /dev/null and b/14/12/Person.class differ diff --git a/14/12/Person.java b/14/12/Person.java new file mode 100644 index 0000000..f86cc86 --- /dev/null +++ b/14/12/Person.java @@ -0,0 +1,50 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Person { + + // Anfang Attribute + private String name; + private int alter; + public Girokonto meinGiroKonto; + public Sparkonto meinSparKonto; + // Ende Attribute + + // Anfang Methoden + public String getName() { + return name; + } + + public int getAlter() { + return alter; + } + + public void setAlter(int alterNeu) { + alter = alterNeu; + } + + public void setName(String nameNeu) { + name = nameNeu; + } + public Girokonto getMeinGiroKonto() { + return meinGiroKonto; + } + + public void setMeinGiroKonto(Girokonto meinGiroKontoNeu) { + meinGiroKonto = meinGiroKontoNeu; + } + + public Sparkonto getMeinSparKonto() { + return meinSparKonto; + } + + public void setMeinSparKonto(Sparkonto meinSparKontoNeu) { + meinSparKonto = meinSparKontoNeu; + } + // Ende Methoden +} // end of Person diff --git a/14/12/Schuler.java b/14/12/Schuler.java new file mode 100644 index 0000000..115c91a --- /dev/null +++ b/14/12/Schuler.java @@ -0,0 +1,29 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Schuler extends Person { + + // Anfang Attribute + private String klasse; + private Zeitraum zeitraum; + // Ende Attribute + // Anfang Methoden + public String getKlasse() { + return klasse; + } + + public void setKlasse(String klasseNeu) { + klasse = klasseNeu; + } + + public Zeitraum getZeitraum() { + return zeitraum; + } + + // Ende Methoden +} // end of Schuler diff --git a/14/12/Sekretar.class b/14/12/Sekretar.class new file mode 100644 index 0000000..243968e Binary files /dev/null and b/14/12/Sekretar.class differ diff --git a/14/12/Sekretar.java b/14/12/Sekretar.java new file mode 100644 index 0000000..8b6ac32 --- /dev/null +++ b/14/12/Sekretar.java @@ -0,0 +1,36 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Sekretar extends Person { + + // Anfang Attribute + private Schuler[] schuler; + private double gehalt; + private String aufgabengebiet; + private Zeitraum zeitraum; + // Ende Attribute + + // Anfang Methoden + public Schuler[] getSchuler() { + return schuler; + } + + public double getGehalt() { + return gehalt; + } + + public String getAufgabengebiet() { + return aufgabengebiet; + } + + public Zeitraum getZeitraum() { + return zeitraum; + } + + // Ende Methoden +} // end of Sekretar diff --git a/14/12/Sekretar.~ava b/14/12/Sekretar.~ava new file mode 100644 index 0000000..374bfa8 --- /dev/null +++ b/14/12/Sekretar.~ava @@ -0,0 +1,21 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Sekretar extends Person { + + // Anfang Attribute + private Schuler schuler; + // Ende Attribute + + // Anfang Methoden + public Schuler getSchuler() { + return schuler; + } + + // Ende Methoden +} // end of Sekretar diff --git a/14/12/Sparkonto.class b/14/12/Sparkonto.class new file mode 100644 index 0000000..c570722 Binary files /dev/null and b/14/12/Sparkonto.class differ diff --git a/14/12/Sparkonto.java b/14/12/Sparkonto.java new file mode 100644 index 0000000..f8de037 --- /dev/null +++ b/14/12/Sparkonto.java @@ -0,0 +1,39 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Sparkonto extends Konto { + + // Anfang Attribute + private double zins; + private double monatlichLimit; + // Ende Attribute + + public Sparkonto(int kontonr, double kontostand) { + super(kontonr,kontostand); + } + + // Anfang Methoden + public double getZins() { + return zins; + } + + public void setZins(double zinsNeu) { + zins = zinsNeu; + } + + public void zinsBerechnen() { + // TODO hier Quelltext einfügen + + } + + public double getMonatlichLimit() { + return monatlichLimit; + } + + // Ende Methoden +} // end of Sparkonto diff --git a/14/12/Sparkonto.~ava b/14/12/Sparkonto.~ava new file mode 100644 index 0000000..e7e73a3 --- /dev/null +++ b/14/12/Sparkonto.~ava @@ -0,0 +1,19 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 06.05.2025 + * @author + */ + +public class Sparkonto extends Konto { + + // Anfang Attribute + // Ende Attribute + + public Sparkonto(int kontonr, double kontostand) { + } + + // Anfang Methoden + // Ende Methoden +} // end of Sparkonto diff --git a/14/12/Teilzeit.class b/14/12/Teilzeit.class new file mode 100644 index 0000000..19ddb55 Binary files /dev/null and b/14/12/Teilzeit.class differ diff --git a/14/12/Teilzeit.java b/14/12/Teilzeit.java new file mode 100644 index 0000000..20e9c46 --- /dev/null +++ b/14/12/Teilzeit.java @@ -0,0 +1,34 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 01.07.2025 + * @author + */ + +public class Teilzeit extends Schuler { + + // Anfang Attribute + private boolean lockUnterricht; + private String ausbildingBetrieb; + private String beruf; + // Ende Attribute + + public Teilzeit(String klasse, Zeitraum zeitraum) { + } + + // Anfang Methoden + public boolean getLockUnterricht() { + return lockUnterricht; + } + + public String getAusbildingBetrieb() { + return ausbildingBetrieb; + } + + public String getBeruf() { + return beruf; + } + + // Ende Methoden +} // end of Teilzeit diff --git a/14/12/Vollzeit.class b/14/12/Vollzeit.class new file mode 100644 index 0000000..f338863 Binary files /dev/null and b/14/12/Vollzeit.class differ diff --git a/14/12/Vollzeit.java b/14/12/Vollzeit.java new file mode 100644 index 0000000..c94ff5a --- /dev/null +++ b/14/12/Vollzeit.java @@ -0,0 +1,19 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 01.07.2025 + * @author + */ + +public class Vollzeit extends Schuler { + + // Anfang Attribute + // Ende Attribute + + public Vollzeit(String klasse, Zeitraum zeitraum) { + } + + // Anfang Methoden + // Ende Methoden +} // end of Vollzeit diff --git a/14/12/Zeitraum.class b/14/12/Zeitraum.class new file mode 100644 index 0000000..2fbc51b Binary files /dev/null and b/14/12/Zeitraum.class differ diff --git a/14/12/Zeitraum.java b/14/12/Zeitraum.java new file mode 100644 index 0000000..df9027d --- /dev/null +++ b/14/12/Zeitraum.java @@ -0,0 +1,26 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 07.05.2025 + * @author + */ + +public class Zeitraum { + + // Anfang Attribute + private boolean vollzeit; + private int anzStundenProWoche; + // Ende Attribute + + // Anfang Methoden + public boolean getVollzeit() { + return vollzeit; + } + + public int getAnzStundenProWoche() { + return anzStundenProWoche; + } + + // Ende Methoden +} // end of Zeitraum diff --git a/14/12/lehrer.class b/14/12/lehrer.class new file mode 100644 index 0000000..acc522f Binary files /dev/null and b/14/12/lehrer.class differ diff --git a/14/12/schuler.class b/14/12/schuler.class new file mode 100644 index 0000000..28b81ba Binary files /dev/null and b/14/12/schuler.class differ diff --git a/14/12/t.svg b/14/12/t.svg new file mode 100644 index 0000000..c4f596a --- /dev/null +++ b/14/12/t.svg @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Girokonto + + +Girokonto(kontonr: int, kontostand: double) + +auszahlen() + + + + + + Konto + + -kontonr: int + -kontostand: double + -IBAN: String + -begrenzteÜberweisung: boolean + + #Konto(kontonr: int, kontostand: double) + +getKontonr(): int + +setKontonr(kontonrNeu: int) + +getKontostand(): double + +setKontostand(kontostandNeu: double) + +einzahlen(summe: double) + +überweisen(summe: double, IBAN: String) + +getIBAN(): String + +getBegrenzteÜberweisung(): boolean + + + + + + Lehrer + + -schuler: Schuler[ ] + -klassen: String[ ] + -fach: String + + +getSchuler(): Schuler[ ] + +getKlassen(): String[ ] + +getFach(): String + + + + + + Person + + -name: String + -alter: int + + +getName(): String + +getAlter(): int + +setAlter(alterNeu: int) + +setName(nameNeu: String) + + + + + + Schuler + + -klasse: String + -zeitraum: Zeitraum + + +getKlasse(): String + +setKlasse(klasseNeu: String) + +getZeitraum(): Zeitraum + + + + + + Sekretar + + -schuler: Schuler[ ] + + +getSchuler(): Schuler[ ] + + + + + + Sparkonto + + -zins: double + -monatlichLimit: double + + +Sparkonto(kontonr: int, kontostand: double) + +getZins(): double + +setZins(zinsNeu: double) + +zinsBerechnen() + +getMonatlichLimit(): double + + + + + + Zeitraum + + -vollzeit: boolean + -anzStundenProWoche: int + + +getVollzeit(): boolean + +getAnzStundenProWoche(): int + + + diff --git a/14/Al.class b/14/Al.class new file mode 100644 index 0000000..fc604a2 Binary files /dev/null and b/14/Al.class differ diff --git a/14/Al.java b/14/Al.java new file mode 100644 index 0000000..005af8a --- /dev/null +++ b/14/Al.java @@ -0,0 +1,29 @@ +import java.util.ArrayList; +public class Al { + public static void main(String args[]) { + + ArrayList noten = new ArrayList(); + + noten.add(5.6); + + if(noten.contains(5.6)) { + System.out.println("Ture"); + + } + else { + System.out.println("False"); + } // end of if-else + for (int i = 0; i<25 ;i++ ) { + noten.add(Math.ceil((Math.random() * 10))); + + } // end of for + Math. + System.out.println(noten.get(5)); + System.out.println(noten); + System.out.println(noten.size()); + System.out.println(noten.remove(0)); + System.out.println(noten); + + } + +} \ No newline at end of file diff --git a/14/Al.~ava b/14/Al.~ava new file mode 100644 index 0000000..ea73716 --- /dev/null +++ b/14/Al.~ava @@ -0,0 +1,29 @@ +import java.util.ArrayList; +public class Al { + public static void main(String args[]) { + + ArrayList noten = new ArrayList(); + + noten.add(5.6); + + if(noten.contains(5.6)) { + System.out.println("Ture"); + + } + else { + System.out.println("False"); + } // end of if-else + for (int i = 0; i<25 ;i++ ) { + noten.add(Math.ceil((Math.random() * 10))); + + } // end of for + + System.out.println(noten.get(5)); + System.out.println(noten); + System.out.println(noten.size()); + System.out.println(noten.remove(0)); + System.out.println(noten); + + } + +} \ No newline at end of file diff --git a/2/.gitingore b/2/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/2/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/2/BMI.class b/2/BMI.class new file mode 100644 index 0000000..3831443 Binary files /dev/null and b/2/BMI.class differ diff --git a/2/BMI.java b/2/BMI.java new file mode 100644 index 0000000..262a338 --- /dev/null +++ b/2/BMI.java @@ -0,0 +1,8 @@ +public class BMI { + public static void main(String args[]) { + double gewicht = 67.0; + double grosse = 1.67; + + System.out.println("BMI: " + (gewicht/ (grosse*grosse))); + } + } \ No newline at end of file diff --git a/2/BMI.~ava b/2/BMI.~ava new file mode 100644 index 0000000..d1f47c8 --- /dev/null +++ b/2/BMI.~ava @@ -0,0 +1,8 @@ +public class BMI { + public static void main(String args[]) { + double gewicht = 67.0; + double grosse = 1.67; + + System.out.println("BMI: " + (int)(gewicht/ (grosse*grosse))); + } + } \ No newline at end of file diff --git a/2/BMI2.class b/2/BMI2.class new file mode 100644 index 0000000..81bcb9c Binary files /dev/null and b/2/BMI2.class differ diff --git a/2/BMI2.java b/2/BMI2.java new file mode 100644 index 0000000..e9b1252 --- /dev/null +++ b/2/BMI2.java @@ -0,0 +1,20 @@ +import java.util.Scanner; +public class BMI2 { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + + double gewicht = 67.0; + double grosse = 1.67; + System.out.print("Gewicht = "); + if(input.hasNextDouble()) { + gewicht = input.nextDouble(); + } + + System.out.print("Große = "); + if(input.hasNextDouble()) { + grosse = input.nextDouble(); + } + + System.out.println("BMI: " + (gewicht/ (grosse*grosse))); + } +} \ No newline at end of file diff --git a/2/BMI2.~ava b/2/BMI2.~ava new file mode 100644 index 0000000..eac9482 --- /dev/null +++ b/2/BMI2.~ava @@ -0,0 +1,20 @@ +import java.util.Scanner; +public class BMI2 { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + + double gewicht = 67.0; + double grosse = 1.67; + System.out.print("Gewicht = "); + if(input.hasNextDouble()) { + gewicht = input.nextDouble(); + } + + System.out.print("Zahl a = "); + if(input.hasNextDouble()) { + grosse = input.nextDouble(); + } + + System.out.println("BMI: " + (gewicht/ (grosse*grosse))); + } +} \ No newline at end of file diff --git a/2/BruttoNetto.class b/2/BruttoNetto.class new file mode 100644 index 0000000..b31b693 Binary files /dev/null and b/2/BruttoNetto.class differ diff --git a/2/BruttoNetto.java b/2/BruttoNetto.java new file mode 100644 index 0000000..ee26c15 --- /dev/null +++ b/2/BruttoNetto.java @@ -0,0 +1,11 @@ +public class BruttoNetto { + public static void main(String args[]) { + int gehalt = 3000; + double steuer = 19.0; + steuer = steuer * .01; + System.out.println("Steuer: " + steuer + " im Geld: " + ((double)gehalt * steuer )); + System.out.println("Betrag: " + (gehalt - ((double)gehalt * steuer ))); + } + + + } \ No newline at end of file diff --git a/2/BruttoNetto.~ava b/2/BruttoNetto.~ava new file mode 100644 index 0000000..3356045 --- /dev/null +++ b/2/BruttoNetto.~ava @@ -0,0 +1,11 @@ +public class BruttoNetto { + public static void main(String args[]) { + int gehalt = 3000; + double steuer = 19.0; + steuer = steuer * .01; + System.out.println("Steuer: " + steuer + " imGEld: " + ((double)gehalt * steuer )); + System.out.println("Betrag: " + (gehalt - ((double)gehalt * steuer ))); + } + + + } \ No newline at end of file diff --git a/2/Eingabe/BruttoNetto.class b/2/Eingabe/BruttoNetto.class new file mode 100644 index 0000000..92b3c7b Binary files /dev/null and b/2/Eingabe/BruttoNetto.class differ diff --git a/2/Eingabe/BruttoNetto.java b/2/Eingabe/BruttoNetto.java new file mode 100644 index 0000000..6da4b6e --- /dev/null +++ b/2/Eingabe/BruttoNetto.java @@ -0,0 +1,27 @@ +import java.util.Scanner; +public class BruttoNetto { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + + int gehalt = 3000; + double steuer = 19.0; + + System.out.print("Gehalt = "); + if(input.hasNextInt()) { + gehalt = input.nextInt(); + } + System.out.print("Steuer = "); + if(input.hasNextDouble()) { + steuer = input.nextDouble(); + } + steuer = steuer * .01; + steuer = steuer + 1; + System.out.println("End Gehalt: " + (gehalt/steuer)); + System.out.println("Steuer: " + ((double)gehalt * (steuer -1))); + + + + } + + +} \ No newline at end of file diff --git a/2/Eingabe/BruttoNetto.~ava b/2/Eingabe/BruttoNetto.~ava new file mode 100644 index 0000000..5d9f875 --- /dev/null +++ b/2/Eingabe/BruttoNetto.~ava @@ -0,0 +1,28 @@ +import java.util.Scanner; +public class BruttoNetto { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + + int gehalt = 3000; + double steuer = 19.0; + + System.out.print("Gehalt = "); + if(input.hasNextInt()) { + gehalt = input.nextInt(); + } + System.out.print("Steuer = "); + if(input.hasNextDouble()) { + steuer = input.nextDouble(); + } + steuer = steuer * .01; + System.out.println(steuer); + steuer = steuer + 1; + System.out.println("End Gehalt: " + (gehalt/steuer)); + System.out.println("Steuer: " + ((double)gehalt * (steuer -1))); + + + + } + + +} \ No newline at end of file diff --git a/2/Eingabe/Kraftstoffverbrauch.class b/2/Eingabe/Kraftstoffverbrauch.class new file mode 100644 index 0000000..adc98a3 Binary files /dev/null and b/2/Eingabe/Kraftstoffverbrauch.class differ diff --git a/2/Eingabe/Kraftstoffverbrauch.java b/2/Eingabe/Kraftstoffverbrauch.java new file mode 100644 index 0000000..bbde7d0 --- /dev/null +++ b/2/Eingabe/Kraftstoffverbrauch.java @@ -0,0 +1,17 @@ +import java.util.Scanner; +public class Kraftstoffverbrauch { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + double gefahreneKm = 55.0; + double kraftstoffmenge = 5.0; + System.out.print("KM: "); + if(input.hasNextDouble()) { + gefahreneKm = input.nextDouble(); + } + System.out.print("kraftstoffmenge: "); + if(input.hasNextDouble()) { + kraftstoffmenge = input.nextDouble(); + } + System.out.println("Kraftstoffverbrauch: " + ((kraftstoffmenge/gefahreneKm)*100)); + } +} \ No newline at end of file diff --git a/2/Eingabe/Kraftstoffverbrauch.~ava b/2/Eingabe/Kraftstoffverbrauch.~ava new file mode 100644 index 0000000..5aced09 --- /dev/null +++ b/2/Eingabe/Kraftstoffverbrauch.~ava @@ -0,0 +1,16 @@ +import java.util.Scanner; +public class Kraftstoffverbrauch { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + double gefahreneKm = 55.0; + double kraftstoffmenge = 5.0; + System.out.print("KM: "); + if(input.hasNextDouble()) { + gefahreneKm = input.nextDouble(); + } + if(input.hasNextDouble()) { + gefahreneKm = input.nextDouble(); + } + System.out.println("Kraftstoffverbrauch: " + ((kraftstoffmenge/gefahreneKm)*100)); + } +} \ No newline at end of file diff --git a/2/Eingabe/Sparbuch.class b/2/Eingabe/Sparbuch.class new file mode 100644 index 0000000..cf114de Binary files /dev/null and b/2/Eingabe/Sparbuch.class differ diff --git a/2/Eingabe/Sparbuch.java b/2/Eingabe/Sparbuch.java new file mode 100644 index 0000000..80ed97d --- /dev/null +++ b/2/Eingabe/Sparbuch.java @@ -0,0 +1,23 @@ +import java.util.Scanner; +public class Sparbuch { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + int betrag = 1000; + double zinssatz = 1.5; + System.out.print("Betrag: "); + if(input.hasNextInt()) { + + betrag = input.nextInt(); + } + System.out.println(""); + System.out.print("Zinssatz: "); + if (input.hasNextDouble()) { + zinssatz = input.nextDouble(); + } // end of if + System.out.println(zinssatz * .01); + for (int i = 0;i < 26;i++ ) { + betrag += (double)betrag * (zinssatz * .01); + System.out.println("Jahr: " + i + " Betrag: " + betrag); + } + } +} \ No newline at end of file diff --git a/2/Eingabe/Sparbuch.~ava b/2/Eingabe/Sparbuch.~ava new file mode 100644 index 0000000..4f357e6 --- /dev/null +++ b/2/Eingabe/Sparbuch.~ava @@ -0,0 +1,24 @@ +import java.util.Scanner; +public class Sparbuch { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + int betrag = 1000; + double zinssatz = 1.5; + System.out.print("Betrag: "); + if(input.hasNextInt()) { + + betrag = input.nextInt(); + } + System.out.println(""); + System.out.print("Zinssatz: "); + if (input.hasNextDouble()) { + + zinssatz = input.nextDouble(); + } // end of if + System.out.println(zinssatz * .01); + for (int i = 0;i < 26;i++ ) { + betrag += (double)betrag * (zinssatz * .01); + System.out.println("Jahr: " + i + " Betrag: " + betrag); + } + } +} \ No newline at end of file diff --git a/2/Eingabe/Steigung.class b/2/Eingabe/Steigung.class new file mode 100644 index 0000000..b79420c Binary files /dev/null and b/2/Eingabe/Steigung.class differ diff --git a/2/Eingabe/Steigung.java b/2/Eingabe/Steigung.java new file mode 100644 index 0000000..facb7d6 --- /dev/null +++ b/2/Eingabe/Steigung.java @@ -0,0 +1,37 @@ +import java.util.Scanner; +public class Steigung { + public static void main(String args[]) { + double x1 = 4; + double y1 = 2; + + double x2 = 6; + double y2 = 7; + + Scanner input = new Scanner(System.in); + + System.out.print("X1 = "); + if(input.hasNextDouble()) { + x1 = input.nextDouble(); + } + + System.out.print("Y1 = "); + if(input.hasNextDouble()) { + y1 = input.nextDouble(); + } + + System.out.print("X2 = "); + if(input.hasNextDouble()) { + x2 = input.nextDouble(); + } + + System.out.print("Y2 = "); + if(input.hasNextDouble()) { + y2 = input.nextDouble(); + } + + + + System.out.println("Steigung: " + ((y2 - y1)/(x2 - x1))); + + } +} \ No newline at end of file diff --git a/2/Eingabe/Steigung.~ava b/2/Eingabe/Steigung.~ava new file mode 100644 index 0000000..d9adf44 --- /dev/null +++ b/2/Eingabe/Steigung.~ava @@ -0,0 +1,36 @@ +import java.util.Scanner; +public class Steigung { + public static void main(String args[]) { + double x1 = 4; + double y1 = 2; + + double x2 = 6; + double y2 = 7; + + Scanner input = new Scanner(System.in); + System.out.print("X1 = "); + if(input.hasNextDouble()) { + x1 = input.nextDouble(); + } + + System.out.print("Y1 = "); + if(input.hasNextDouble()) { + y1 = input.nextDouble(); + } + + System.out.print("X2 = "); + if(input.hasNextDouble()) { + x2 = input.nextDouble(); + } + + System.out.print("Y2 = "); + if(input.hasNextDouble()) { + y2 = input.nextDouble(); + } + + + + System.out.println("Steigung: " + ((y2 - y1)/(x2 - x1))); + + } +} \ No newline at end of file diff --git a/2/Eingabe/error.txt b/2/Eingabe/error.txt new file mode 100644 index 0000000..e69de29 diff --git a/2/Kraftstoffverbrauch.class b/2/Kraftstoffverbrauch.class new file mode 100644 index 0000000..9a9d2c5 Binary files /dev/null and b/2/Kraftstoffverbrauch.class differ diff --git a/2/Kraftstoffverbrauch.java b/2/Kraftstoffverbrauch.java new file mode 100644 index 0000000..db4e78e --- /dev/null +++ b/2/Kraftstoffverbrauch.java @@ -0,0 +1,15 @@ +public class Kraftstoffverbrauch { + public static void main(String args[]) { + double gefahreneKm = 55.0; + double kraftstoffmenge = 5.0; + + System.out.println("Kraftstoffverbrauch: " + ((kraftstoffmenge/gefahreneKm)*100)); + } +}public class Kraftstoffverbrauch { + public static void main(String args[]) { + double gefahreneKm = 55.0; + double kraftstoffmenge = 5.0; + + System.out.println("Kraftstoffverbrauch: " + ((kraftstoffmenge/gefahreneKm)*100)); + } +} \ No newline at end of file diff --git a/2/Kraftstoffverbrauch.~ava b/2/Kraftstoffverbrauch.~ava new file mode 100644 index 0000000..10b3977 --- /dev/null +++ b/2/Kraftstoffverbrauch.~ava @@ -0,0 +1,8 @@ +public class Kraftstoffverbrauch { + public void main(String args[]) { + double gefahreneKm = 55.0; + double kraftstoffmenge = 5.0; + + System.out.println("Kraftstoffverbrauch: " + ((kraftstoffmenge/gefahreneKm)*100)); + } +} \ No newline at end of file diff --git a/2/Lenj/BruttoNetto.class b/2/Lenj/BruttoNetto.class new file mode 100644 index 0000000..e7e7e31 Binary files /dev/null and b/2/Lenj/BruttoNetto.class differ diff --git a/2/Lenj/BruttoNetto.java b/2/Lenj/BruttoNetto.java new file mode 100644 index 0000000..db93bad --- /dev/null +++ b/2/Lenj/BruttoNetto.java @@ -0,0 +1,96 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.control.*; +import je.NumberField; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.event.*; + +/** + * + * Beschreibung + * + * @version 1.0 vom 06.11.2024 + * @author + */ + +public class BruttoNetto extends Application { + // Anfang Attribute + private NumberField gehaltField = new NumberField(); + private NumberField steuerField = new NumberField(); + private Label lEndGehalt = new Label(); + private Label lSteuer = new Label(); + private Button bRechnen = new Button(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 268, 224); + // Anfang Komponenten + + gehaltField.setLayoutX(8); + gehaltField.setLayoutY(16); + gehaltField.setPrefHeight(24); + gehaltField.setPrefWidth(80); + gehaltField.setFont(Font.font("Dialog", 11)); + gehaltField.setPromptText("Gehalt"); + gehaltField.setText("3000"); + root.getChildren().add(gehaltField); + steuerField.setLayoutX(8); + steuerField.setLayoutY(48); + steuerField.setPrefHeight(24); + steuerField.setPrefWidth(80); + steuerField.setFont(Font.font("Dialog", 11)); + steuerField.setText("19.0"); + root.getChildren().add(steuerField); + lEndGehalt.setLayoutX(120); + lEndGehalt.setLayoutY(16); + lEndGehalt.setPrefHeight(24); + lEndGehalt.setPrefWidth(112); + lEndGehalt.setText("End Gehalt: 0"); + lEndGehalt.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lEndGehalt); + lSteuer.setLayoutX(120); + lSteuer.setLayoutY(48); + lSteuer.setPrefHeight(24); + lSteuer.setPrefWidth(112); + lSteuer.setText("Steuer"); + lSteuer.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lSteuer); + bRechnen.setLayoutX(72); + bRechnen.setLayoutY(96); + bRechnen.setPrefHeight(24); + bRechnen.setPrefWidth(80); + bRechnen.setText("Rechnen"); + bRechnen.setOnAction( + (event) -> {bRechnen_Action(event);} + ); + bRechnen.setFont(Font.font("Dialog", 11)); + root.getChildren().add(bRechnen); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("BruttoNetto"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public BruttoNetto + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void bRechnen_Action(Event evt) { + int gehalt = gehaltField.getInt(); + double steuer = steuerField.getDouble(); + steuer = steuer + 1; + lEndGehalt.setText("End Gehalt: " + (gehalt/steuer))); + lSteuer.setText("Steuer: " + ((double)gehalt * steuer )); + + } // end of bRechnen_Action + + // Ende Methoden +} // end of class BruttoNetto diff --git a/2/Lenj/BruttoNetto.jfm b/2/Lenj/BruttoNetto.jfm new file mode 100644 index 0000000..1a4105b --- /dev/null +++ b/2/Lenj/BruttoNetto.jfm @@ -0,0 +1,210 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 915 + Top = 458 + BorderIcons = [biSystemMenu] + Caption = 'BruttoNetto' + ClientHeight = 223 + ClientWidth = 268 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'BruttoNetto' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object gehaltField: TFXNumberField + Tag = 103 + Left = 8 + Top = 16 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 16 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '3000' + Editable = True + PromptText = 'Gehalt' + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object steuerField: TFXNumberField + Tag = 103 + Left = 8 + Top = 48 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField2' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 48 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '19.0' + Editable = True + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object lEndGehalt: TFXLabel + Tag = 101 + Left = 120 + Top = 16 + Width = 112 + Height = 24 + Hint = 'label1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 120 + LayoutY = 16 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 112 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'End Gehalt: 0' + TextAlignment = _TA_LEFT + WrapText = False + end + object lSteuer: TFXLabel + Tag = 101 + Left = 120 + Top = 48 + Width = 112 + Height = 24 + Hint = 'label2' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 120 + LayoutY = 48 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 112 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Steuer' + TextAlignment = _TA_LEFT + WrapText = False + end + object bRechnen: TFXButton + Tag = 105 + Left = 72 + Top = 96 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 72 + LayoutY = 96 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Rechnen' + TextAlignment = _TA_LEFT + WrapText = False + action = 'bRechnen_Action' + CancelButton = False + DefaultButton = False + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/2/Lenj/BruttoNetto.~ava b/2/Lenj/BruttoNetto.~ava new file mode 100644 index 0000000..390225f --- /dev/null +++ b/2/Lenj/BruttoNetto.~ava @@ -0,0 +1,96 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.control.*; +import je.NumberField; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.event.*; + +/** + * + * Beschreibung + * + * @version 1.0 vom 06.11.2024 + * @author + */ + +public class BruttoNetto extends Application { + // Anfang Attribute + private NumberField gehaltField = new NumberField(); + private NumberField steuerField = new NumberField(); + private Label lEndGehalt = new Label(); + private Label lSteuer = new Label(); + private Button bRechnen = new Button(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 268, 224); + // Anfang Komponenten + + gehaltField.setLayoutX(8); + gehaltField.setLayoutY(16); + gehaltField.setPrefHeight(24); + gehaltField.setPrefWidth(80); + gehaltField.setFont(Font.font("Dialog", 11)); + gehaltField.setPromptText("Gehalt"); + gehaltField.setText("3000"); + root.getChildren().add(gehaltField); + steuerField.setLayoutX(8); + steuerField.setLayoutY(48); + steuerField.setPrefHeight(24); + steuerField.setPrefWidth(80); + steuerField.setFont(Font.font("Dialog", 11)); + steuerField.setText("19.0"); + root.getChildren().add(steuerField); + lEndGehalt.setLayoutX(120); + lEndGehalt.setLayoutY(16); + lEndGehalt.setPrefHeight(24); + lEndGehalt.setPrefWidth(112); + lEndGehalt.setText("End Gehalt: 0"); + lEndGehalt.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lEndGehalt); + lSteuer.setLayoutX(120); + lSteuer.setLayoutY(48); + lSteuer.setPrefHeight(24); + lSteuer.setPrefWidth(112); + lSteuer.setText("Steuer"); + lSteuer.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lSteuer); + bRechnen.setLayoutX(72); + bRechnen.setLayoutY(96); + bRechnen.setPrefHeight(24); + bRechnen.setPrefWidth(80); + bRechnen.setText("Rechnen"); + bRechnen.setOnAction( + (event) -> {bRechnen_Action(event);} + ); + bRechnen.setFont(Font.font("Dialog", 11)); + root.getChildren().add(bRechnen); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("BruttoNetto"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public BruttoNetto + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void bRechnen_Action(Event evt) { + int gehalt = gehaltField.getInt(); + double steuer = steuerField.getDouble(); + steuer = steuer * .01; + lEndGehalt.setText("End Gehalt: " + (gehalt - ((double)gehalt * steuer ))); + lSteuer.setText("Steuer: " + ((double)gehalt * steuer )); + + } // end of bRechnen_Action + + // Ende Methoden +} // end of class BruttoNetto diff --git a/2/Lenj/BruttoNetto.~fm b/2/Lenj/BruttoNetto.~fm new file mode 100644 index 0000000..1a4105b --- /dev/null +++ b/2/Lenj/BruttoNetto.~fm @@ -0,0 +1,210 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 915 + Top = 458 + BorderIcons = [biSystemMenu] + Caption = 'BruttoNetto' + ClientHeight = 223 + ClientWidth = 268 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'BruttoNetto' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object gehaltField: TFXNumberField + Tag = 103 + Left = 8 + Top = 16 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 16 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '3000' + Editable = True + PromptText = 'Gehalt' + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object steuerField: TFXNumberField + Tag = 103 + Left = 8 + Top = 48 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField2' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 48 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '19.0' + Editable = True + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object lEndGehalt: TFXLabel + Tag = 101 + Left = 120 + Top = 16 + Width = 112 + Height = 24 + Hint = 'label1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 120 + LayoutY = 16 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 112 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'End Gehalt: 0' + TextAlignment = _TA_LEFT + WrapText = False + end + object lSteuer: TFXLabel + Tag = 101 + Left = 120 + Top = 48 + Width = 112 + Height = 24 + Hint = 'label2' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 120 + LayoutY = 48 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 112 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Steuer' + TextAlignment = _TA_LEFT + WrapText = False + end + object bRechnen: TFXButton + Tag = 105 + Left = 72 + Top = 96 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 72 + LayoutY = 96 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Rechnen' + TextAlignment = _TA_LEFT + WrapText = False + action = 'bRechnen_Action' + CancelButton = False + DefaultButton = False + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/2/Lenj/Kraftstoffverbrauch.class b/2/Lenj/Kraftstoffverbrauch.class new file mode 100644 index 0000000..5dd09e3 Binary files /dev/null and b/2/Lenj/Kraftstoffverbrauch.class differ diff --git a/2/Lenj/Kraftstoffverbrauch.java b/2/Lenj/Kraftstoffverbrauch.java new file mode 100644 index 0000000..5945ec6 --- /dev/null +++ b/2/Lenj/Kraftstoffverbrauch.java @@ -0,0 +1,88 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.control.*; +import je.NumberField; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.event.*; + +/** + * + * Beschreibung + * + * @version 1.0 vom 06.11.2024 + * @author + */ + +public class Kraftstoffverbrauch extends Application { + // Anfang Attribute + private NumberField kmField = new NumberField(); + private NumberField kraftstoffField = new NumberField(); + private Button bRechnen = new Button(); + private Label lErgebnis = new Label(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 268, 224); + // Anfang Komponenten + + kmField.setLayoutX(8); + kmField.setLayoutY(24); + kmField.setPrefHeight(24); + kmField.setPrefWidth(80); + kmField.setFont(Font.font("Dialog", 11)); + kmField.setPromptText("Km"); + kmField.setText("56"); + root.getChildren().add(kmField); + kraftstoffField.setLayoutX(128); + kraftstoffField.setLayoutY(24); + kraftstoffField.setPrefHeight(24); + kraftstoffField.setPrefWidth(80); + kraftstoffField.setFont(Font.font("Dialog", 11)); + kraftstoffField.setPromptText("l"); + kraftstoffField.setText("10"); + root.getChildren().add(kraftstoffField); + bRechnen.setLayoutX(72); + bRechnen.setLayoutY(64); + bRechnen.setPrefHeight(24); + bRechnen.setPrefWidth(80); + bRechnen.setText("Rechnen"); + bRechnen.setOnAction( + (event) -> {bRechnen_Action(event);} + ); + bRechnen.setFont(Font.font("Dialog", 11)); + root.getChildren().add(bRechnen); + lErgebnis.setLayoutX(16); + lErgebnis.setLayoutY(112); + lErgebnis.setPrefHeight(24); + lErgebnis.setPrefWidth(248); + lErgebnis.setText(""); + lErgebnis.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lErgebnis); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("Kraftstoffverbrauch"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public Kraftstoffverbrauch + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void bRechnen_Action(Event evt) { + double gefahreneKm = kmField.getDouble(); + double kraftstoffmenge = kraftstoffField.getDouble(); + + lErgebnis.setText("Ergebniss: " + ((kraftstoffmenge/gefahreneKm)*100)); + + } // end of bRechnen_Action + + // Ende Methoden +} // end of class Kraftstoffverbrauch diff --git a/2/Lenj/Kraftstoffverbrauch.jfm b/2/Lenj/Kraftstoffverbrauch.jfm new file mode 100644 index 0000000..a5bda91 --- /dev/null +++ b/2/Lenj/Kraftstoffverbrauch.jfm @@ -0,0 +1,177 @@ +object FGUIForm_1: TFXGuiForm + Tag = 180 + Left = 1077 + Top = 425 + BorderIcons = [biSystemMenu] + Caption = 'Kraftstoffverbrauch' + ClientHeight = 223 + ClientWidth = 268 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'Kraftstoffverbrauch' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object kmField: TFXNumberField + Tag = 103 + Left = 8 + Top = 24 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 24 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '56' + Editable = True + PromptText = 'Km' + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object kraftstoffField: TFXNumberField + Tag = 103 + Left = 128 + Top = 24 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField2' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 128 + LayoutY = 24 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '10' + Editable = True + PromptText = 'l' + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object bRechnen: TFXButton + Tag = 105 + Left = 72 + Top = 64 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 72 + LayoutY = 64 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Rechnen' + TextAlignment = _TA_LEFT + WrapText = False + action = 'bRechnen_Action' + CancelButton = False + DefaultButton = False + end + object lErgebnis: TFXLabel + Tag = 101 + Left = 16 + Top = 112 + Width = 248 + Height = 24 + Hint = 'label1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 16 + LayoutY = 112 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 248 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = '' + TextAlignment = _TA_LEFT + WrapText = False + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/2/Lenj/Kraftstoffverbrauch.~ava b/2/Lenj/Kraftstoffverbrauch.~ava new file mode 100644 index 0000000..33cc2fd --- /dev/null +++ b/2/Lenj/Kraftstoffverbrauch.~ava @@ -0,0 +1,88 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.control.*; +import je.NumberField; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.event.*; + +/** + * + * Beschreibung + * + * @version 1.0 vom 06.11.2024 + * @author + */ + +public class Kraftstoffverbrauch extends Application { + // Anfang Attribute + private NumberField kmField = new NumberField(); + private NumberField kraftstoffField = new NumberField(); + private Button bRechnen = new Button(); + private Label lErgebnis = new Label(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 268, 224); + // Anfang Komponenten + + kmField.setLayoutX(8); + kmField.setLayoutY(24); + kmField.setPrefHeight(24); + kmField.setPrefWidth(80); + kmField.setFont(Font.font("Dialog", 11)); + kmField.setPromptText("Km"); + kmField.setText("56"); + root.getChildren().add(kmField); + kraftstoffField.setLayoutX(128); + kraftstoffField.setLayoutY(24); + kraftstoffField.setPrefHeight(24); + kraftstoffField.setPrefWidth(80); + kraftstoffField.setFont(Font.font("Dialog", 11)); + kraftstoffField.setPromptText("l"); + kraftstoffField.setText("10"); + root.getChildren().add(kraftstoffField); + bRechnen.setLayoutX(72); + bRechnen.setLayoutY(64); + bRechnen.setPrefHeight(24); + bRechnen.setPrefWidth(80); + bRechnen.setText("Rechnen"); + bRechnen.setOnAction( + (event) -> {bRechnen_Action(event);} + ); + bRechnen.setFont(Font.font("Dialog", 11)); + root.getChildren().add(bRechnen); + lErgebnis.setLayoutX(16); + lErgebnis.setLayoutY(112); + lErgebnis.setPrefHeight(24); + lErgebnis.setPrefWidth(248); + lErgebnis.setText(""); + lErgebnis.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lErgebnis); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("Kraftstoffverbrauch"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public Kraftstoffverbrauch + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void bRechnen_Action(Event evt) { + double gefahreneKm = kmField.getDouble(); + double kraftstoffmenge = kraftstoffField.getDouble(); + + lErgebnis.setText("Kraftstoffverbrauch: " + ((kraftstoffmenge/gefahreneKm)*100)); + + } // end of bRechnen_Action + + // Ende Methoden +} // end of class Kraftstoffverbrauch diff --git a/2/Lenj/Kraftstoffverbrauch.~fm b/2/Lenj/Kraftstoffverbrauch.~fm new file mode 100644 index 0000000..c39bc03 --- /dev/null +++ b/2/Lenj/Kraftstoffverbrauch.~fm @@ -0,0 +1,174 @@ +object FGUIForm_1: TFXGuiForm + Tag = 180 + Left = 1077 + Top = 425 + BorderIcons = [biSystemMenu] + Caption = 'Kraftstoffverbrauch' + ClientHeight = 223 + ClientWidth = 268 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'Kraftstoffverbrauch' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object kmField: TFXNumberField + Tag = 103 + Left = 8 + Top = 24 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 24 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '56' + Editable = True + PromptText = 'Km' + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object kraftstoffField: TFXNumberField + Tag = 103 + Left = 128 + Top = 24 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField2' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 128 + LayoutY = 24 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '10' + Editable = True + PromptText = 'l' + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object bRechnen: TFXButton + Tag = 105 + Left = 72 + Top = 64 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 72 + LayoutY = 64 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Rechnen' + TextAlignment = _TA_LEFT + WrapText = False + action = 'bRechnen_Action' + CancelButton = False + DefaultButton = False + end + object lErgebnis: TFXLabel + Tag = 101 + Left = 16 + Top = 112 + Width = 248 + Height = 24 + Hint = 'label1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 16 + LayoutY = 112 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 248 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = '' + TextAlignment = _TA_LEFT + WrapText = False + end +end diff --git a/2/Lenj/Quadratzahlen.class b/2/Lenj/Quadratzahlen.class new file mode 100644 index 0000000..0379d4c Binary files /dev/null and b/2/Lenj/Quadratzahlen.class differ diff --git a/2/Lenj/Quadratzahlen.java b/2/Lenj/Quadratzahlen.java new file mode 100644 index 0000000..7f921db --- /dev/null +++ b/2/Lenj/Quadratzahlen.java @@ -0,0 +1,72 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.control.*; +import javafx.event.*; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.collections.*; + +/** + * + * Beschreibung + * + * @version 1.0 vom 19.11.2024 + * @author + */ + +public class Quadratzahlen extends Application { + // Anfang Attribute + private Button bStart = new Button(); + private ListView listView1 = new ListView<>(); + private ObservableList listView1ObservableList = + FXCollections.observableArrayList(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 198, 448); + // Anfang Komponenten + + bStart.setLayoutX(32); + bStart.setLayoutY(32); + bStart.setPrefHeight(24); + bStart.setPrefWidth(80); + bStart.setText("Start"); + bStart.setOnAction( + (event) -> {bStart_Action(event);} + ); + bStart.setFont(Font.font("Dialog", 11)); + root.getChildren().add(bStart); + listView1.setLayoutX(16); + listView1.setLayoutY(80); + listView1.setPrefHeight(360); + listView1.setPrefWidth(128); + listView1.setItems(listView1ObservableList); + + root.getChildren().add(listView1); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("Quadratzahlen"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public Quadratzahlen + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void bStart_Action(Event evt) { + listView1ObservableList.removeAll(); + for (int i = 1; i < 21; i++) { + listView1ObservableList.add(i+". " + i*i); + } + + } // end of bStart_Action + + // Ende Methoden +} // end of class Quadratzahlen diff --git a/2/Lenj/Quadratzahlen.jfm b/2/Lenj/Quadratzahlen.jfm new file mode 100644 index 0000000..32c0081 --- /dev/null +++ b/2/Lenj/Quadratzahlen.jfm @@ -0,0 +1,113 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 852 + Top = 239 + BorderIcons = [biSystemMenu] + Caption = 'Quadratzahlen' + ClientHeight = 447 + ClientWidth = 198 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'Quadratzahlen' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object bStart: TFXButton + Tag = 105 + Left = 32 + Top = 32 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 32 + LayoutY = 32 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Start' + TextAlignment = _TA_LEFT + WrapText = False + action = 'bStart_Action' + CancelButton = False + DefaultButton = False + end + object listView1: TFXListView + Tag = 109 + Left = 16 + Top = 80 + Width = 128 + Height = 360 + Hint = 'listView1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = 13158600 + JavaType = 'ListView' + LayoutX = 16 + LayoutY = 80 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 360 + PrefWidth = 128 + SnapToPixel = False + Editable = False + FixedCellSize = -1 + Items.Strings = ( + 'Amerika' + 'Europa' + 'Asien') + Orientation = VERTICAL + SelectionMode = SINGLE + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/2/Lenj/Quadratzahlen.~ava b/2/Lenj/Quadratzahlen.~ava new file mode 100644 index 0000000..66406d7 --- /dev/null +++ b/2/Lenj/Quadratzahlen.~ava @@ -0,0 +1,72 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.control.*; +import javafx.event.*; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.collections.*; + +/** + * + * Beschreibung + * + * @version 1.0 vom 19.11.2024 + * @author + */ + +public class Quadratzahlen extends Application { + // Anfang Attribute + private Button bStart = new Button(); + private ListView listView1 = new ListView<>(); + private ObservableList listView1ObservableList = + FXCollections.observableArrayList(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 198, 448); + // Anfang Komponenten + + bStart.setLayoutX(32); + bStart.setLayoutY(32); + bStart.setPrefHeight(24); + bStart.setPrefWidth(80); + bStart.setText("Start"); + bStart.setOnAction( + (event) -> {bStart_Action(event);} + ); + bStart.setFont(Font.font("Dialog", 11)); + root.getChildren().add(bStart); + listView1.setLayoutX(16); + listView1.setLayoutY(80); + listView1.setPrefHeight(360); + listView1.setPrefWidth(128); + listView1.setItems(listView1ObservableList); + + root.getChildren().add(listView1); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("Quadratzahlen"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public Quadratzahlen + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void bStart_Action(Event evt) { + listView1ObservableList.remove(0,20); + for (int i = 1; i < 21; i++) { + listView1ObservableList.add(i+". " + i*i); + } + + } // end of bStart_Action + + // Ende Methoden +} // end of class Quadratzahlen diff --git a/2/Lenj/Quadratzahlen.~fm b/2/Lenj/Quadratzahlen.~fm new file mode 100644 index 0000000..32c0081 --- /dev/null +++ b/2/Lenj/Quadratzahlen.~fm @@ -0,0 +1,113 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 852 + Top = 239 + BorderIcons = [biSystemMenu] + Caption = 'Quadratzahlen' + ClientHeight = 447 + ClientWidth = 198 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'Quadratzahlen' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object bStart: TFXButton + Tag = 105 + Left = 32 + Top = 32 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 32 + LayoutY = 32 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Start' + TextAlignment = _TA_LEFT + WrapText = False + action = 'bStart_Action' + CancelButton = False + DefaultButton = False + end + object listView1: TFXListView + Tag = 109 + Left = 16 + Top = 80 + Width = 128 + Height = 360 + Hint = 'listView1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = 13158600 + JavaType = 'ListView' + LayoutX = 16 + LayoutY = 80 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 360 + PrefWidth = 128 + SnapToPixel = False + Editable = False + FixedCellSize = -1 + Items.Strings = ( + 'Amerika' + 'Europa' + 'Asien') + Orientation = VERTICAL + SelectionMode = SINGLE + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/2/Lenj/Steigung.java b/2/Lenj/Steigung.java new file mode 100644 index 0000000..fc0a37f --- /dev/null +++ b/2/Lenj/Steigung.java @@ -0,0 +1,133 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.control.*; +import je.NumberField; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.event.*; + +/** + * + * Beschreibung + * + * @version 1.0 vom 06.11.2024 + * @author + */ + +public class Steigung extends Application { + // Anfang Attribute + private NumberField numberField1 = new NumberField(); + private NumberField numberField2 = new NumberField(); + private NumberField numberField3 = new NumberField(); + private NumberField numberField4 = new NumberField(); + private Button bRechnen = new Button(); + private Label lergebnis = new Label(); + private Label lX = new Label(); + private Label lY = new Label(); + private Label lX21 = new Label(); + private Label lY21 = new Label(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 313, 242); + // Anfang Komponenten + + numberField1.setLayoutX(8); + numberField1.setLayoutY(40); + numberField1.setPrefHeight(24); + numberField1.setPrefWidth(80); + numberField1.setFont(Font.font("Dialog", 11)); + root.getChildren().add(numberField1); + numberField2.setLayoutX(8); + numberField2.setLayoutY(88); + numberField2.setPrefHeight(24); + numberField2.setPrefWidth(80); + numberField2.setFont(Font.font("Dialog", 11)); + root.getChildren().add(numberField2); + numberField3.setLayoutX(184); + numberField3.setLayoutY(40); + numberField3.setPrefHeight(24); + numberField3.setPrefWidth(80); + numberField3.setFont(Font.font("Dialog", 11)); + root.getChildren().add(numberField3); + numberField4.setLayoutX(184); + numberField4.setLayoutY(88); + numberField4.setPrefHeight(24); + numberField4.setPrefWidth(80); + numberField4.setFont(Font.font("Dialog", 11)); + root.getChildren().add(numberField4); + bRechnen.setLayoutX(104); + bRechnen.setLayoutY(136); + bRechnen.setPrefHeight(24); + bRechnen.setPrefWidth(80); + bRechnen.setText("Rechnen"); + bRechnen.setOnAction( + (event) -> {bRechnen_Action(event);} + ); + bRechnen.setFont(Font.font("Dialog", 11)); + root.getChildren().add(bRechnen); + lergebnis.setLayoutX(16); + lergebnis.setLayoutY(184); + lergebnis.setPrefHeight(24); + lergebnis.setPrefWidth(168); + lergebnis.setText("ergebnis"); + lergebnis.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lergebnis); + lX.setLayoutX(8); + lX.setLayoutY(16); + lX.setPrefHeight(24); + lX.setPrefWidth(80); + lX.setText("X1"); + lX.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lX); + lY.setLayoutX(8); + lY.setLayoutY(64); + lY.setPrefHeight(24); + lY.setPrefWidth(80); + lY.setText("Y2"); + lY.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lY); + lX21.setLayoutX(184); + lX21.setLayoutY(16); + lX21.setPrefHeight(24); + lX21.setPrefWidth(80); + lX21.setText("X2"); + lX21.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lX21); + lY21.setLayoutX(184); + lY21.setLayoutY(64); + lY21.setPrefHeight(24); + lY21.setPrefWidth(80); + lY21.setText("Y2"); + lY21.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lY21); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("Steigung"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public Steigung + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void bRechnen_Action(Event evt) { + double x1 = 4; + double y1 = 2; + + double x2 = 6; + double y2 = 7; + + System.out.println("Steigung: " + ((y2 - y1)/(x2 - x1))); + + } // end of bRechnen_Action + + // Ende Methoden +} // end of class Steigung diff --git a/2/Lenj/Steigung.jfm b/2/Lenj/Steigung.jfm new file mode 100644 index 0000000..b64aa31 --- /dev/null +++ b/2/Lenj/Steigung.jfm @@ -0,0 +1,371 @@ +object FGUIForm_2: TFXGuiForm + Tag = 180 + Left = 664 + Top = 372 + BorderIcons = [biSystemMenu] + Caption = 'Steigung' + ClientHeight = 241 + ClientWidth = 313 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'Steigung' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object numberField1: TFXNumberField + Tag = 103 + Left = 8 + Top = 40 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 40 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '' + Editable = True + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object numberField2: TFXNumberField + Tag = 103 + Left = 8 + Top = 88 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField2' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 88 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '' + Editable = True + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object numberField3: TFXNumberField + Tag = 103 + Left = 184 + Top = 40 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField3' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 184 + LayoutY = 40 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '' + Editable = True + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object numberField4: TFXNumberField + Tag = 103 + Left = 184 + Top = 88 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField4' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 184 + LayoutY = 88 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '' + Editable = True + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object bRechnen: TFXButton + Tag = 105 + Left = 104 + Top = 136 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 104 + LayoutY = 136 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Rechnen' + TextAlignment = _TA_LEFT + WrapText = False + action = 'bRechnen_Action' + CancelButton = False + DefaultButton = False + end + object lergebnis: TFXLabel + Tag = 101 + Left = 16 + Top = 184 + Width = 168 + Height = 24 + Hint = 'label1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 16 + LayoutY = 184 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 168 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'ergebnis' + TextAlignment = _TA_LEFT + WrapText = False + end + object lX: TFXLabel + Tag = 101 + Left = 8 + Top = 16 + Width = 80 + Height = 24 + Hint = 'label2' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 8 + LayoutY = 16 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'X1' + TextAlignment = _TA_LEFT + WrapText = False + end + object lY: TFXLabel + Tag = 101 + Left = 8 + Top = 64 + Width = 80 + Height = 24 + Hint = 'label3' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 8 + LayoutY = 64 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Y2' + TextAlignment = _TA_LEFT + WrapText = False + end + object lX21: TFXLabel + Tag = 101 + Left = 184 + Top = 16 + Width = 80 + Height = 24 + Hint = 'label4' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 184 + LayoutY = 16 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'X2' + TextAlignment = _TA_LEFT + WrapText = False + end + object lY21: TFXLabel + Tag = 101 + Left = 184 + Top = 64 + Width = 80 + Height = 24 + Hint = 'label5' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 184 + LayoutY = 64 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Y2' + TextAlignment = _TA_LEFT + WrapText = False + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/2/Lenj/Steigung.~ava b/2/Lenj/Steigung.~ava new file mode 100644 index 0000000..1dd79c7 --- /dev/null +++ b/2/Lenj/Steigung.~ava @@ -0,0 +1,133 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.control.*; +import je.NumberField; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.event.*; + +/** + * + * Beschreibung + * + * @version 1.0 vom 06.11.2024 + * @author + */ + +public class Steigung extends Application { + // Anfang Attribute + private NumberField numberField1 = new NumberField(); + private NumberField numberField2 = new NumberField(); + private NumberField numberField3 = new NumberField(); + private NumberField numberField4 = new NumberField(); + private Button bRechnen = new Button(); + private Label lergebnis = new Label(); + private Label lX = new Label(); + private Label lY = new Label(); + private Label lX21 = new Label(); + private Label lY21 = new Label(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 313, 242); + // Anfang Komponenten + + numberField1.setLayoutX(8); + numberField1.setLayoutY(40); + numberField1.setPrefHeight(24); + numberField1.setPrefWidth(80); + numberField1.setFont(Font.font("Dialog", 11)); + root.getChildren().add(numberField1); + numberField2.setLayoutX(8); + numberField2.setLayoutY(88); + numberField2.setPrefHeight(24); + numberField2.setPrefWidth(80); + numberField2.setFont(Font.font("Dialog", 11)); + root.getChildren().add(numberField2); + numberField3.setLayoutX(184); + numberField3.setLayoutY(40); + numberField3.setPrefHeight(24); + numberField3.setPrefWidth(80); + numberField3.setFont(Font.font("Dialog", 11)); + root.getChildren().add(numberField3); + numberField4.setLayoutX(184); + numberField4.setLayoutY(88); + numberField4.setPrefHeight(24); + numberField4.setPrefWidth(80); + numberField4.setFont(Font.font("Dialog", 11)); + root.getChildren().add(numberField4); + bRechnen.setLayoutX(104); + bRechnen.setLayoutY(136); + bRechnen.setPrefHeight(24); + bRechnen.setPrefWidth(80); + bRechnen.setText("Rechnen"); + bRechnen.setOnAction( + (event) -> {bRechnen_Action(event);} + ); + bRechnen.setFont(Font.font("Dialog", 11)); + root.getChildren().add(bRechnen); + lergebnis.setLayoutX(16); + lergebnis.setLayoutY(184); + lergebnis.setPrefHeight(24); + lergebnis.setPrefWidth(168); + lergebnis.setText("ergebnis"); + lergebnis.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lergebnis); + lX.setLayoutX(8); + lX.setLayoutY(16); + lX.setPrefHeight(24); + lX.setPrefWidth(80); + lX.setText("X1"); + lX.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lX); + lY.setLayoutX(8); + lY.setLayoutY(64); + lY.setPrefHeight(24); + lY.setPrefWidth(80); + lY.setText("Y2"); + lY.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lY); + lX21.setLayoutX(184); + lX21.setLayoutY(16); + lX21.setPrefHeight(24); + lX21.setPrefWidth(80); + lX21.setText("X2"); + lX21.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lX21); + lY21.setLayoutX(184); + lY21.setLayoutY(64); + lY21.setPrefHeight(24); + lY21.setPrefWidth(80); + lY21.setText("Y2"); + lY21.setFont(Font.font("Dialog", 11)); + root.getChildren().add(lY21); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("Steigung"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public Steigung + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void bRechnen_Action(Event evt) { + double x1 = ; + double y1 = 2; + + double x2 = 6; + double y2 = 7; + + System.out.println("Steigung: " + ((y2 - y1)/(x2 - x1))); + + } // end of bRechnen_Action + + // Ende Methoden +} // end of class Steigung diff --git a/2/Lenj/Steigung.~fm b/2/Lenj/Steigung.~fm new file mode 100644 index 0000000..f3c9ed4 --- /dev/null +++ b/2/Lenj/Steigung.~fm @@ -0,0 +1,368 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 664 + Top = 372 + BorderIcons = [biSystemMenu] + Caption = 'Steigung' + ClientHeight = 241 + ClientWidth = 313 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'Steigung' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object numberField1: TFXNumberField + Tag = 103 + Left = 8 + Top = 40 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 40 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '' + Editable = True + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object numberField2: TFXNumberField + Tag = 103 + Left = 8 + Top = 88 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField2' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 88 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '' + Editable = True + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object numberField3: TFXNumberField + Tag = 103 + Left = 184 + Top = 40 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField3' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 184 + LayoutY = 40 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '' + Editable = True + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object numberField4: TFXNumberField + Tag = 103 + Left = 184 + Top = 88 + Width = 80 + Height = 24 + Cursor = crIBeam + Hint = 'numberField4' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 184 + LayoutY = 88 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Text = '' + Editable = True + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object bRechnen: TFXButton + Tag = 105 + Left = 104 + Top = 136 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 104 + LayoutY = 136 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Rechnen' + TextAlignment = _TA_LEFT + WrapText = False + action = 'bRechnen_Action' + CancelButton = False + DefaultButton = False + end + object lergebnis: TFXLabel + Tag = 101 + Left = 16 + Top = 184 + Width = 168 + Height = 24 + Hint = 'label1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 16 + LayoutY = 184 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 168 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'ergebnis' + TextAlignment = _TA_LEFT + WrapText = False + end + object lX: TFXLabel + Tag = 101 + Left = 8 + Top = 16 + Width = 80 + Height = 24 + Hint = 'label2' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 8 + LayoutY = 16 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'X1' + TextAlignment = _TA_LEFT + WrapText = False + end + object lY: TFXLabel + Tag = 101 + Left = 8 + Top = 64 + Width = 80 + Height = 24 + Hint = 'label3' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 8 + LayoutY = 64 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Y2' + TextAlignment = _TA_LEFT + WrapText = False + end + object lX21: TFXLabel + Tag = 101 + Left = 184 + Top = 16 + Width = 80 + Height = 24 + Hint = 'label4' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 184 + LayoutY = 16 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'X2' + TextAlignment = _TA_LEFT + WrapText = False + end + object lY21: TFXLabel + Tag = 101 + Left = 184 + Top = 64 + Width = 80 + Height = 24 + Hint = 'label5' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 184 + LayoutY = 64 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Y2' + TextAlignment = _TA_LEFT + WrapText = False + end +end diff --git a/2/Lenj/error.txt b/2/Lenj/error.txt new file mode 100644 index 0000000..e69de29 diff --git a/2/Lenj/game$TimerMethod.class b/2/Lenj/game$TimerMethod.class new file mode 100644 index 0000000..5c51a59 Binary files /dev/null and b/2/Lenj/game$TimerMethod.class differ diff --git a/2/Lenj/game.class b/2/Lenj/game.class new file mode 100644 index 0000000..b37b78e Binary files /dev/null and b/2/Lenj/game.class differ diff --git a/2/Lenj/game.java b/2/Lenj/game.java new file mode 100644 index 0000000..f0eb7ce --- /dev/null +++ b/2/Lenj/game.java @@ -0,0 +1,96 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.canvas.*; +import javafx.scene.control.*; +import javafx.scene.canvas.GraphicsContext; +import javafx.scene.paint.Color; +import java.lang.Thread; +import javafx.animation.AnimationTimer; +import javafx.scene.input.*; +import javafx.event.*; +import javafx.scene.input.KeyCodeCombination; +/** + * + * Beschreibung + * + * @version 1.0 vom 19.11.2024 + * @author + */ + +public class game extends Application { + // Anfang Attribute + public int gameWidth = 1000; + public int gameHeight = 720; + private AnimationTimer timer; + private int X = 0; + private Canvas main = new Canvas(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, gameWidth, gameHeight); + // Anfang Komponenten + + main.setLayoutX(0); + main.setLayoutY(0); + main.setWidth(gameWidth); + main.setHeight(gameHeight); + main.setOnKeyPressed( + (event) -> {main_KeyPressed(event);} + ); + root.getChildren().add(main); + main.setOnMouseClicked( + (event) -> {main_MouseClicked(event);} + ); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("game"); + primaryStage.setScene(scene); + primaryStage.show(); + + + timer = new TimerMethod(); + timer.start(); + + + + } // end of public game + + // Anfang Methoden + + public static void main(String[] args){ + launch(args); + // end of while + } // end of main + public void draw(GraphicsContext context) { + context.setFill(Color.BLUE); + context.fillRect(X,0,X+100,100); + context.clearRect(0,0,gameWidth,gameHeight); + + } + public void main_MouseClicked(MouseEvent evt) { + X+=10; + + } // end of main_MouseClicked + + public void main_KeyPressed(KeyEvent evt) { + if(evt.getCode() == KeyCode.ENTER) { + timer.stop(); + } + + } // end of main_KeyPressed + + // Ende Methoden + public class TimerMethod extends AnimationTimer { + @Override + public void handle(long now) { + mainLoop(); + } + } + public void mainLoop() { + draw(main.getGraphicsContext2D()); + } +} // end of class game diff --git a/2/Lenj/game.jfm b/2/Lenj/game.jfm new file mode 100644 index 0000000..79fc608 --- /dev/null +++ b/2/Lenj/game.jfm @@ -0,0 +1,67 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 747 + Top = 452 + BorderIcons = [biSystemMenu] + Caption = 'game' + ClientHeight = 434 + ClientWidth = 534 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'game' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object main: TFXCanvas + Tag = 114 + Left = 0 + Top = 0 + Width = 536 + Height = 432 + Hint = 'canvas1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Canvas' + LayoutX = 0 + LayoutY = 0 + Disable = False + Cache = False + dragOver = '' + keyPressed = 'main_KeyPressed' + mouseClicked = 'main_MouseClicked' + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/2/Lenj/game.~ava b/2/Lenj/game.~ava new file mode 100644 index 0000000..24416c7 --- /dev/null +++ b/2/Lenj/game.~ava @@ -0,0 +1,96 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.canvas.*; +import javafx.scene.control.*; +import javafx.scene.canvas.GraphicsContext; +import javafx.scene.paint.Color; +import java.lang.Thread; +import javafx.animation.AnimationTimer; +import javafx.scene.input.*; +import javafx.event.*; +import javafx.scene.input.KeyCodeCombination; +/** + * + * Beschreibung + * + * @version 1.0 vom 19.11.2024 + * @author + */ + +public class game extends Application { + // Anfang Attribute + public int gameWidth = 1000; + public int gameHeight = 720; + private AnimationTimer timer; + private int X = 0; + private Canvas main = new Canvas(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, gameWidth, gameHeight); + // Anfang Komponenten + + main.setLayoutX(0); + main.setLayoutY(0); + main.setWidth(gameWidth); + main.setHeight(gameHeight); + main.setOnKeyPressed( + (event) -> {main_KeyPressed(event);} + ); + root.getChildren().add(main); + main.setOnMouseClicked( + (event) -> {main_MouseClicked(event);} + ); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("game"); + primaryStage.setScene(scene); + primaryStage.show(); + + + timer = new TimerMethod(); + timer.start(); + + draw(main.getGraphicsContext2D()); + + } // end of public game + + // Anfang Methoden + + public static void main(String[] args){ + launch(args); + // end of while + } // end of main + public void draw(GraphicsContext context) { + context.setFill(Color.BLUE); + context.fillRect(X,0,X+100,100); + context.clearRect(0,0,gameWidth,gameHeight); + + } + public void main_MouseClicked(MouseEvent evt) { + X+=10; + + } // end of main_MouseClicked + + public void main_KeyPressed(KeyEvent evt) { + if(evt.getCode() == KeyCode.ENTER) { + timer.stop(); + } + + } // end of main_KeyPressed + + // Ende Methoden + public class TimerMethod extends AnimationTimer { + @Override + public void handle(long now) { + mainLoop(); + } + } + public void mainLoop() { + draw(main.getGraphicsContext2D()); + } +} // end of class game diff --git a/2/Lenj/game.~fm b/2/Lenj/game.~fm new file mode 100644 index 0000000..79fc608 --- /dev/null +++ b/2/Lenj/game.~fm @@ -0,0 +1,67 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 747 + Top = 452 + BorderIcons = [biSystemMenu] + Caption = 'game' + ClientHeight = 434 + ClientWidth = 534 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'game' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object main: TFXCanvas + Tag = 114 + Left = 0 + Top = 0 + Width = 536 + Height = 432 + Hint = 'canvas1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Canvas' + LayoutX = 0 + LayoutY = 0 + Disable = False + Cache = False + dragOver = '' + keyPressed = 'main_KeyPressed' + mouseClicked = 'main_MouseClicked' + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/2/Lenj/test.class b/2/Lenj/test.class new file mode 100644 index 0000000..7e4048a Binary files /dev/null and b/2/Lenj/test.class differ diff --git a/2/Lenj/test.java b/2/Lenj/test.java new file mode 100644 index 0000000..9b1923b --- /dev/null +++ b/2/Lenj/test.java @@ -0,0 +1,95 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.control.*; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import je.NumberField; +import javafx.event.*; +import javafx.collections.*; + +/** + * + * Beschreibung + * + * @version 1.0 vom 06.11.2024 + * @author + */ + +public class test extends Application { + // Anfang Attribute + public Label title = new Label(); + + private int windowWidth = 500; + private int windowHeight = 300; + private NumberField field1 = new NumberField(); + private Button button1 = new Button(); + private ListView listView1 = new ListView<>(); + private ObservableList listView1ObservableList = + FXCollections.observableArrayList(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, windowWidth, windowHeight); + // Anfang Komponenten + + title.setLayoutX(8); + title.setLayoutY(8); + title.setPrefHeight(24); + title.setPrefWidth(264); + title.setText("Just Testing"); + title.setFont(Font.font("Dialog", 15)); + + title.setContentDisplay(ContentDisplay.CENTER); + root.getChildren().add(title); + field1.setLayoutX(8); + field1.setLayoutY(40); + field1.setPrefHeight(24); + field1.setPrefWidth(136); + field1.setFont(Font.font("Dialog", 14)); + field1.setPromptText("Number"); + root.getChildren().add(field1); + button1.setLayoutX(88); + button1.setLayoutY(80); + button1.setPrefHeight(24); + button1.setPrefWidth(80); + button1.setText("Button"); + button1.setOnAction( + (event) -> {button1_Action(event);} + ); + button1.setFont(Font.font("Dialog", 11)); + root.getChildren().add(button1); + listView1.setLayoutX(0); + listView1.setLayoutY(104); + listView1.setPrefHeight(112); + listView1.setPrefWidth(120); + listView1.setItems(listView1ObservableList); + listView1ObservableList.add("Amerika"); + listView1ObservableList.add("Europa"); + listView1ObservableList.add("Asien"); + root.getChildren().add(listView1); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("test"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public test + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void button1_Action(Event evt) { + title.setText("wadaw"); + System.out.println(field1.getInt() * 123); + listView1ObservableList.add("Asien"); + + } // end of button1_Action + + // Ende Methoden +} // end of class test diff --git a/2/Lenj/test.jfm b/2/Lenj/test.jfm new file mode 100644 index 0000000..57e065e --- /dev/null +++ b/2/Lenj/test.jfm @@ -0,0 +1,179 @@ +object FGUIForm_3: TFXGuiForm + Tag = 180 + Left = 727 + Top = 322 + BorderIcons = [biSystemMenu] + Caption = 'test' + ClientHeight = 217 + ClientWidth = 281 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'test' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object title: TFXLabel + Tag = 101 + Left = 8 + Top = 8 + Width = 264 + Height = 24 + Hint = 'label1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 8 + LayoutY = 8 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 264 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_CENTER + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Label' + TextAlignment = _TA_LEFT + WrapText = False + LabelFor = 'Just Testing' + end + object field1: TFXNumberField + Tag = 103 + Left = 8 + Top = 40 + Width = 136 + Height = 24 + Cursor = crIBeam + Hint = 'numberField1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 40 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 136 + SnapToPixel = False + Text = '' + Editable = True + PromptText = 'Number' + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object button1: TFXButton + Tag = 105 + Left = 88 + Top = 80 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 88 + LayoutY = 80 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Button' + TextAlignment = _TA_LEFT + WrapText = False + action = 'button1_Action' + CancelButton = False + DefaultButton = False + end + object listView1: TFXListView + Tag = 109 + Left = 0 + Top = 104 + Width = 120 + Height = 112 + Hint = 'listView1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = 13158600 + JavaType = 'ListView' + LayoutX = 0 + LayoutY = 104 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 112 + PrefWidth = 120 + SnapToPixel = False + Editable = False + FixedCellSize = -1 + Items.Strings = ( + 'Amerika' + 'Europa' + 'Asien') + Orientation = VERTICAL + SelectionMode = SINGLE + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/2/Lenj/test.~ava b/2/Lenj/test.~ava new file mode 100644 index 0000000..fa61977 --- /dev/null +++ b/2/Lenj/test.~ava @@ -0,0 +1,95 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.control.*; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import je.NumberField; +import javafx.event.*; +import javafx.collections.*; + +/** + * + * Beschreibung + * + * @version 1.0 vom 06.11.2024 + * @author + */ + +public class test extends Application { + // Anfang Attribute + public Label title = new Label(); + + private int windowWidth = 500; + private int windowHeight = 300; + private NumberField field1 = new NumberField(); + private Button button1 = new Button(); + private ListView listView1 = new ListView<>(); + private ObservableList listView1ObservableList = + FXCollections.observableArrayList(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, windowWidth, windowHeight); + // Anfang Komponenten + + title.setLayoutX(8); + title.setLayoutY(8); + title.setPrefHeight(24); + title.setPrefWidth(264); + title.setText("Just Testing"); + title.setFont(Font.font("Dialog", 15)); + + title.setContentDisplay(ContentDisplay.CENTER); + root.getChildren().add(title); + field1.setLayoutX(8); + field1.setLayoutY(40); + field1.setPrefHeight(24); + field1.setPrefWidth(136); + field1.setFont(Font.font("Dialog", 14)); + field1.setPromptText("Number"); + root.getChildren().add(field1); + button1.setLayoutX(88); + button1.setLayoutY(80); + button1.setPrefHeight(24); + button1.setPrefWidth(80); + button1.setText("Button"); + button1.setOnAction( + (event) -> {button1_Action(event);} + ); + button1.setFont(Font.font("Dialog", 11)); + root.getChildren().add(button1); + listView1.setLayoutX(0); + listView1.setLayoutY(104); + listView1.setPrefHeight(112); + listView1.setPrefWidth(120); + listView1.setItems(listView1ObservableList); + listView1ObservableList.add("Amerika"); + listView1ObservableList.add("Europa"); + listView1ObservableList.add("Asien"); + root.getChildren().add(listView1); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("test"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public test + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void button1_Action(Event evt) { + title.setText("wadaw"); + System.out.println(field1.getInt() * 123); + listView1ObservableList.add("adfe"); + + } // end of button1_Action + + // Ende Methoden +} // end of class test diff --git a/2/Lenj/test.~fm b/2/Lenj/test.~fm new file mode 100644 index 0000000..352af73 --- /dev/null +++ b/2/Lenj/test.~fm @@ -0,0 +1,176 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 727 + Top = 322 + BorderIcons = [biSystemMenu] + Caption = 'test' + ClientHeight = 217 + ClientWidth = 281 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'test' + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object title: TFXLabel + Tag = 101 + Left = 8 + Top = 8 + Width = 264 + Height = 24 + Hint = 'label1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 8 + LayoutY = 8 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 264 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_CENTER + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Label' + TextAlignment = _TA_LEFT + WrapText = False + LabelFor = 'Just Testing' + end + object field1: TFXNumberField + Tag = 103 + Left = 8 + Top = 40 + Width = 136 + Height = 24 + Cursor = crIBeam + Hint = 'numberField1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clWhite + JavaType = 'NumberField' + LayoutX = 8 + LayoutY = 40 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 136 + SnapToPixel = False + Text = '' + Editable = True + PromptText = 'Number' + Alignment = CENTER_LEFT + PrefColumnCount = 12 + action = '' + end + object button1: TFXButton + Tag = 105 + Left = 88 + Top = 80 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 88 + LayoutY = 80 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Button' + TextAlignment = _TA_LEFT + WrapText = False + action = 'button1_Action' + CancelButton = False + DefaultButton = False + end + object listView1: TFXListView + Tag = 109 + Left = 0 + Top = 104 + Width = 120 + Height = 112 + Hint = 'listView1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = 13158600 + JavaType = 'ListView' + LayoutX = 0 + LayoutY = 104 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 112 + PrefWidth = 120 + SnapToPixel = False + Editable = False + FixedCellSize = -1 + Items.Strings = ( + 'Amerika' + 'Europa' + 'Asien') + Orientation = VERTICAL + SelectionMode = SINGLE + end +end diff --git a/2/Quadratzahlen.class b/2/Quadratzahlen.class new file mode 100644 index 0000000..353c3f1 Binary files /dev/null and b/2/Quadratzahlen.class differ diff --git a/2/Quadratzahlen.java b/2/Quadratzahlen.java new file mode 100644 index 0000000..be0d758 --- /dev/null +++ b/2/Quadratzahlen.java @@ -0,0 +1,8 @@ +public class Quadratzahlen { + public static void main(String args[]){ + for (int zahl = 1; zahl < 21 ;zahl++ ) { + System.out.println(zahl+". Quadratzahl: " + Math.pow(zahl,zahl)); + } + } + + } \ No newline at end of file diff --git a/2/Quadratzahlen.~ava b/2/Quadratzahlen.~ava new file mode 100644 index 0000000..8344080 --- /dev/null +++ b/2/Quadratzahlen.~ava @@ -0,0 +1,8 @@ +public class Quadratzahlen { + public static void main(String args[]){ + for (int zahl = 1; zahl < 21 ;zahl++ ) { + System.out.println(zahl+". Quadratzahl: " + Math.pow(zahl,zahl)); + } // end of for + } + + } \ No newline at end of file diff --git a/2/Sparbuch.class b/2/Sparbuch.class new file mode 100644 index 0000000..a013a1b Binary files /dev/null and b/2/Sparbuch.class differ diff --git a/2/Sparbuch.java b/2/Sparbuch.java new file mode 100644 index 0000000..f6dd7a6 --- /dev/null +++ b/2/Sparbuch.java @@ -0,0 +1,11 @@ +public class Sparbuch { + public static void main(String args[]) { + int betrag = 1000; + double zinssatz = 1.5; + System.out.println(zinssatz * .01); + for (int i = 0;i < 26;i++ ) { + betrag += (double)betrag * (zinssatz * .01); + System.out.println("Jahr: " + i + " Betrag: " + betrag); + } // end of for + } + } \ No newline at end of file diff --git a/2/Sparbuch.~ava b/2/Sparbuch.~ava new file mode 100644 index 0000000..7f811bb --- /dev/null +++ b/2/Sparbuch.~ava @@ -0,0 +1,11 @@ +public class Sparbuch { + public static void main(String args[]) { + int betrag = 1000; + double zinssatz = 11.5; + System.out.println(zinssatz * .01); + for (int i = 0;i < 26;i++ ) { + betrag += (double)betrag * (zinssatz * .01); + System.out.println("Jahr: " + i + " Betrag: " + betrag); + } // end of for + } + } \ No newline at end of file diff --git a/2/Steigung.class b/2/Steigung.class new file mode 100644 index 0000000..8c8f68b Binary files /dev/null and b/2/Steigung.class differ diff --git a/2/Steigung.java b/2/Steigung.java new file mode 100644 index 0000000..ab708c2 --- /dev/null +++ b/2/Steigung.java @@ -0,0 +1,12 @@ +public class Steigung { + public static void main(String args[]) { + double x1 = 4; + double y1 = 2; + + double x2 = 6; + double y2 = 7; + + System.out.println("Steigung: " + ((y2 - y1)/(x2 - x1))); + + } + } \ No newline at end of file diff --git a/2/Steigung.~ava b/2/Steigung.~ava new file mode 100644 index 0000000..ab708c2 --- /dev/null +++ b/2/Steigung.~ava @@ -0,0 +1,12 @@ +public class Steigung { + public static void main(String args[]) { + double x1 = 4; + double y1 = 2; + + double x2 = 6; + double y2 = 7; + + System.out.println("Steigung: " + ((y2 - y1)/(x2 - x1))); + + } + } \ No newline at end of file diff --git a/2/error.txt b/2/error.txt new file mode 100644 index 0000000..e69de29 diff --git a/3/.gitingore b/3/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/3/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/3/3 - Verknüpfung.lnk b/3/3 - Verknüpfung.lnk new file mode 100644 index 0000000..2155cf4 Binary files /dev/null and b/3/3 - Verknüpfung.lnk differ diff --git a/3/A1.class b/3/A1.class new file mode 100644 index 0000000..92198cd Binary files /dev/null and b/3/A1.class differ diff --git a/3/A1.java b/3/A1.java new file mode 100644 index 0000000..f1e30d6 --- /dev/null +++ b/3/A1.java @@ -0,0 +1,18 @@ +public class A1{ + public static void main(String args[]) { + char firstChar = 'n'; + + switch (firstChar) { + case 'j': + System.out.println("ja"); // kein Break + case 'J': + System.out.println("Ja"); + break; + case 'n': + System.out.println("nein"); // kein Break + case 'N': + System.out.println("Nein"); + break; + } // es gibt kein default + } +} \ No newline at end of file diff --git a/3/A1.~ava b/3/A1.~ava new file mode 100644 index 0000000..91720e9 --- /dev/null +++ b/3/A1.~ava @@ -0,0 +1,18 @@ +public class A1{ + public static void main(String args[]) { + char firstChar = 'n'; + + switch (firstChar) { + case 'j': + System.out.println("ja"); // kein Break + case 'J': + System.out.println("Ja"); + break; + case 'n': + System.out.println("nein"); + case 'N': + System.out.println("Nein"); + break; + } // es gibt kein default + } +} \ No newline at end of file diff --git a/3/Alter.class b/3/Alter.class new file mode 100644 index 0000000..17f090b Binary files /dev/null and b/3/Alter.class differ diff --git a/3/Alter.java b/3/Alter.java new file mode 100644 index 0000000..df58a87 --- /dev/null +++ b/3/Alter.java @@ -0,0 +1,12 @@ +public class Alter{ + public static void main(String args[]) { + int alter = 40; + if(alter < 50){ + System.out.println("Die Rente ist in Sicht"); + } else if (alter < 40){ + System.out.println("Genau richtig :-)"); + } else if (alter < 30){ + System.out.println("Du bist aber noch jung!"); // falsche Reihenfolge + } + } +} \ No newline at end of file diff --git a/3/Alter.~ava b/3/Alter.~ava new file mode 100644 index 0000000..aed3d0b --- /dev/null +++ b/3/Alter.~ava @@ -0,0 +1,12 @@ +public class Alter{ + public static void main(String args[]) { + int alter = 40; + if(alter < 50){ + System.out.println("Die Rente ist in Sicht"); + } else if (alter < 40){ + System.out.println("Genau richtig :-)"); + } else if (alter < 30){ + System.out.println("Du bist aber noch jung!"); + } + } +} \ No newline at end of file diff --git a/3/BMI.class b/3/BMI.class new file mode 100644 index 0000000..bae6971 Binary files /dev/null and b/3/BMI.class differ diff --git a/3/BMI.java b/3/BMI.java new file mode 100644 index 0000000..f89b700 --- /dev/null +++ b/3/BMI.java @@ -0,0 +1,48 @@ +import java.util.Scanner; +public class BMI{ + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + + + System.out.print("Gewicht: "); + double gewicht = input.nextDouble(); + System.out.print("Große: "); + double grosse = input.nextDouble(); + + double bmi = (gewicht/ (grosse*grosse)); + + System.out.println("BMI = " + bmi); + if(bmi < 16) { + System.out.println("Starkes untergewicht"); + } else if (bmi <= 17) { + System.out.println("Mäßiges untergewicht"); + } + else if (bmi <= 18.5) { + System.out.println("Leichtes untergewicht"); + } + else if (bmi <= 25) { + System.out.println("Normalgewicht"); + } + else if (bmi <= 30) { + System.out.println("Präadipositas"); + } + else if (bmi <= 35) { + System.out.println("Adipositas Grad 1"); + } + else if (bmi <= 40) { + System.out.println("Adipositas Grad 2"); + } + else { + System.out.println("Adipositas Grad 3"); + } + + + + + + + + + + } +} \ No newline at end of file diff --git a/3/BMI.txt b/3/BMI.txt new file mode 100644 index 0000000..045370e --- /dev/null +++ b/3/BMI.txt @@ -0,0 +1,30 @@ + String bmi = "Normalgewicht"; + switch (bmi) { + case "Starkes untergewicht": + System.out.println("BMI < 16"); + break; + case "Mäßiges untergewicht": + System.out.println("16 < BMI < 17"); + break; + case "Leichtes untergewicht": + System.out.println("17 < BMI < 18.5"); + break; + case "Normalgewicht": + System.out.println("18.5 < BMI < 25"); + break; + case "Präadipositas": + System.out.println("25 < BMI < 30"); + break; + + case "Adipositas Grad 1": + System.out.println("30 < BMI < 35"); + break; + case "Adipositas Grad 2": + System.out.println("35 < BMI < 40"); + break; + case "Adipositas Grad 3": + System.out.println("BMI > 40"); + break; + default: + System.out.println("dd"); + } // end of switch mit Switch könnte man \ No newline at end of file diff --git a/3/BMI.~ava b/3/BMI.~ava new file mode 100644 index 0000000..b7c5ea5 --- /dev/null +++ b/3/BMI.~ava @@ -0,0 +1,48 @@ +import java.util.Scanner; +public class BMI{ + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + + + System.out.print("Gewicht: "); + double gewicht = input.nextDouble(); + System.out.print("Große: "); + double grosse = input.nextDouble(); + + double bmi = (gewicht/ (grosse*grosse)); + + System.out.println("BMI = " + bmi); + if(bmi <= 16) { + System.out.println("Starkes untergewicht"); + } else if (bmi <= 17) { + System.out.println("Mäßiges untergewicht"); + } + else if (bmi <= 18.5) { + System.out.println("Leichtes untergewicht"); + } + else if (bmi <= 25) { + System.out.println("Normalgewicht"); + } + else if (bmi <= 30) { + System.out.println("Präadipositas"); + } + else if (bmi <= 35) { + System.out.println("Adipositas Grad 1"); + } + else if (bmi <= 40) { + System.out.println("Adipositas Grad 2"); + } + else { + System.out.println("Adipositas Grad 3"); + } + + + + + + + + + + } +} \ No newline at end of file diff --git a/3/BMI.~xt b/3/BMI.~xt new file mode 100644 index 0000000..568d4e9 --- /dev/null +++ b/3/BMI.~xt @@ -0,0 +1 @@ + mit Switch könnte man \ No newline at end of file diff --git a/3/Monat.class b/3/Monat.class new file mode 100644 index 0000000..830e1d5 Binary files /dev/null and b/3/Monat.class differ diff --git a/3/Monat.java b/3/Monat.java new file mode 100644 index 0000000..9610d7d --- /dev/null +++ b/3/Monat.java @@ -0,0 +1,50 @@ +import java.util.Scanner; +public class Monat { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + System.out.print("Zahl: "); + int monat = input.nextInt(); + + switch (monat) { + case 1: + System.out.println("Januar"); + break; + case 2: + System.out.println("Februar"); + break; + case 3: + System.out.println("März"); + break; + case 4: + System.out.println("April"); + break; + case 5: + System.out.println("Mai"); + break; + case 6: + System.out.println("June"); + break; + case 7: + System.out.println("Juli"); + break; + case 8: + System.out.println("August"); + break; + case 9: + System.out.println("September"); + break; + case 10: + System.out.println("Oktober"); + break; + case 11: + System.out.println("November"); + break; + case 12: + System.out.println("Dezember"); + break; + default: + System.out.println("DIe Zahl ist zo groß oder zu niedrig"); + + } // end of switch + } +} diff --git a/3/Monat.~ava b/3/Monat.~ava new file mode 100644 index 0000000..9610d7d --- /dev/null +++ b/3/Monat.~ava @@ -0,0 +1,50 @@ +import java.util.Scanner; +public class Monat { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + System.out.print("Zahl: "); + int monat = input.nextInt(); + + switch (monat) { + case 1: + System.out.println("Januar"); + break; + case 2: + System.out.println("Februar"); + break; + case 3: + System.out.println("März"); + break; + case 4: + System.out.println("April"); + break; + case 5: + System.out.println("Mai"); + break; + case 6: + System.out.println("June"); + break; + case 7: + System.out.println("Juli"); + break; + case 8: + System.out.println("August"); + break; + case 9: + System.out.println("September"); + break; + case 10: + System.out.println("Oktober"); + break; + case 11: + System.out.println("November"); + break; + case 12: + System.out.println("Dezember"); + break; + default: + System.out.println("DIe Zahl ist zo groß oder zu niedrig"); + + } // end of switch + } +} diff --git a/3/SwitchT.class b/3/SwitchT.class new file mode 100644 index 0000000..f081f55 Binary files /dev/null and b/3/SwitchT.class differ diff --git a/3/SwitchT.java b/3/SwitchT.java new file mode 100644 index 0000000..f8f6324 --- /dev/null +++ b/3/SwitchT.java @@ -0,0 +1,28 @@ +public class SwitchT { + public static void main(String args[]) { + int zahl = 1; + + switch (zahl) { + case 1: + System.out.println("Sehr gut"); + break; + case 2: + System.out.println("Gut"); + break; + case 3: + System.out.println("Befreidigend"); + break; + case 4: + System.out.println("Ausreichend"); + break; + case 5: + System.out.println("Mangelhaft"); + break; + case 6: + System.out.println("Ungenügend"); + break; + default: + System.out.println("Keine Note"); + } // end of switch + } +} \ No newline at end of file diff --git a/3/SwitchT.~ava b/3/SwitchT.~ava new file mode 100644 index 0000000..f8f6324 --- /dev/null +++ b/3/SwitchT.~ava @@ -0,0 +1,28 @@ +public class SwitchT { + public static void main(String args[]) { + int zahl = 1; + + switch (zahl) { + case 1: + System.out.println("Sehr gut"); + break; + case 2: + System.out.println("Gut"); + break; + case 3: + System.out.println("Befreidigend"); + break; + case 4: + System.out.println("Ausreichend"); + break; + case 5: + System.out.println("Mangelhaft"); + break; + case 6: + System.out.println("Ungenügend"); + break; + default: + System.out.println("Keine Note"); + } // end of switch + } +} \ No newline at end of file diff --git a/3/Verweigung.java b/3/Verweigung.java new file mode 100644 index 0000000..eacaa5e --- /dev/null +++ b/3/Verweigung.java @@ -0,0 +1,6 @@ + public class Verzweigung { + public static void main(String args[]) { + int alter = 38 + + } + } \ No newline at end of file diff --git a/3/Verzweigung.class b/3/Verzweigung.class new file mode 100644 index 0000000..22e60e1 Binary files /dev/null and b/3/Verzweigung.class differ diff --git a/3/Verzweigung.java b/3/Verzweigung.java new file mode 100644 index 0000000..6daf589 --- /dev/null +++ b/3/Verzweigung.java @@ -0,0 +1,25 @@ +public class Verzweigung { + public static void main(String args[]) { + int alter = 30; + if(alter <= 20) { + System.out.println("Du bist noch jung"); + } + + else if (alter < 30) { + System.out.println("ISt noch ok!"); + } + else if (alter < 40) { + System.out.println("Grenzwertig :-P"); + } + else if (alter < 50) { + System.out.println("Die Rente ist in sicht"); + } + else if (alter < 60) { + System.out.println("Bist du baer alt"); + } + + else { + System.out.println("Na, ganz frish"); + } // end of if-else + } +} \ No newline at end of file diff --git a/3/Verzweigung.~ava b/3/Verzweigung.~ava new file mode 100644 index 0000000..6daf589 --- /dev/null +++ b/3/Verzweigung.~ava @@ -0,0 +1,25 @@ +public class Verzweigung { + public static void main(String args[]) { + int alter = 30; + if(alter <= 20) { + System.out.println("Du bist noch jung"); + } + + else if (alter < 30) { + System.out.println("ISt noch ok!"); + } + else if (alter < 40) { + System.out.println("Grenzwertig :-P"); + } + else if (alter < 50) { + System.out.println("Die Rente ist in sicht"); + } + else if (alter < 60) { + System.out.println("Bist du baer alt"); + } + + else { + System.out.println("Na, ganz frish"); + } // end of if-else + } +} \ No newline at end of file diff --git a/3/error.txt b/3/error.txt new file mode 100644 index 0000000..e69de29 diff --git a/4/.gitingore b/4/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/4/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/4/A2.class b/4/A2.class new file mode 100644 index 0000000..1a4472d Binary files /dev/null and b/4/A2.class differ diff --git a/4/A2.java b/4/A2.java new file mode 100644 index 0000000..0b7659e --- /dev/null +++ b/4/A2.java @@ -0,0 +1,19 @@ +import java.util.Arrays; + +public class A2 { + public static void main(String args[]) { + int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78 } ; + for (int zahl: zahlen ) { + System.out.println( zahl); + } // end of for + System.out.println(Arrays.toString(zahlen)); + + Arrays.sort(zahlen); + + + for (int zahl: zahlen ) { + System.out.println( zahl); + } + System.out.println(Arrays.toString(zahlen)); + } +} \ No newline at end of file diff --git a/4/A2.~ava b/4/A2.~ava new file mode 100644 index 0000000..4a93633 --- /dev/null +++ b/4/A2.~ava @@ -0,0 +1,18 @@ +import java.util.Arrays; + +public class A2 { + public static void main(String args[]) { + int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78 } ; + for (int zahl: zahlen ) { + System.out.println( zahl); + } // end of for + System.out.println(Arrays.toString(zahlen)); + + Arrays.sort(zahlen); + + + for (int zahl: zahlen ) { + System.out.println( zahl); + } + } +} \ No newline at end of file diff --git a/4/A4.class b/4/A4.class new file mode 100644 index 0000000..737e0c5 Binary files /dev/null and b/4/A4.class differ diff --git a/4/A4.java b/4/A4.java new file mode 100644 index 0000000..417d3f8 --- /dev/null +++ b/4/A4.java @@ -0,0 +1,25 @@ +import java.util.Arrays; +import java.util.Scanner; + +public class A4 { + public static void main(String args[]) { + double schueler[] = new double[5]; + Scanner input = new Scanner(System.in); + for (int i = 0; i < schueler.length;i++ ) { + System.out.print((i+1) + ". "); + schueler[i] = input.nextDouble(); + } + Arrays.sort(schueler); + for (int i = 0; i < schueler.length;i++ ) { + System.out.println((i+1)+". " + schueler[i]); + } + double durschnittlich = 0; + + for (int i = 0; i < schueler.length;i++ ) { + durschnittlich += schueler[i]; + } + + System.out.println("Durschnittlich: " + (Math.round((durschnittlich/schueler.length) *10.0 )/10.0 ) ); + + } +} \ No newline at end of file diff --git a/4/A4.~ava b/4/A4.~ava new file mode 100644 index 0000000..f7985df --- /dev/null +++ b/4/A4.~ava @@ -0,0 +1,25 @@ +import java.util.Arrays; +import java.util.Scanner; + +public class A4 { + public static void main(String args[]) { + double schueler[] = new double[18]; + Scanner input = new Scanner(System.in); + for (int i = 0; i < schueler.length;i++ ) { + System.out.print((i+1) + ". "); + schueler[i] = input.nextDouble(); + } + Arrays.sort(schueler); + for (int i = 0; i < schueler.length;i++ ) { + System.out.println((i+1)+". " + schueler[i]); + } + double durschnittlich = 0; + + for (int i = 0; i < schueler.length;i++ ) { + durschnittlich += schueler[i]; + } + + System.out.println("Durschnittlich: " + (Math.round((durschnittlich/schueler.length) *10.0 )/10.0 ) ); + + } +} \ No newline at end of file diff --git a/4/Array1.class b/4/Array1.class new file mode 100644 index 0000000..aa68726 Binary files /dev/null and b/4/Array1.class differ diff --git a/4/Array1.java b/4/Array1.java new file mode 100644 index 0000000..0435d56 --- /dev/null +++ b/4/Array1.java @@ -0,0 +1,10 @@ +import java.util.Arrays; +public class Array1{ + public static void main(String args[]){ + int lottozahlen[] = {17, 9, 39, 23, 41, 6}; + System.out.println("Anzahl Elemente im Array: " + lottozahlen.length); + System.out.println("Komplettes Array: " + Arrays.toString(lottozahlen)); + Arrays.sort(lottozahlen); + System.out.println("Komplettes Array: " + Arrays.toString(lottozahlen)); + } +} \ No newline at end of file diff --git a/4/Array1.~ava b/4/Array1.~ava new file mode 100644 index 0000000..aeeb256 --- /dev/null +++ b/4/Array1.~ava @@ -0,0 +1,21 @@ +import java.util.Arrays; +public class Array1 { + public static void main(String args[]) { + import java.util.Arrays; +public class lottoArray{ +public static void main(String args[]){ +int lottozahlen[] = {17, 9, 39, 23, 41, 6}; +System.out.println("Anzahl Elemente im Array: " + lottozahlen.length); +System.out.println("Komplettes Array: " + Arrays.toString(lottozahlen)); +Arrays.sort(lottozahlen); +System.out.println("Komplettes Array: " + Arrays.toString(lottozahlen)); +} +} + } + public static void striechen() { + for (int i = 0; i < 50; i++) { + System.out.print("-"); + } + System.out.println(); + } +} diff --git a/4/KG1.class b/4/KG1.class new file mode 100644 index 0000000..5f5a208 Binary files /dev/null and b/4/KG1.class differ diff --git a/4/KG1.java b/4/KG1.java new file mode 100644 index 0000000..3e33955 --- /dev/null +++ b/4/KG1.java @@ -0,0 +1,14 @@ +import java.util.Arrays; + +public class KG1 { + public static void main(String args[]) { + int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78, 66,73,4,56,3,643,5,23,6,300 } ; + + Arrays.sort(zahlen); + + System.out.println("Kleinste: "+ zahlen[0]); + System.out.println("Großte: "+ zahlen[zahlen.length -1]); + + + } +} \ No newline at end of file diff --git a/4/KG1.~ava b/4/KG1.~ava new file mode 100644 index 0000000..b4c8976 --- /dev/null +++ b/4/KG1.~ava @@ -0,0 +1,13 @@ +import java.util.Arrays; + +public class KG1 { + public static void main(String args[]) { + int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78, 66,73,4,56,3,643,5,23,6,300 } ; + + Arrays.sort(zahlen); + + System.out.println("Kleinste: "+ zahlen[0]); + System.out.println("Großte: "+ zahlen[zahlen.length -1]); + + } +} \ No newline at end of file diff --git a/4/KG2.class b/4/KG2.class new file mode 100644 index 0000000..38d7205 Binary files /dev/null and b/4/KG2.class differ diff --git a/4/KG2.java b/4/KG2.java new file mode 100644 index 0000000..8eb41cc --- /dev/null +++ b/4/KG2.java @@ -0,0 +1,28 @@ +import java.util.Arrays; + +public class KG2 { + public static void main(String args[]) { + int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78, 66,73,4,56,3,643,5,23,6,300 }; + int grosste = 0; + int kleinste = 0; + + for (int i = 0; i < zahlen.length;i++ ) { + if(zahlen[i] > grosste) { + grosste = zahlen[i]; + } + + } + kleinste = grosste; + for (int i = 0; i < zahlen.length;i++ ) { + if(zahlen[i] < kleinste) { + kleinste = zahlen[i]; + } + + } + + + System.out.println("Kleinste: "+ kleinste); + System.out.println("Großte: "+ grosste); + + } +} \ No newline at end of file diff --git a/4/KG2.~ava b/4/KG2.~ava new file mode 100644 index 0000000..306d909 --- /dev/null +++ b/4/KG2.~ava @@ -0,0 +1,28 @@ +import java.util.Arrays; + +public class KG2 { + public static void main(String args[]) { + int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78, 66,73,4,56,3,643,5,23,6 }; + int grosste = 0; + int kleinste = 0; + + for (int i = 0; i < zahlen.length;i++ ) { + if(zahlen[i] > grosste) { + grosste = zahlen[i]; + } + + } + kleinste = grosste; + for (int i = 0; i < zahlen.length;i++ ) { + if(zahlen[i] < kleinste) { + kleinste = zahlen[i]; + } + + } + + + System.out.println("Kleinste: "+ kleinste); + System.out.println("Großte: "+ grosste); + + } +} \ No newline at end of file diff --git a/4/error.txt b/4/error.txt new file mode 100644 index 0000000..e69de29 diff --git a/4/o.class b/4/o.class new file mode 100644 index 0000000..3f4a79a Binary files /dev/null and b/4/o.class differ diff --git a/4/o.java b/4/o.java new file mode 100644 index 0000000..d7244e7 --- /dev/null +++ b/4/o.java @@ -0,0 +1,26 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.12.2024 + * @author + */ + +public class o { + + // Anfang Attribute + // Ende Attribute + + // Anfang Methoden + public void jj() { + // TODO hier Quelltext einfügen + + } + + public void ll() { + // TODO hier Quelltext einfügen + + } + + // Ende Methoden +} // end of o diff --git a/4/o.uml b/4/o.uml new file mode 100644 index 0000000..e6bc478 --- /dev/null +++ b/4/o.uml @@ -0,0 +1,27 @@ +[Files] +File0=o.java + +[Box: - o] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/5/.gitingore b/5/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/5/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/5/Artikel.class b/5/Artikel.class new file mode 100644 index 0000000..421d7a8 Binary files /dev/null and b/5/Artikel.class differ diff --git a/5/Artikel.java b/5/Artikel.java new file mode 100644 index 0000000..3c44701 --- /dev/null +++ b/5/Artikel.java @@ -0,0 +1,64 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author + */ + +public class Artikel { + + // Anfang Attribute + public int artikelNr; + private String artikelBez; + private double ekPreis; + private int bestand; + // Ende Attribute + + public Artikel(int artikelNr, String artikelBez, double ekPreis, int bestand) { + this.artikelNr = artikelNr; + this.artikelBez = artikelBez; + this.ekPreis = ekPreis; + this.bestand = bestand; + } + + // Anfang Methoden + public int getArtikelNr() { + return artikelNr; + } + + public void setArtikelNr(int artikelNrNeu) { + artikelNr = artikelNrNeu; + } + + public String getArtikelBez() { + return artikelBez; + } + + public void setArtikelBez(String artikelBezNeu) { + artikelBez = artikelBezNeu; + } + + public double getEkPreis() { + return ekPreis; + } + + public void setEkPreis(double ekPreisNeu) { + ekPreis = ekPreisNeu; + } + + public int getBestand() { + return bestand; + } + + public void setBestand(int bestandNeu) { + bestand = bestandNeu; + } + + public double artikelWert() { + // TODO hier Quelltext einfügen + return 0; + } + + // Ende Methoden +} // end of Artikel diff --git a/5/Artikel.uml b/5/Artikel.uml new file mode 100644 index 0000000..1475df3 --- /dev/null +++ b/5/Artikel.uml @@ -0,0 +1,27 @@ +[Files] +File0=Artikel.java + +[Box: - Artikel] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/5/Aufgabe3.class b/5/Aufgabe3.class new file mode 100644 index 0000000..6af7ff8 Binary files /dev/null and b/5/Aufgabe3.class differ diff --git a/5/Aufgabe3.java b/5/Aufgabe3.java new file mode 100644 index 0000000..a9e2283 --- /dev/null +++ b/5/Aufgabe3.java @@ -0,0 +1,16 @@ +public class Aufgabe3 { + public static void main(String[] args) { + System.out.println("3 * 4 = " + mult(3,4)); + System.out.println("45 * 12 = " + mult(45,12)); + + } + + + public static int mult(int a, int b) { + int result=0; + for (int i = a; i != 0 ;i-- ) { + result+=b; + } // end of for + return result; + } +} \ No newline at end of file diff --git a/5/Aufgabe3.uml b/5/Aufgabe3.uml new file mode 100644 index 0000000..b722963 --- /dev/null +++ b/5/Aufgabe3.uml @@ -0,0 +1,27 @@ +[Files] +File0=Aufgabe3.java + +[Box: - Aufgabe3] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/5/Aufgabe3.~ava b/5/Aufgabe3.~ava new file mode 100644 index 0000000..ec70d01 --- /dev/null +++ b/5/Aufgabe3.~ava @@ -0,0 +1,16 @@ +public class Aufgabe3 { + public static void main(String[] args) { + System.out.println("3 * 4 = " + mult(3,4)); + System.out.println("45 * 12 = " + mult(45,12)); + + } + + + public static int mult(int a, int b) { + int result=0; + for (int i = a; i != 0 ;i-- ) { + result+=b; + } // end of for + return result; + } +} \ No newline at end of file diff --git a/5/Aufgabe4.class b/5/Aufgabe4.class new file mode 100644 index 0000000..589a440 Binary files /dev/null and b/5/Aufgabe4.class differ diff --git a/5/Aufgabe4.java b/5/Aufgabe4.java new file mode 100644 index 0000000..2191c2e --- /dev/null +++ b/5/Aufgabe4.java @@ -0,0 +1,20 @@ +import java.util.Arrays; +public class Aufgabe4 { + public static void main(String[] args) { + int[] array = {12,10,4,45,7}; + System.out.println(Arrays.toString(array)); + printArray(sort(array)); + } + + + public static int[] sort(int[] arr) { + Arrays.sort(arr); + return arr; + + } + + public static void printArray(int[] arr) { + System.out.println("Array:" + Arrays.toString(arr)); + + } +} \ No newline at end of file diff --git a/5/Aufgabe4.~ava b/5/Aufgabe4.~ava new file mode 100644 index 0000000..c442819 --- /dev/null +++ b/5/Aufgabe4.~ava @@ -0,0 +1,19 @@ +import java.util.Arrays; +public class Aufgabe4 { + public static void main(String[] args) { + int[] array = {12,10,4,45,7}; + printArray(sort(array)); + } + + + public static int[] sort(int[] arr) { + Arrays.sort(arr); + return arr; + + } + + public static void printArray(int[] arr) { + System.out.println("Array:" + Arrays.toString(arr)); + + } +} \ No newline at end of file diff --git a/5/Kreisflaeche.class b/5/Kreisflaeche.class new file mode 100644 index 0000000..e90599c Binary files /dev/null and b/5/Kreisflaeche.class differ diff --git a/5/Kreisflaeche.java b/5/Kreisflaeche.java new file mode 100644 index 0000000..26f6bb5 --- /dev/null +++ b/5/Kreisflaeche.java @@ -0,0 +1,14 @@ +import java.text.DecimalFormat; + +public class Kreisflaeche { + public static DecimalFormat d = new DecimalFormat("0.00"); + public static void main(String[] args) { + kreisflaecheB(2); + + } + public static void kreisflaecheB( double r) { + System.out.println(d.format((Math.PI * Math.pow(r,2)) )); + + } + +} \ No newline at end of file diff --git a/5/Kreisflaeche.~ava b/5/Kreisflaeche.~ava new file mode 100644 index 0000000..01dfedc --- /dev/null +++ b/5/Kreisflaeche.~ava @@ -0,0 +1,14 @@ +import java.text.DecimalFormat; + +public class Kreisflaeche { + public static DecimalFormat d = new DecimalFormat("0.00"); + public static void main(String[] args) { + kreisflaecheB(2); + + } + public static void kreisflaecheB( double r) { + System.out.println(d.format(Math.round( (Math.PI * Math.pow(r,2)) ))); + + } + +} \ No newline at end of file diff --git a/5/Kreisflaeche2.class b/5/Kreisflaeche2.class new file mode 100644 index 0000000..3f4b001 Binary files /dev/null and b/5/Kreisflaeche2.class differ diff --git a/5/Kreisflaeche2.java b/5/Kreisflaeche2.java new file mode 100644 index 0000000..3c02062 --- /dev/null +++ b/5/Kreisflaeche2.java @@ -0,0 +1,51 @@ +import java.util.Scanner; +import java.text.DecimalFormat; + +public class Kreisflaeche2 { + public static DecimalFormat antwortFormat = new DecimalFormat("0.00"); + public static void main(String[] args) { + + Scanner input = new Scanner(System.in); + double radius = 0; + boolean ende = false; + System.out.print("Radius: "); + radius = input.nextDouble(); + System.out.println("Rad = " + radius); + + + while (!ende) { + System.out.println("Was wollen Sie machen?"); + System.out.println("K, U oder V finden"); + String wahl = input.next(); + switch (wahl) { + case "K": + System.out.println("Kreisfläche: " + antwortFormat.format( kreisflaecheB(radius))); + break; + case "U": + System.out.println("Umfang - " + antwortFormat.format( umfang(radius))); + break; + case "V": + System.out.println("Volumen - " + antwortFormat.format( volumen(radius))); + break; + default: + System.out.println("Falsch"); + ende = true; + } + + } + + + } + public static double kreisflaecheB( double r) { + return (Math.PI * Math.pow(r,2) ); + } + + public static double umfang(double r) { + return (2 * r * Math.PI); + + } + public static double volumen(double r) { + return ((4/3) * Math.PI * Math.pow(r,3)); + + } +} \ No newline at end of file diff --git a/5/Kreisflaeche2.~ava b/5/Kreisflaeche2.~ava new file mode 100644 index 0000000..3c02062 --- /dev/null +++ b/5/Kreisflaeche2.~ava @@ -0,0 +1,51 @@ +import java.util.Scanner; +import java.text.DecimalFormat; + +public class Kreisflaeche2 { + public static DecimalFormat antwortFormat = new DecimalFormat("0.00"); + public static void main(String[] args) { + + Scanner input = new Scanner(System.in); + double radius = 0; + boolean ende = false; + System.out.print("Radius: "); + radius = input.nextDouble(); + System.out.println("Rad = " + radius); + + + while (!ende) { + System.out.println("Was wollen Sie machen?"); + System.out.println("K, U oder V finden"); + String wahl = input.next(); + switch (wahl) { + case "K": + System.out.println("Kreisfläche: " + antwortFormat.format( kreisflaecheB(radius))); + break; + case "U": + System.out.println("Umfang - " + antwortFormat.format( umfang(radius))); + break; + case "V": + System.out.println("Volumen - " + antwortFormat.format( volumen(radius))); + break; + default: + System.out.println("Falsch"); + ende = true; + } + + } + + + } + public static double kreisflaecheB( double r) { + return (Math.PI * Math.pow(r,2) ); + } + + public static double umfang(double r) { + return (2 * r * Math.PI); + + } + public static double volumen(double r) { + return ((4/3) * Math.PI * Math.pow(r,3)); + + } +} \ No newline at end of file diff --git a/5/error.txt b/5/error.txt new file mode 100644 index 0000000..e69de29 diff --git a/6/.gitingore b/6/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/6/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/6/Aufgabe.class b/6/Aufgabe.class new file mode 100644 index 0000000..068af4f Binary files /dev/null and b/6/Aufgabe.class differ diff --git a/6/Aufgabe.java b/6/Aufgabe.java new file mode 100644 index 0000000..9fd3088 --- /dev/null +++ b/6/Aufgabe.java @@ -0,0 +1,29 @@ +import java.util.InputMismatchException; +import java.util.Scanner; +public class Aufgabe { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + int a; + int b; + + try { + System.out.print("A = "); + a = input.nextInt(); + System.out.print("B = "); + b = input.nextInt(); + + System.out.println("a : b = " + a/b); + } catch(ArithmeticException e) { + System.out.println("Bei der Berechnung gab es Problem"); + System.out.println("Problem: Dividiederen durch Null"); + } catch (InputMismatchException e) { + System.out.println("Geben Sie ganzzahlige Zahl"); + + + } + + + + } + +} diff --git a/6/Aufgabe.uml b/6/Aufgabe.uml new file mode 100644 index 0000000..c2bc002 --- /dev/null +++ b/6/Aufgabe.uml @@ -0,0 +1,13 @@ +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=11 +ShowObjectDiagram=0 + diff --git a/6/Aufgabe.~ava b/6/Aufgabe.~ava new file mode 100644 index 0000000..87c9ae6 --- /dev/null +++ b/6/Aufgabe.~ava @@ -0,0 +1,30 @@ +import java.util.InputMismatchException; +import java.util.Scanner; +public class Aufgabe { + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + System.out.println(6.7 / 0); + int a; + int b; + + try { + System.out.print("A = "); + a = input.nextInt(); + System.out.print("B = "); + b = input.nextInt(); + + System.out.println("a : b = " + (double)a/b); + } catch(ArithmeticException e) { + System.out.println("Bei der Berechnung gab es Problem"); + System.out.println("Problem: Dividiederen durch Null"); + } catch (InputMismatchException e) { + System.out.println("Geben Sie ganzzahlige Zahl"); + + + } + + + + } + +} diff --git a/6/Aufgabe2.class b/6/Aufgabe2.class new file mode 100644 index 0000000..1c3f197 Binary files /dev/null and b/6/Aufgabe2.class differ diff --git a/6/Aufgabe2.java b/6/Aufgabe2.java new file mode 100644 index 0000000..845ded2 --- /dev/null +++ b/6/Aufgabe2.java @@ -0,0 +1,20 @@ +import java.util.InputMismatchException; +import java.util.Scanner; +public class Aufgabe2 { + public static void main(String args[]) { + try { + System.out.println(berechneDivision(10,0)); + } catch(IllegalArgumentException e) { + System.out.println(e.getMessage()); + } + + + } + public static int berechneDivision(int a, int b){ + if (b == 0){ + throw new IllegalArgumentException("Der Nenner darf nicht Null sein"); + } + int c = a/b; + return c; + } +} diff --git a/6/Aufgabe2.uml b/6/Aufgabe2.uml new file mode 100644 index 0000000..c2bc002 --- /dev/null +++ b/6/Aufgabe2.uml @@ -0,0 +1,13 @@ +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=11 +ShowObjectDiagram=0 + diff --git a/6/Aufgabe2.~ava b/6/Aufgabe2.~ava new file mode 100644 index 0000000..de8f416 --- /dev/null +++ b/6/Aufgabe2.~ava @@ -0,0 +1,20 @@ +import java.util.InputMismatchException; +import java.util.Scanner; +public class Aufgabe2 { + public static void main(String args[]) { + try { + System.out.println(berechneDivision(10,5)); + } catch(IllegalArgumentException e) { + System.out.println(e.getMessage()); + } + + + } + public static int berechneDivision(int a, int b){ + if (b == 0){ + throw new IllegalArgumentException("Der Nenner darf nicht Null sein"); + } + int c = a/b; + return c; + } +} diff --git a/6/Dividieren.class b/6/Dividieren.class new file mode 100644 index 0000000..f8765b1 Binary files /dev/null and b/6/Dividieren.class differ diff --git a/6/Dividieren.java b/6/Dividieren.java new file mode 100644 index 0000000..ecc5d8e --- /dev/null +++ b/6/Dividieren.java @@ -0,0 +1,18 @@ +public class Dividieren { + public static void main(String args[]) { + int a = 7; + int b = 7.9; + try { + System.out.println("a : b = " + a/b); + } catch(ArithmeticException e) { + System.out.println("Bei der Berechnung gab es Problem"); + System.out.println("Problem: "+ e.getMessage()); + } catch (Exception e) { + + } + + + + } + +} diff --git a/6/Dividieren.uml b/6/Dividieren.uml new file mode 100644 index 0000000..c2bc002 --- /dev/null +++ b/6/Dividieren.uml @@ -0,0 +1,13 @@ +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=11 +ShowObjectDiagram=0 + diff --git a/6/Dividieren.~ava b/6/Dividieren.~ava new file mode 100644 index 0000000..ecc5d8e --- /dev/null +++ b/6/Dividieren.~ava @@ -0,0 +1,18 @@ +public class Dividieren { + public static void main(String args[]) { + int a = 7; + int b = 7.9; + try { + System.out.println("a : b = " + a/b); + } catch(ArithmeticException e) { + System.out.println("Bei der Berechnung gab es Problem"); + System.out.println("Problem: "+ e.getMessage()); + } catch (Exception e) { + + } + + + + } + +} diff --git a/6/error.txt b/6/error.txt new file mode 100644 index 0000000..f248831 --- /dev/null +++ b/6/error.txt @@ -0,0 +1,4 @@ +Dividieren.java:4: Fehler: Inkompatible Typen: Möglicher Verlust bei Konvertierung von double in int + int b = 7.9; + ^ +1 Fehler diff --git a/7/.gitingore b/7/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/7/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/7/BMI_BR.class b/7/BMI_BR.class new file mode 100644 index 0000000..277b7a7 Binary files /dev/null and b/7/BMI_BR.class differ diff --git a/7/BMI_BR.java b/7/BMI_BR.java new file mode 100644 index 0000000..e9ffcc1 --- /dev/null +++ b/7/BMI_BR.java @@ -0,0 +1,52 @@ +import java.io.*; +import java.text.DecimalFormat; + +public class BMI_BR { + public static void main(String args[]) throws IOException { + DecimalFormat antwortFormat = new DecimalFormat("0.0"); + BufferedReader eingabe = new BufferedReader(new InputStreamReader(System.in)); + + String speicher; + double bmi = 0; + try { + System.out.print("Gewicht: "); + speicher = eingabe.readLine(); + double gewicht = Double.parseDouble(speicher); + System.out.print("Große: "); + speicher = eingabe.readLine(); + double grosse = Double.parseDouble(speicher); + bmi = (gewicht/ (grosse*grosse)); + } catch(NumberFormatException e) { + System.out.println("Geben Sie Zhal"); + } + + + + System.out.println("BMI = " + antwortFormat.format(bmi)); + System.out.println("BMI = " + (Math.round(bmi*10.0)/10.0)); + if(bmi < 16) { + System.out.println("Starkes untergewicht"); + } else if (bmi <= 17) { + System.out.println("Mäßiges untergewicht"); + } + else if (bmi <= 18.5) { + System.out.println("Leichtes untergewicht"); + } + else if (bmi <= 25) { + System.out.println("Normalgewicht"); + } + else if (bmi <= 30) { + System.out.println("Präadipositas"); + } + else if (bmi <= 35) { + System.out.println("Adipositas Grad 1"); + } + else if (bmi <= 40) { + System.out.println("Adipositas Grad 2"); + } + else { + System.out.println("Adipositas Grad 3"); + } + } + +} \ No newline at end of file diff --git a/7/BMI_BR.~ava b/7/BMI_BR.~ava new file mode 100644 index 0000000..ca2d741 --- /dev/null +++ b/7/BMI_BR.~ava @@ -0,0 +1,52 @@ +import java.io.*; +import java.text.DecimalFormat; + +public class BMI_BR { + public static void main(String args[]) throws IOException { + DecimalFormat antwortFormat = new DecimalFormat("0.0"); + BufferedReader eingabe = new BufferedReader(new InputStreamReader(System.in)); + + String speicher; + double bmi = 0; + try { + System.out.print("Gewicht: "); + speicher = eingabe.readLine(); + double gewicht = Double.parseDouble(speicher); + System.out.print("Große: "); + speicher = eingabe.readLine(); + double grosse = Double.parseDouble(speicher); + bmi = (gewicht/ (grosse*grosse)); + } catch(NumberFormatException e) { + System.out.println("Geben Sie Zhal"); + } + + + + System.out.println("BMI = " + antwortFormat.format(bmi)); + System.out.println("BMI = " + (Math.round(bmi*100.0)/100.0)); + if(bmi < 16) { + System.out.println("Starkes untergewicht"); + } else if (bmi <= 17) { + System.out.println("Mäßiges untergewicht"); + } + else if (bmi <= 18.5) { + System.out.println("Leichtes untergewicht"); + } + else if (bmi <= 25) { + System.out.println("Normalgewicht"); + } + else if (bmi <= 30) { + System.out.println("Präadipositas"); + } + else if (bmi <= 35) { + System.out.println("Adipositas Grad 1"); + } + else if (bmi <= 40) { + System.out.println("Adipositas Grad 2"); + } + else { + System.out.println("Adipositas Grad 3"); + } + } + +} \ No newline at end of file diff --git a/7/BR.class b/7/BR.class new file mode 100644 index 0000000..b7c58cf Binary files /dev/null and b/7/BR.class differ diff --git a/7/BR.java b/7/BR.java new file mode 100644 index 0000000..2cc269c --- /dev/null +++ b/7/BR.java @@ -0,0 +1,23 @@ +import java.io.*; + +public class BR { + public static void main(String args[]) throws IOException { + String speicher; + + BufferedReader eingabe = new BufferedReader(new InputStreamReader(System.in)); + + System.out.print("Geben Sie Zahl: "); + + speicher = eingabe.readLine(); + try { + int zahl = Integer.parseInt(speicher); + System.out.println("Quadrat: " + (zahl*zahl)); + } catch(NumberFormatException e) { + System.out.println("Geben Sie ganzzahlige zahl"); + } + + + + } + +} \ No newline at end of file diff --git a/7/BR.~ava b/7/BR.~ava new file mode 100644 index 0000000..2cc269c --- /dev/null +++ b/7/BR.~ava @@ -0,0 +1,23 @@ +import java.io.*; + +public class BR { + public static void main(String args[]) throws IOException { + String speicher; + + BufferedReader eingabe = new BufferedReader(new InputStreamReader(System.in)); + + System.out.print("Geben Sie Zahl: "); + + speicher = eingabe.readLine(); + try { + int zahl = Integer.parseInt(speicher); + System.out.println("Quadrat: " + (zahl*zahl)); + } catch(NumberFormatException e) { + System.out.println("Geben Sie ganzzahlige zahl"); + } + + + + } + +} \ No newline at end of file diff --git a/8/.gitingore b/8/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/8/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/8/Aufgabe1.class b/8/Aufgabe1.class new file mode 100644 index 0000000..4f2d246 Binary files /dev/null and b/8/Aufgabe1.class differ diff --git a/8/Aufgabe1.java b/8/Aufgabe1.java new file mode 100644 index 0000000..05dbd60 --- /dev/null +++ b/8/Aufgabe1.java @@ -0,0 +1,33 @@ +import java.io.*; +import java.util.Scanner; + +public class Aufgabe1 { + public static void main(String arrgs[]) { //throws IOException + try { + FileOutputStream schreib = new FileOutputStream("speicher.txt"); + + FileInputStream lies = new FileInputStream("speicher.txt"); + + String zeile; + int z = 0; + + Scanner input = new Scanner(System.in); + + zeile = input.next(); + + schreib.write(zeile.getBytes(),0,zeile.length()); // Schreibt String zeile in Datei + schreib.close(); + while((z=lies.read())!=-1){ // liest jede Buchstabe als Zahl und umwandelt in char + System.out.print((char)z); + //lies.close(); + } + lies.close(); + + } catch(FileNotFoundException e) { + System.out.println("Datei wurde nicht gefunden"); + } catch (IOException e) { + System.out.println("Fehler: " + e.getMessage()); + } + } + +} \ No newline at end of file diff --git a/8/Aufgabe1.~ava b/8/Aufgabe1.~ava new file mode 100644 index 0000000..05dbd60 --- /dev/null +++ b/8/Aufgabe1.~ava @@ -0,0 +1,33 @@ +import java.io.*; +import java.util.Scanner; + +public class Aufgabe1 { + public static void main(String arrgs[]) { //throws IOException + try { + FileOutputStream schreib = new FileOutputStream("speicher.txt"); + + FileInputStream lies = new FileInputStream("speicher.txt"); + + String zeile; + int z = 0; + + Scanner input = new Scanner(System.in); + + zeile = input.next(); + + schreib.write(zeile.getBytes(),0,zeile.length()); // Schreibt String zeile in Datei + schreib.close(); + while((z=lies.read())!=-1){ // liest jede Buchstabe als Zahl und umwandelt in char + System.out.print((char)z); + //lies.close(); + } + lies.close(); + + } catch(FileNotFoundException e) { + System.out.println("Datei wurde nicht gefunden"); + } catch (IOException e) { + System.out.println("Fehler: " + e.getMessage()); + } + } + +} \ No newline at end of file diff --git a/8/Aufgabe3.class b/8/Aufgabe3.class new file mode 100644 index 0000000..02b83e7 Binary files /dev/null and b/8/Aufgabe3.class differ diff --git a/8/Aufgabe3.java b/8/Aufgabe3.java new file mode 100644 index 0000000..ff73aef --- /dev/null +++ b/8/Aufgabe3.java @@ -0,0 +1,28 @@ +import java.io.*; +import java.util.Scanner; +public class Aufgabe3 { + public static void main(String arrgs[]) { + try { + Scanner input = new Scanner(System.in); + FileOutputStream schreib = new FileOutputStream("speicher.txt"); + + + String zeile; + + + for (int i = 0;i <10 ;i++ ) { + zeile = input.next(); + zeile += '\n'; + schreib.write(zeile.getBytes(),0,zeile.length()); + } + + + schreib.close(); + } catch(FileNotFoundException e) { + System.out.println("Datei wurde nicht gefunden"); + } catch (IOException e) { + System.out.println("Fehler: " + e.getMessage()); + } + } + +} \ No newline at end of file diff --git a/8/Aufgabe3.~ava b/8/Aufgabe3.~ava new file mode 100644 index 0000000..ed61837 --- /dev/null +++ b/8/Aufgabe3.~ava @@ -0,0 +1,30 @@ +import java.io.*; +import java.util.Scanner; +public class Aufgabe3 { + public static void main(String arrgs[]) { + try { + Scanner input = new Scanner(System.in); + FileOutputStream schreib = new FileOutputStream("speicher.txt"); + + + String zeile; + + + + + for (int i = 0;i <10 ;i++ ) { + zeile = input.next(); + zeile += '\n'; + schreib.write(zeile.getBytes(),0,zeile.length()); + } + + + schreib.close(); + } catch(FileNotFoundException e) { + System.out.println("Datei wurde nicht gefunden"); + } catch (IOException e) { + System.out.println("Fehler: " + e.getMessage()); + } + } + +} \ No newline at end of file diff --git a/8/Test.class b/8/Test.class new file mode 100644 index 0000000..8bd134b Binary files /dev/null and b/8/Test.class differ diff --git a/8/Test.java b/8/Test.java new file mode 100644 index 0000000..ea53471 --- /dev/null +++ b/8/Test.java @@ -0,0 +1,28 @@ +import java.io.*; +import java.io.FileInputStream; +import java.util.Scanner; +import java.io.FileOutputStream; +public class Test { + public static void main(String arrgs[]) throws IOException { + //FileOutputStream schreib = new FileOutputStream("speicher.txt"); + + FileInputStream lies = new FileInputStream("speicher.txt"); + + String zeile; + int z = 0; + + Scanner input = new Scanner(System.in); + + //zeile = input.next(); + + //schreib.write(zeile.getBytes(),0,zeile.length()); + + //schreib.close(); + + while((z=lies.read())!=-1){ + System.out.print((char)z); + } + lies.close(); + } + +} \ No newline at end of file diff --git a/8/Test.~ava b/8/Test.~ava new file mode 100644 index 0000000..3da28e7 --- /dev/null +++ b/8/Test.~ava @@ -0,0 +1,28 @@ +import java.io.*; +import java.io.FileInputStream; +import java.util.Scanner; +import java.io.FileOutputStream; +public class Test { + public static void main(String arrgs[]) throws IOException { + FileOutputStream schreib = new FileOutputStream("speicher.txt"); + + FileInputStream lies = new FileInputStream("speicher.txt"); + + String zeile; + int z = 0; + + Scanner input = new Scanner(System.in); + + zeile = input.next(); + + schreib.write(zeile.getBytes(),0,zeile.length()); + + schreib.close(); + + while((z=lies.read())!=-1){ + System.out.print((char)z); + } + lies.close(); + } + +} \ No newline at end of file diff --git a/8/speicher.txt b/8/speicher.txt new file mode 100644 index 0000000..f00c965 --- /dev/null +++ b/8/speicher.txt @@ -0,0 +1,10 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 diff --git a/9/.gitingore b/9/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/9/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/9/Artikel.class b/9/Artikel.class new file mode 100644 index 0000000..f40fb42 Binary files /dev/null and b/9/Artikel.class differ diff --git a/9/Artikel.java b/9/Artikel.java new file mode 100644 index 0000000..22522dd --- /dev/null +++ b/9/Artikel.java @@ -0,0 +1,64 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author + */ + +public class Artikel { + + // Anfang Attribute + private int artikelNr; + private String artikelBez; + private double ekPreis; + private int bestand; + // Ende Attribute + + public Artikel(int artikelNr, String artikelBez, double ekPreis, int bestand) { + this.artikelNr = artikelNr; + this.artikelBez = artikelBez; + this.ekPreis = ekPreis; + this.bestand = bestand; + } + + // Anfang Methoden + public int getArtikelNr() { + return artikelNr; + } + + public void setArtikelNr(int artikelNrNeu) { + artikelNr = artikelNrNeu; + } + + public String getArtikelBez() { + return artikelBez; + } + + public void setArtikelBez(String artikelBezNeu) { + artikelBez = artikelBezNeu; + } + + public double getEkPreis() { + return ekPreis; + } + + public void setEkPreis(double ekPreisNeu) { + ekPreis = ekPreisNeu; + } + + public int getBestand() { + return bestand; + } + + public void setBestand(int bestandNeu) { + bestand = bestandNeu; + } + + public double artikelWert() { + + return bestand*ekPreis; + } + + // Ende Methoden +} // end of Artikel diff --git a/9/Artikel.uml b/9/Artikel.uml new file mode 100644 index 0000000..1475df3 --- /dev/null +++ b/9/Artikel.uml @@ -0,0 +1,27 @@ +[Files] +File0=Artikel.java + +[Box: - Artikel] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/9/Artikel.~ava b/9/Artikel.~ava new file mode 100644 index 0000000..3c44701 --- /dev/null +++ b/9/Artikel.~ava @@ -0,0 +1,64 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author + */ + +public class Artikel { + + // Anfang Attribute + public int artikelNr; + private String artikelBez; + private double ekPreis; + private int bestand; + // Ende Attribute + + public Artikel(int artikelNr, String artikelBez, double ekPreis, int bestand) { + this.artikelNr = artikelNr; + this.artikelBez = artikelBez; + this.ekPreis = ekPreis; + this.bestand = bestand; + } + + // Anfang Methoden + public int getArtikelNr() { + return artikelNr; + } + + public void setArtikelNr(int artikelNrNeu) { + artikelNr = artikelNrNeu; + } + + public String getArtikelBez() { + return artikelBez; + } + + public void setArtikelBez(String artikelBezNeu) { + artikelBez = artikelBezNeu; + } + + public double getEkPreis() { + return ekPreis; + } + + public void setEkPreis(double ekPreisNeu) { + ekPreis = ekPreisNeu; + } + + public int getBestand() { + return bestand; + } + + public void setBestand(int bestandNeu) { + bestand = bestandNeu; + } + + public double artikelWert() { + // TODO hier Quelltext einfügen + return 0; + } + + // Ende Methoden +} // end of Artikel diff --git a/9/Aufgabe1A.class b/9/Aufgabe1A.class new file mode 100644 index 0000000..90e7cf9 Binary files /dev/null and b/9/Aufgabe1A.class differ diff --git a/9/Aufgabe1A.java b/9/Aufgabe1A.java new file mode 100644 index 0000000..2ed77d3 --- /dev/null +++ b/9/Aufgabe1A.java @@ -0,0 +1,33 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author + */ + +public class Aufgabe1A { + + // Anfang Attribute + // Ende Attribute + + // Anfang Methoden + public static void main(String args[]) { + Rechteck sq = new Rechteck(); + sq.seiteA = 5; + sq.seiteB = 8; + + + System.out.println("SeiteA: " + sq.seiteA + " cm"); + System.out.println("SeiteB: " + sq.seiteB+ " cm"); + sq.berechneFlaeche(); + + Kreis kr = new Kreis(); + kr.radius = 5.0; + System.out.println("Radius: " + kr.radius); + kr.berechneU(); + kr.berechneF(); + } + + // Ende Methoden +} // end of Aufgabe1A diff --git a/9/Aufgabe1A.uml b/9/Aufgabe1A.uml new file mode 100644 index 0000000..cbed14a --- /dev/null +++ b/9/Aufgabe1A.uml @@ -0,0 +1,27 @@ +[Files] +File0=Aufgabe1A.java + +[Box: - Aufgabe1A] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/9/Aufgabe1A.~ava b/9/Aufgabe1A.~ava new file mode 100644 index 0000000..a10dd79 --- /dev/null +++ b/9/Aufgabe1A.~ava @@ -0,0 +1,33 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author + */ + +public class Aufgabe1A { + + // Anfang Attribute + // Ende Attribute + + // Anfang Methoden + public static void main(String args[]) { + Rechteck sq = new Rechteck(); + sq.seiteA = 5; + sq.seiteB = 8; + + + System.out.println("SeiteA: " + sq.seiteA + " cm"); + System.out.println("SeiteB: " + sq.seiteB+ " cm"); + sq.berechneFlaeche(); + + Kreis kr = new Kreis(); + kr.radius = 4.0; + System.out.println("Radius: " + kr.radius); + kr.berechneU(); + kr.berechneF(); + } + + // Ende Methoden +} // end of Aufgabe1A diff --git a/9/Aufgabe2A.class b/9/Aufgabe2A.class new file mode 100644 index 0000000..c001574 Binary files /dev/null and b/9/Aufgabe2A.class differ diff --git a/9/Aufgabe2A.java b/9/Aufgabe2A.java new file mode 100644 index 0000000..9f207b4 --- /dev/null +++ b/9/Aufgabe2A.java @@ -0,0 +1,31 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author + */ + +public class Aufgabe2A { + + public static void main(String args[]) { + Artikel[] lage = new Artikel[5]; + double gesamtLageWert = 0; + + lage[0] = new Artikel(815,"Reifen",4.35,8); + lage[1] = new Artikel(1435,"Klingel",6.94,12); + lage[2] = new Artikel(37,"Rücklicht",12.52,24); + lage[3] = new Artikel(294,"Vorderlicht",17.28,18); + lage[4] = new Artikel(536,"Sattel",29.94,15); + + + for (int i = 0; i < lage.length; i++) { + double artikelWert = lage[i].artikelWert(); + gesamtLageWert+= artikelWert; + System.out.println("ArtikelName: " + lage[i].getArtikelBez() + " , ArtikelWert: "+artikelWert); + } + System.out.println("GesamteWert: " + gesamtLageWert); + } + + // Ende Methoden +} // end of Aufgabe2A diff --git a/9/Aufgabe2A.uml b/9/Aufgabe2A.uml new file mode 100644 index 0000000..b786b19 --- /dev/null +++ b/9/Aufgabe2A.uml @@ -0,0 +1,27 @@ +[Files] +File0=Aufgabe2A.java + +[Box: - Aufgabe2A] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/9/Aufgabe2A.~ava b/9/Aufgabe2A.~ava new file mode 100644 index 0000000..affc1f8 --- /dev/null +++ b/9/Aufgabe2A.~ava @@ -0,0 +1,31 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author + */ + +public class Aufgabe2A { + + public static void main() { + Artikel[] lage = new Artikel[5]; + double gesamtLageWert = 0; + + lage[0] = new Artikel(815,"Reifen",4.35,8); + lage[1] = new Artikel(1435,"Klingel",6.94,12); + lage[2] = new Artikel(37,"Rücklicht",12.52,24); + lage[3] = new Artikel(294,"Vorderlicht",17.28,18); + lage[4] = new Artikel(536,"Sattel",29.94,15); + + + for (int i = 0; i < lage.length; i++) { + double artikelWert = lage[i].artikelWert(); + gesamtLageWert+= artikelWert; + System.out.println("ArtikelName: " + lage[i].getArtikelBez() + " , ArtikelWert: "+artikelWert); + } + System.out.println("GesamteWert: " + gesamtLageWert); + } + + // Ende Methoden +} // end of Aufgabe2A diff --git a/9/Auto.class b/9/Auto.class new file mode 100644 index 0000000..beb8ba0 Binary files /dev/null and b/9/Auto.class differ diff --git a/9/Auto.java b/9/Auto.java new file mode 100644 index 0000000..37444e4 --- /dev/null +++ b/9/Auto.java @@ -0,0 +1,85 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author Fesenko + */ + +public class Auto { + + // Anfang Attribute + private int anzahlTueren; + public String hersteller; + private String typ; + private int kilometerStand; + private double tankinhalt; + private double tankvebrauch; + public double maxTankinhalt; + // Ende Attribute + + // Anfang Methoden + public int getAnzahlTueren() { + return anzahlTueren; + } + + public void setAnzahlTueren(int anzahlTuerenNeu) { + if(anzahlTuerenNeu < 2 || anzahlTuerenNeu < 7) { + anzahlTueren = anzahlTuerenNeu; + } + else { + System.out.println("Zu viel Türen"); + } // end of if-else + + } + + public int getKilometerStand() { + return kilometerStand; + } + + public void setKilometerStand(int kilometerStandNeu) { + kilometerStand = kilometerStandNeu; + } + + public void fahren(int km) { + if(km <= ((100)/tankvebrauch)*tankinhalt) { + System.out.println("Gefahren: " + km + " km!"); + kilometerStand += km; + tankinhalt -= (km*(tankvebrauch/100)); + } + else { + System.out.println("man könnte nur: " + ((100)/tankvebrauch)*tankinhalt + " km maximal fahren!"); + } + + + } + + public double getTankinhalt() { + return tankinhalt; + } + + public void setTankinhalt(double tankinhaltNeu) { + tankinhalt = tankinhaltNeu; + } + + public double getTankvebrauch() { + return tankvebrauch; + } + + public void setTankvebrauch(double tankvebrauchNeu) { + tankvebrauch = tankvebrauchNeu; + } + + public void tanken(double anzahl) { + if(anzahl+tankinhalt > maxTankinhalt) { + System.out.println("Es ist zu viel"); + + } + else { + tankinhalt += anzahl; + } // end of if-else + + } + + // Ende Methoden +} // end of Auto diff --git a/9/Auto.uml b/9/Auto.uml new file mode 100644 index 0000000..67bb885 --- /dev/null +++ b/9/Auto.uml @@ -0,0 +1,27 @@ +[Files] +File0=Auto.java + +[Box: - Auto] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/9/Auto.~ava b/9/Auto.~ava new file mode 100644 index 0000000..fa4dad0 --- /dev/null +++ b/9/Auto.~ava @@ -0,0 +1,79 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author Fesenko + */ + +public class Auto { + + // Anfang Attribute + private int anzahlTueren; + public String hersteller; + private String typ; + private int kilometerStand; + private double tankinhalt; + private double tankvebrauch; + public double maxTankinhalt; + // Ende Attribute + + // Anfang Methoden + public int getAnzahlTueren() { + return anzahlTueren; + } + + public void setAnzahlTueren(int anzahlTuerenNeu) { + if(anzahlTuerenNeu < 2 || anzahlTuerenNeu < 7) { + anzahlTueren = anzahlTuerenNeu; + } + else { + System.out.println("Zu viel Türen"); + } // end of if-else + + } + + public int getKilometerStand() { + return kilometerStand; + } + + public void setKilometerStand(int kilometerStandNeu) { + kilometerStand = kilometerStandNeu; + } + + public void fahren(int km) { + System.out.println("Gefahren: " + km + " km!"); + kilometerStand += km; + tankinhalt -= (km*(tankvebrauch/100)); + System.out.println("man könnte noch: " + ((100)/tankvebrauch)*tankinhalt + " km fahren!"); + } + + public double getTankinhalt() { + return tankinhalt; + } + + public void setTankinhalt(double tankinhaltNeu) { + tankinhalt = tankinhaltNeu; + } + + public double getTankvebrauch() { + return tankvebrauch; + } + + public void setTankvebrauch(double tankvebrauchNeu) { + tankvebrauch = tankvebrauchNeu; + } + + public void tanken(double anzahl) { + if(anzahl+tankinhalt > maxTankinhalt) { + System.out.println("Es ist zu viel"); + + } + else { + tankinhalt += anzahl; + } // end of if-else + + } + + // Ende Methoden +} // end of Auto diff --git a/9/AutoAufruf.class b/9/AutoAufruf.class new file mode 100644 index 0000000..5ddabfb Binary files /dev/null and b/9/AutoAufruf.class differ diff --git a/9/AutoAufruf.java b/9/AutoAufruf.java new file mode 100644 index 0000000..e5911b4 --- /dev/null +++ b/9/AutoAufruf.java @@ -0,0 +1,32 @@ + +public class AutoAufruf { + + public static void main(String args[]) { + Auto car = new Auto(); + + car.setAnzahlTueren(5); + car.hersteller = "VW GOLF"; + car.maxTankinhalt = 70.0; + car.setKilometerStand(32768); + car.setTankinhalt(60.0); + car.setTankvebrauch(6.4); + + System.out.println("Hersteller: " + car.hersteller); + System.out.println("Türen: " + car.getAnzahlTueren()); + System.out.println("KilometerStand: " + car.getKilometerStand()); + System.out.println("Tankinhalt: " + car.getTankinhalt()); + System.out.println("Tankinvebrauch: " + car.getTankvebrauch()); + + car.fahren(100); + System.out.println("KilometerStand: " + car.getKilometerStand()); + System.out.println("Tankinhalt: " + car.getTankinhalt()); + + car.fahren(1000); + System.out.println("KilometerStand: " + car.getKilometerStand()); + System.out.println("Tankinhalt: " + car.getTankinhalt()); + + car.tanken(10); + System.out.println("Tankinhalt: " + car.getTankinhalt()); + } + +} \ No newline at end of file diff --git a/9/AutoAufruf.uml b/9/AutoAufruf.uml new file mode 100644 index 0000000..014024b --- /dev/null +++ b/9/AutoAufruf.uml @@ -0,0 +1,27 @@ +[Files] +File0=AutoAufruf.java + +[Box: - AutoAufruf] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/9/AutoAufruf.~ava b/9/AutoAufruf.~ava new file mode 100644 index 0000000..e1f05ce --- /dev/null +++ b/9/AutoAufruf.~ava @@ -0,0 +1,28 @@ + +public class AutoAufruf { + + public static void main(String args[]) { + Auto car = new Auto(); + + car.setAnzahlTueren(5); + car.hersteller = "VW GOLF"; + car.maxTankinhalt = 70.0; + car.setKilometerStand(32768); + car.setTankinhalt(60.0); + car.setTankvebrauch(6.4); + + System.out.println("Hersteller: " + car.hersteller); + System.out.println("Türen: " + car.getAnzahlTueren()); + System.out.println("KilometerStand: " + car.getKilometerStand()); + System.out.println("Tankinhalt: " + car.getTankinhalt()); + System.out.println("Tankinvebrauch: " + car.getTankvebrauch()); + + car.fahren(938); + System.out.println("KilometerStand: " + car.getKilometerStand()); + System.out.println("Tankinhalt: " + car.getTankinhalt()); + + car.tanken(10); + System.out.println("Tankinhalt: " + car.getTankinhalt()); + } + +} \ No newline at end of file diff --git a/9/Kreis.class b/9/Kreis.class new file mode 100644 index 0000000..f19d142 Binary files /dev/null and b/9/Kreis.class differ diff --git a/9/Kreis.java b/9/Kreis.java new file mode 100644 index 0000000..bf1a167 --- /dev/null +++ b/9/Kreis.java @@ -0,0 +1,26 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author + */ + +public class Kreis { + + // Anfang Attribute + public double radius; + // Ende Attribute + + // Anfang Methoden + public void berechneU() { + System.out.println("UMfang: " + (2 * radius * Math.PI)); + + } + + public void berechneF() { + System.out.println("Fläche: "+ (Math.PI * Math.pow(radius,2) )); + } + + // Ende Methoden +} // end of Kreis diff --git a/9/Kreis.uml b/9/Kreis.uml new file mode 100644 index 0000000..5c659f5 --- /dev/null +++ b/9/Kreis.uml @@ -0,0 +1,27 @@ +[Files] +File0=Kreis.java + +[Box: - Kreis] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/9/Kreis.~ava b/9/Kreis.~ava new file mode 100644 index 0000000..3303019 --- /dev/null +++ b/9/Kreis.~ava @@ -0,0 +1,26 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author + */ + +public class Kreis { + + // Anfang Attribute + public double radius; + // Ende Attribute + + // Anfang Methoden + public void berechneU() { + System.out.println("UMfang: " + (2 * radius * Math.PI)); + + } + + public void berechneF() { + System.out.println("Fläche: "+ (Math.PI * Math.pow(radius,2) ); + } + + // Ende Methoden +} // end of Kreis diff --git a/9/Rechteck.class b/9/Rechteck.class new file mode 100644 index 0000000..8508556 Binary files /dev/null and b/9/Rechteck.class differ diff --git a/9/Rechteck.java b/9/Rechteck.java new file mode 100644 index 0000000..6de752c --- /dev/null +++ b/9/Rechteck.java @@ -0,0 +1,24 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author + */ + +public class Rechteck { + + // Anfang Attribute + public int seiteA; + public int seiteB; + // Ende Attribute + + // Anfang Methoden + + public void berechneFlaeche() { + System.out.println("Fläche: " + (seiteA*seiteB) + "cm²"); + + } + + // Ende Methoden +} // end of Rechteck diff --git a/9/Rechteck.uml b/9/Rechteck.uml new file mode 100644 index 0000000..a64479d --- /dev/null +++ b/9/Rechteck.uml @@ -0,0 +1,27 @@ +[Files] +File0=Rechteck.java + +[Box: - Rechteck] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/9/Rechteck.~ava b/9/Rechteck.~ava new file mode 100644 index 0000000..21f71d7 --- /dev/null +++ b/9/Rechteck.~ava @@ -0,0 +1,24 @@ +/** + * + * Beschreibung + * + * @version 1.0 vom 11.03.2025 + * @author + */ + +public class Rechteck { + + // Anfang Attribute + public int seiteA; + public int seiteB; + // Ende Attribute + + // Anfang Methoden + + public void berechneFlaeche() { + System.out.println("Fläche: " + (seiteA*seiteB)); + + } + + // Ende Methoden +} // end of Rechteck diff --git a/Auto.uml b/Auto.uml new file mode 100644 index 0000000..67bb885 --- /dev/null +++ b/Auto.uml @@ -0,0 +1,27 @@ +[Files] +File0=Auto.java + +[Box: - Auto] +X=20 +Y=40 +MinVis=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 + +[Diagram] +comments=0 +OffsetX=0 +OffsetY=0 +Visibility=0 +ShowParameter=4 +SortOrder=0 +ShowIcons=1 +ShowConnections=0 +Fontname=Segoe UI +Fontsize=12 +ShowObjectDiagram=0 + +[Interactive] +I0= + diff --git a/fx/.gitingore b/fx/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/fx/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/fx/error.txt b/fx/error.txt new file mode 100644 index 0000000..e69de29 diff --git a/fx/sed.class b/fx/sed.class new file mode 100644 index 0000000..b730121 Binary files /dev/null and b/fx/sed.class differ diff --git a/fx/sed.java b/fx/sed.java new file mode 100644 index 0000000..ab966b1 --- /dev/null +++ b/fx/sed.java @@ -0,0 +1,90 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.collections.*; +import javafx.scene.control.*; +import javafx.scene.control.cell.TextFieldListCell; +import javafx.util.StringConverter; +import javafx.util.converter.DefaultStringConverter; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.event.*; +import java.util.Arrays; + +/** + * + * Beschreibung + * + * @version 1.0 vom 22.01.2025 + * @author + */ + +public class sed extends Application { + // Anfang Attribute + private ListView listView1 = new ListView<>(); + private ObservableList zahlen = + FXCollections.observableArrayList(); + private Label label1 = new Label(); + private Button button1 = new Button(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 447, 224); + + StringConverter converter = new DefaultStringConverter(); + // Anfang Komponenten + + listView1.setLayoutX(16); + listView1.setLayoutY(8); + listView1.setPrefHeight(176); + listView1.setPrefWidth(120); + listView1.setItems(zahlen); + listView1.setEditable(true); + listView1.setCellFactory(param -> new TextFieldListCell<>(converter)); + + zahlen.add("1000"); + zahlen.add("182"); + zahlen.add("14"); + zahlen.add("341"); + zahlen.add("161"); + root.getChildren().add(listView1); + label1.setLayoutX(160); + label1.setLayoutY(16); + label1.setPrefHeight(24); + label1.setPrefWidth(80); + label1.setText("Antwort"); + label1.setFont(Font.font("Dialog", 11)); + root.getChildren().add(label1); + button1.setLayoutX(160); + button1.setLayoutY(48); + button1.setPrefHeight(24); + button1.setPrefWidth(80); + button1.setText("Button"); + button1.setOnAction( + (event) -> {button1_Action(event);} + ); + button1.setFont(Font.font("Dialog", 11)); + root.getChildren().add(button1); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("sed"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public sed + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void button1_Action(Event evt) { + zahlen.sorted() + + } // end of button1_Action + + // Ende Methoden +} // end of class sed diff --git a/fx/sed.jfm b/fx/sed.jfm new file mode 100644 index 0000000..efe5556 --- /dev/null +++ b/fx/sed.jfm @@ -0,0 +1,149 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 985 + Top = 436 + BorderIcons = [biSystemMenu] + Caption = 'sed' + ClientHeight = 224 + ClientWidth = 451 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnCanResize = FormCanResize + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'sed' + FontSize = 11 + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object listView1: TFXListView + Tag = 109 + Left = 16 + Top = 8 + Width = 120 + Height = 176 + Hint = 'listView1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = 13158600 + JavaType = 'ListView' + LayoutX = 16 + LayoutY = 8 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 176 + PrefWidth = 120 + SnapToPixel = False + Editable = False + FixedCellSize = -1 + Items.Strings = ( + 'Amerika' + 'Europa' + 'Asien') + Orientation = VERTICAL + SelectionMode = SINGLE + end + object label1: TFXLabel + Tag = 101 + Left = 160 + Top = 16 + Width = 80 + Height = 24 + Hint = 'label1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 160 + LayoutY = 16 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Label' + TextAlignment = _TA_LEFT + WrapText = False + end + object button1: TFXButton + Tag = 105 + Left = 160 + Top = 48 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 160 + LayoutY = 48 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Button' + TextAlignment = _TA_LEFT + WrapText = False + action = 'button1_Action' + CancelButton = False + DefaultButton = False + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/fx/sed.~ava b/fx/sed.~ava new file mode 100644 index 0000000..b7ca6f6 --- /dev/null +++ b/fx/sed.~ava @@ -0,0 +1,89 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.collections.*; +import javafx.scene.control.*; +import javafx.scene.control.cell.TextFieldListCell; +import javafx.util.StringConverter; +import javafx.util.converter.DefaultStringConverter; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.event.*; + +/** + * + * Beschreibung + * + * @version 1.0 vom 22.01.2025 + * @author + */ + +public class sed extends Application { + // Anfang Attribute + private ListView listView1 = new ListView<>(); + private ObservableList zahlen = + FXCollections.observableArrayList(); + private Label label1 = new Label(); + private Button button1 = new Button(); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 447, 224); + + StringConverter converter = new DefaultStringConverter(); + // Anfang Komponenten + + listView1.setLayoutX(16); + listView1.setLayoutY(8); + listView1.setPrefHeight(176); + listView1.setPrefWidth(120); + listView1.setItems(zahlen); + listView1.setEditable(true); + listView1.setCellFactory(param -> new TextFieldListCell<>(converter)); + + zahlen.add("1000"); + zahlen.add("182"); + zahlen.add("14"); + zahlen.add("341"); + zahlen.add("161"); + root.getChildren().add(listView1); + label1.setLayoutX(160); + label1.setLayoutY(16); + label1.setPrefHeight(24); + label1.setPrefWidth(80); + label1.setText("Antwort"); + label1.setFont(Font.font("Dialog", 11)); + root.getChildren().add(label1); + button1.setLayoutX(160); + button1.setLayoutY(48); + button1.setPrefHeight(24); + button1.setPrefWidth(80); + button1.setText("Button"); + button1.setOnAction( + (event) -> {button1_Action(event);} + ); + button1.setFont(Font.font("Dialog", 11)); + root.getChildren().add(button1); + // Ende Komponenten + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("sed"); + primaryStage.setScene(scene); + primaryStage.show(); + } // end of public sed + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + + public void button1_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of button1_Action + + // Ende Methoden +} // end of class sed diff --git a/fx/sed.~fm b/fx/sed.~fm new file mode 100644 index 0000000..efe5556 --- /dev/null +++ b/fx/sed.~fm @@ -0,0 +1,149 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 985 + Top = 436 + BorderIcons = [biSystemMenu] + Caption = 'sed' + ClientHeight = 224 + ClientWidth = 451 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnCanResize = FormCanResize + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'sed' + FontSize = 11 + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object listView1: TFXListView + Tag = 109 + Left = 16 + Top = 8 + Width = 120 + Height = 176 + Hint = 'listView1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = 13158600 + JavaType = 'ListView' + LayoutX = 16 + LayoutY = 8 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 176 + PrefWidth = 120 + SnapToPixel = False + Editable = False + FixedCellSize = -1 + Items.Strings = ( + 'Amerika' + 'Europa' + 'Asien') + Orientation = VERTICAL + SelectionMode = SINGLE + end + object label1: TFXLabel + Tag = 101 + Left = 160 + Top = 16 + Width = 80 + Height = 24 + Hint = 'label1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Label' + LayoutX = 160 + LayoutY = 16 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER_LEFT + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Label' + TextAlignment = _TA_LEFT + WrapText = False + end + object button1: TFXButton + Tag = 105 + Left = 160 + Top = 48 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 160 + LayoutY = 48 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Button' + TextAlignment = _TA_LEFT + WrapText = False + action = 'button1_Action' + CancelButton = False + DefaultButton = False + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/fx/wiederTesten.class b/fx/wiederTesten.class new file mode 100644 index 0000000..04d364e Binary files /dev/null and b/fx/wiederTesten.class differ diff --git a/fx/wiederTesten.java b/fx/wiederTesten.java new file mode 100644 index 0000000..bc4aa97 --- /dev/null +++ b/fx/wiederTesten.java @@ -0,0 +1,171 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.web.*; +import javafx.scene.control.*; +import javafx.event.*; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.scene.input.*; +import javafx.event.Event; + + +import javafx.scene.paint.Color; + + +/** + * + * Beschreibung + * + * @version 1.0 vom 17.12.2024 + * @author + */ + +public class wiederTesten extends Application { + // Anfang Attribute + private Pane pane1 = new Pane(); + private Button button1 = new Button(); + private Button button2 = new Button(); + private MenuBar menuBar1 = new MenuBar(); + private Menu menuBar1_File = new Menu("File"); + private Menu menuBar1_File_New = new Menu("New"); + private MenuItem menuBar1_File_New_Java = new MenuItem("Java"); + private MenuItem menuBar1_File_New_XML = new MenuItem("XML"); + private MenuItem menuBar1_File_Load = new MenuItem("Load"); + private MenuItem menuBar1_File_Save = new MenuItem("Save"); + private Menu menuBar1_Edit = new Menu("Edit"); + private MenuItem menuBar1_Edit_Copy = new MenuItem("Copy"); + private MenuItem menuBar1_Edit_Paste = new MenuItem("Paste"); + private SeparatorMenuItem menuBar1_Separator1 = new SeparatorMenuItem(); + private MenuItem menuBar1_Edit_Delete = new MenuItem("Delete"); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 540, 371); + scene.setFill(Color.CYAN); + // Anfang Komponenten + + pane1.setLayoutX(192); + pane1.setLayoutY(152); + pane1.setPrefHeight(144); + pane1.setPrefWidth(160); + root.getChildren().add(pane1); + button1.setLayoutX(24); + button1.setLayoutY(24); + button1.setPrefHeight(24); + button1.setPrefWidth(80); + button1.setText("Button"); + button1.setOnAction( + (event) -> {button1_Action(event);} + ); + button1.setFont(Font.font("Dialog", 11)); + root.getChildren().add(button1); + root.getChildren().add(menuBar1); + menuBar1.getMenus().add(menuBar1_File); + menuBar1_File.getItems().add(menuBar1_File_New); + menuBar1_File_New.getItems().add(menuBar1_File_New_Java); + menuBar1_File_New.getItems().add(menuBar1_File_New_XML); + menuBar1_File.getItems().add(menuBar1_File_Load); + menuBar1_File.getItems().add(menuBar1_File_Save); + menuBar1_File_Save.setAccelerator(KeyCombination.keyCombination("Ctrl+Shift+S")); + menuBar1.getMenus().add(menuBar1_Edit); + menuBar1_Edit.getItems().add(menuBar1_Edit_Copy); + menuBar1_Edit_Copy.setAccelerator(KeyCombination.keyCombination("Ctrl+C")); + menuBar1_Edit.getItems().add(menuBar1_Edit_Paste); + menuBar1_Edit_Paste.setAccelerator(KeyCombination.keyCombination("Ctrl+V")); + menuBar1_Edit.getItems().add(menuBar1_Separator1); + menuBar1_Edit.getItems().add(menuBar1_Edit_Delete); + menuBar1_File_New_Java.setOnAction( + (event) -> {menuBar1_File_New_Java_Action(event);} + ); + menuBar1_File_New_XML.setOnAction( + (event) -> {menuBar1_File_New_XML_Action(event);} + ); + menuBar1_File_Load.setOnAction( + (event) -> {menuBar1_File_Load_Action(event);} + ); + menuBar1_File_Save.setOnAction( + (event) -> {menuBar1_File_Save_Action(event);} + ); + menuBar1_Edit_Copy.setOnAction( + (event) -> {menuBar1_Edit_Copy_Action(event);} + ); + menuBar1_Edit_Paste.setOnAction( + (event) -> {menuBar1_Edit_Paste_Action(event);} + ); + menuBar1_Edit_Delete.setOnAction( + (event) -> {menuBar1_Edit_Delete_Action(event);} + ); + menuBar1.setPrefWidth(4000); + // Ende Komponenten + + button2.setLayoutX(0); + button2.setLayoutY(0); + + button2.setPrefWidth(100); + button2.setPrefHeight(50); + button2.setText("Open"); + button2.setOnAction( (event) -> {open(event);}); + pane1.getChildren().add(button2); + + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("wiederTesten"); + primaryStage.setScene(scene); + primaryStage.show(); + + } // end of public wiederTesten + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + public void open(Event evt) { + button2.setText("Close"); + + } + public void button1_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of button1_Action + + + public void menuBar1_File_New_Java_Action(Event evt) { + + + } // end of menuBar1_File_New_Java_Action + + public void menuBar1_File_New_XML_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_File_New_XML_Action + + public void menuBar1_File_Load_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_File_Load_Action + + public void menuBar1_File_Save_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_File_Save_Action + + public void menuBar1_Edit_Copy_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_Edit_Copy_Action + + public void menuBar1_Edit_Paste_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_Edit_Paste_Action + + public void menuBar1_Edit_Delete_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_Edit_Delete_Action + // Ende Methoden +} // end of class wiederTesten diff --git a/fx/wiederTesten.jfm b/fx/wiederTesten.jfm new file mode 100644 index 0000000..b74ee80 --- /dev/null +++ b/fx/wiederTesten.jfm @@ -0,0 +1,143 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 794 + Top = 459 + BorderIcons = [biSystemMenu] + Caption = 'wiederTesten' + ClientHeight = 371 + ClientWidth = 544 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnCanResize = FormCanResize + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'wiederTesten' + FontSize = 11 + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object pane1: TFXPane + Tag = 121 + Left = 192 + Top = 152 + Width = 160 + Height = 144 + Hint = 'pane1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Pane' + LayoutX = 192 + LayoutY = 152 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 144 + PrefWidth = 160 + SnapToPixel = False + end + object button1: TFXButton + Tag = 105 + Left = 24 + Top = 24 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 24 + LayoutY = 24 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Button' + TextAlignment = _TA_LEFT + WrapText = False + action = 'button1_Action' + CancelButton = False + DefaultButton = False + end + object menuBar1: TFXMenuBarWithMenus + Tag = 124 + Left = 0 + Top = 0 + Width = 540 + Height = 23 + Hint = 'menuBar1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = 16053492 + JavaType = 'MenuBar' + LayoutX = 0 + LayoutY = 0 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 23 + PrefWidth = 540 + SnapToPixel = False + MenuItems.Strings = ( + 'File' + ' New' + ' Java' + ' XML' + ' Load' + ' Save, Ctrl+Shift+S' + 'Edit' + ' Copy, Ctrl+C' + ' Paste, Ctrl+V' + ' -' + ' Delete') + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/fx/wiederTesten.~ava b/fx/wiederTesten.~ava new file mode 100644 index 0000000..12a5a36 --- /dev/null +++ b/fx/wiederTesten.~ava @@ -0,0 +1,171 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; +import javafx.scene.web.*; +import javafx.scene.control.*; +import javafx.event.*; +import javafx.scene.text.*; +import javafx.scene.text.Font; +import javafx.scene.input.*; +import javafx.event.Event; +import java.awt.Color; + +import javafx.scene.paint.Color; + + +/** + * + * Beschreibung + * + * @version 1.0 vom 17.12.2024 + * @author + */ + +public class wiederTesten extends Application { + // Anfang Attribute + private Pane pane1 = new Pane(); + private Button button1 = new Button(); + private Button button2 = new Button(); + private MenuBar menuBar1 = new MenuBar(); + private Menu menuBar1_File = new Menu("File"); + private Menu menuBar1_File_New = new Menu("New"); + private MenuItem menuBar1_File_New_Java = new MenuItem("Java"); + private MenuItem menuBar1_File_New_XML = new MenuItem("XML"); + private MenuItem menuBar1_File_Load = new MenuItem("Load"); + private MenuItem menuBar1_File_Save = new MenuItem("Save"); + private Menu menuBar1_Edit = new Menu("Edit"); + private MenuItem menuBar1_Edit_Copy = new MenuItem("Copy"); + private MenuItem menuBar1_Edit_Paste = new MenuItem("Paste"); + private SeparatorMenuItem menuBar1_Separator1 = new SeparatorMenuItem(); + private MenuItem menuBar1_Edit_Delete = new MenuItem("Delete"); + // Ende Attribute + + public void start(Stage primaryStage) { + Pane root = new Pane(); + Scene scene = new Scene(root, 540, 371); + scene.setFill(Color.CYAN); + // Anfang Komponenten + + pane1.setLayoutX(192); + pane1.setLayoutY(152); + pane1.setPrefHeight(144); + pane1.setPrefWidth(160); + root.getChildren().add(pane1); + button1.setLayoutX(24); + button1.setLayoutY(24); + button1.setPrefHeight(24); + button1.setPrefWidth(80); + button1.setText("Button"); + button1.setOnAction( + (event) -> {button1_Action(event);} + ); + button1.setFont(Font.font("Dialog", 11)); + root.getChildren().add(button1); + root.getChildren().add(menuBar1); + menuBar1.getMenus().add(menuBar1_File); + menuBar1_File.getItems().add(menuBar1_File_New); + menuBar1_File_New.getItems().add(menuBar1_File_New_Java); + menuBar1_File_New.getItems().add(menuBar1_File_New_XML); + menuBar1_File.getItems().add(menuBar1_File_Load); + menuBar1_File.getItems().add(menuBar1_File_Save); + menuBar1_File_Save.setAccelerator(KeyCombination.keyCombination("Ctrl+Shift+S")); + menuBar1.getMenus().add(menuBar1_Edit); + menuBar1_Edit.getItems().add(menuBar1_Edit_Copy); + menuBar1_Edit_Copy.setAccelerator(KeyCombination.keyCombination("Ctrl+C")); + menuBar1_Edit.getItems().add(menuBar1_Edit_Paste); + menuBar1_Edit_Paste.setAccelerator(KeyCombination.keyCombination("Ctrl+V")); + menuBar1_Edit.getItems().add(menuBar1_Separator1); + menuBar1_Edit.getItems().add(menuBar1_Edit_Delete); + menuBar1_File_New_Java.setOnAction( + (event) -> {menuBar1_File_New_Java_Action(event);} + ); + menuBar1_File_New_XML.setOnAction( + (event) -> {menuBar1_File_New_XML_Action(event);} + ); + menuBar1_File_Load.setOnAction( + (event) -> {menuBar1_File_Load_Action(event);} + ); + menuBar1_File_Save.setOnAction( + (event) -> {menuBar1_File_Save_Action(event);} + ); + menuBar1_Edit_Copy.setOnAction( + (event) -> {menuBar1_Edit_Copy_Action(event);} + ); + menuBar1_Edit_Paste.setOnAction( + (event) -> {menuBar1_Edit_Paste_Action(event);} + ); + menuBar1_Edit_Delete.setOnAction( + (event) -> {menuBar1_Edit_Delete_Action(event);} + ); + menuBar1.setPrefWidth(4000); + // Ende Komponenten + + button2.setLayoutX(0); + button2.setLayoutY(0); + + button2.setPrefWidth(100); + button2.setPrefHeight(50); + button2.setText("Open"); + button2.setOnAction( (event) -> {open(event);}); + pane1.getChildren().add(button2); + + + primaryStage.setOnCloseRequest(e -> System.exit(0)); + primaryStage.setTitle("wiederTesten"); + primaryStage.setScene(scene); + primaryStage.show(); + + } // end of public wiederTesten + + // Anfang Methoden + + public static void main(String[] args) { + launch(args); + } // end of main + public void open(Event evt) { + button2.setText("Close"); + + } + public void button1_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of button1_Action + + + public void menuBar1_File_New_Java_Action(Event evt) { + + + } // end of menuBar1_File_New_Java_Action + + public void menuBar1_File_New_XML_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_File_New_XML_Action + + public void menuBar1_File_Load_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_File_Load_Action + + public void menuBar1_File_Save_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_File_Save_Action + + public void menuBar1_Edit_Copy_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_Edit_Copy_Action + + public void menuBar1_Edit_Paste_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_Edit_Paste_Action + + public void menuBar1_Edit_Delete_Action(Event evt) { + // TODO hier Quelltext einfügen + + } // end of menuBar1_Edit_Delete_Action + // Ende Methoden +} // end of class wiederTesten diff --git a/fx/wiederTesten.~fm b/fx/wiederTesten.~fm new file mode 100644 index 0000000..b74ee80 --- /dev/null +++ b/fx/wiederTesten.~fm @@ -0,0 +1,143 @@ +object FGUIForm: TFXGuiForm + Tag = 180 + Left = 794 + Top = 459 + BorderIcons = [biSystemMenu] + Caption = 'wiederTesten' + ClientHeight = 371 + ClientWidth = 544 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poDesigned + Visible = True + OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged + OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged + OnCanResize = FormCanResize + OnClose = FormClose + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnMouseActivate = FormMouseActivate + OnResize = FormResize + FrameType = 8 + Modified = False + Resizable = True + Undecorated = False + Background = clBtnFace + Title = 'wiederTesten' + FontSize = 11 + X = 0 + Y = 0 + FullScreen = False + AlwaysOnTop = False + Iconified = False + MaxHeight = 0 + MaxWidth = 0 + MinHeight = 0 + MinWidth = 0 + showing = '' + TextHeight = 15 + object pane1: TFXPane + Tag = 121 + Left = 192 + Top = 152 + Width = 160 + Height = 144 + Hint = 'pane1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Pane' + LayoutX = 192 + LayoutY = 152 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 144 + PrefWidth = 160 + SnapToPixel = False + end + object button1: TFXButton + Tag = 105 + Left = 24 + Top = 24 + Width = 80 + Height = 24 + Hint = 'button1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = clBtnFace + JavaType = 'Button' + LayoutX = 24 + LayoutY = 24 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 24 + PrefWidth = 80 + SnapToPixel = False + Alignment = CENTER + ContentDisplay = _CD_LEFT + EllipsisString = '...' + Underline = False + TextFill = 3355443 + GraphicTextGap = 4 + MnemonicParsing = False + Text = 'Button' + TextAlignment = _TA_LEFT + WrapText = False + action = 'button1_Action' + CancelButton = False + DefaultButton = False + end + object menuBar1: TFXMenuBarWithMenus + Tag = 124 + Left = 0 + Top = 0 + Width = 540 + Height = 23 + Hint = 'menuBar1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -15 + Font.Name = 'Dialog' + Font.Style = [] + Foreground = clBlack + Background = 16053492 + JavaType = 'MenuBar' + LayoutX = 0 + LayoutY = 0 + Disable = False + Cache = False + dragOver = '' + PrefHeight = 23 + PrefWidth = 540 + SnapToPixel = False + MenuItems.Strings = ( + 'File' + ' New' + ' Java' + ' XML' + ' Load' + ' Save, Ctrl+Shift+S' + 'Edit' + ' Copy, Ctrl+C' + ' Paste, Ctrl+V' + ' -' + ' Delete') + end + object GNUgettextMarker: TGnuGettextComponentMarker + end +end diff --git a/projekt/.gitingore b/projekt/.gitingore new file mode 100644 index 0000000..05acd03 --- /dev/null +++ b/projekt/.gitingore @@ -0,0 +1,2 @@ +*.class +*.~ava diff --git a/projekt/Game.class b/projekt/Game.class new file mode 100644 index 0000000..893fb29 Binary files /dev/null and b/projekt/Game.class differ diff --git a/projekt/Game.java b/projekt/Game.java new file mode 100644 index 0000000..0892368 --- /dev/null +++ b/projekt/Game.java @@ -0,0 +1,30 @@ +import java.util.Random; +import java.util.Scanner; + +public class Game { + public static Helper helper; + public static Menu menu; + public static Scanner input; + public static void main(String args[]) { + + + + boolean end = false; + + init(); + + while (!end) { + + } + } + + public static void init() { + helper = new Helper(); + input = new Scanner(System.in); + + + + + } + +} \ No newline at end of file diff --git a/projekt/Game.~ava b/projekt/Game.~ava new file mode 100644 index 0000000..5525d74 --- /dev/null +++ b/projekt/Game.~ava @@ -0,0 +1,30 @@ +import java.util.Random; +import java.util.Scanner; + +public class Game { + public static Helper helper; + public static Menu menu; + public static Scanner input; + public static void main(String args[]) { + + + + boolean end = false; + + init(); + + while (!end) { + + } + } + + public static void init() { + helper = new Helper(); + input = new Scanner(System.in); + + menu = new Menu(this); + + + } + +} \ No newline at end of file diff --git a/projekt/Helper.class b/projekt/Helper.class new file mode 100644 index 0000000..440fee7 Binary files /dev/null and b/projekt/Helper.class differ diff --git a/projekt/Helper.java b/projekt/Helper.java new file mode 100644 index 0000000..f48c7a8 --- /dev/null +++ b/projekt/Helper.java @@ -0,0 +1,10 @@ +public class Helper { + public int getRandomNumber(int max) { + return ((int)(Math.random() * (max+1))); + + } + public void printBarLine() { + System.out.println("---------------------------------------------------"); + + } + } \ No newline at end of file diff --git a/projekt/Helper.~ava b/projekt/Helper.~ava new file mode 100644 index 0000000..b4988a9 --- /dev/null +++ b/projekt/Helper.~ava @@ -0,0 +1,7 @@ +public class Helper { + public int getRandomNumber(int max) { + return ((int)(Math.random() * (max+1))); + + } + + } \ No newline at end of file diff --git a/projekt/Menu.class b/projekt/Menu.class new file mode 100644 index 0000000..ce73e23 Binary files /dev/null and b/projekt/Menu.class differ diff --git a/projekt/Menu.java b/projekt/Menu.java new file mode 100644 index 0000000..d14b26d --- /dev/null +++ b/projekt/Menu.java @@ -0,0 +1,39 @@ +import java.util.Scanner; +public class Menu { + public Game game; + public Scanner input; + public int state = 0; + + public Menu(Game _game) { + game = _game; + //input = _game.input; + + } + public void getMenu() { + switch (state) { + case 1: + printStateCity(); + break; + case 0: + + break; + default: + + } + + } + + public void printStateCity() { + System.out.println("You are in city: "); + System.out.println("What are you going to do?"); + System.out.println("S - Shop, A - Adventure, G - Guild"); + String choice = ""; + if(input.hasNext()) { + choice = input.next(); + + } + + game.helper.printBarLine(); + } + +} \ No newline at end of file diff --git a/projekt/Menu.~ava b/projekt/Menu.~ava new file mode 100644 index 0000000..9b22e12 --- /dev/null +++ b/projekt/Menu.~ava @@ -0,0 +1,39 @@ +import java.util.Scanner; +public class Menu { + public Game game; + public Scanner input; + public int state = 0; + + public Menu(Game _game) { + game = _game; + //input = _game.input; + + } + public static void getMenu() { + switch (state) { + case 1: + printStateCity(); + break; + case 0: + + break; + default: + + } + + } + + public static void printStateCity() { + System.out.println("You are in city: "); + System.out.println("What are you going to do?"); + System.out.println("S - Shop, A - Adventure, G - Guild"); + String choice = ""; + if(input.hasNext()) { + choice = input.next(); + + } + + game.helper.printBarLine(); + } + +} \ No newline at end of file diff --git a/projekt/error.txt b/projekt/error.txt new file mode 100644 index 0000000..c94170c --- /dev/null +++ b/projekt/error.txt @@ -0,0 +1,13 @@ +Menu.java:31: Fehler: Variable input ist nicht statisch und kann nicht aus einem statischen Kontext referenziert werden + if(input.hasNext()) { + ^ +Menu.java:32: Fehler: Variable input ist nicht statisch und kann nicht aus einem statischen Kontext referenziert werden + choice = input.next(); + ^ +Menu.java:36: Fehler: Variable game ist nicht statisch und kann nicht aus einem statischen Kontext referenziert werden + game.helper.printBarLine(); + ^ +H:\Java\projekt\Game.java:25: Fehler: Variable this ist nicht statisch und kann nicht aus einem statischen Kontext referenziert werden + menu = new Menu(this); + ^ +4 Fehler