test
commit
0fc4ce06d7
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1 @@
|
|||
/bin/
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>PR2_UIB</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1 @@
|
|||
Das ist eine tolle Datei
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
public class BufferedReaderPR2 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
try (BufferedWriter bf = new BufferedWriter(new FileWriter("output.txt"))) {
|
||||
bf.write("Das ist eine tolle Datei");
|
||||
|
||||
} catch (IOException e) {
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
|
||||
import java.io.*;
|
||||
|
||||
public class Folie_86 {
|
||||
|
||||
public enum Roman {
|
||||
I(1), V(5), X(20), L(50), C(100), D(500), M(1000);
|
||||
|
||||
private final int wert;
|
||||
|
||||
Roman(int wert) {
|
||||
this.wert = wert;
|
||||
}
|
||||
|
||||
public int getWert() {
|
||||
return wert;
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
for (Roman r : Roman.values()) {
|
||||
System.out.println(r.getWert() + "\t" + r.ordinal());
|
||||
//Console cons = System.console();
|
||||
//cons.printf("Grüße");
|
||||
//cons.printf("\n");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
public class Uebung_1 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
int blz;
|
||||
System.out.println(blz);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package verwaltung.kunden;
|
||||
|
||||
public class Geschaeftskunden extends Kunden {
|
||||
|
||||
private String firmenname;
|
||||
|
||||
|
||||
public Geschaeftskunden(String name, String telefon, int blz, int kontoNr) {
|
||||
super(name, telefon, blz, kontoNr);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package verwaltung.kunden;
|
||||
|
||||
public class Kunden {
|
||||
|
||||
// An diese Variablen kann man nur innerhalb dieser Klasse (Kunden) und den Unterklassen die diese erben zugreiffen
|
||||
private String name;
|
||||
private String telefon;
|
||||
private int blz;
|
||||
private int kontoNr;
|
||||
|
||||
public Kunden (String name, String telefon, int blz, int kontoNr) {
|
||||
this.name = name;
|
||||
this.telefon = telefon;
|
||||
this.blz = blz ;
|
||||
this.kontoNr = kontoNr;
|
||||
}
|
||||
/**
|
||||
* Diese Methode trägt einen neuen Kunden in das Bankverwaltungssystem ein
|
||||
*/
|
||||
public static void eintragen() {
|
||||
|
||||
}
|
||||
/**
|
||||
* Wenn es zu einer Änderung der Werte kommt erledigt das diese Methode
|
||||
*/
|
||||
public static void aendern() {
|
||||
|
||||
}
|
||||
/**
|
||||
* Die Methode zeigt die relevanten Daten der Kunden
|
||||
* @return "Der Kunde " + name + " hat die folgende Telefonnummer: " + telefon + " seine Kontonummer lautet: " + kontoNr + " mit der Bankleitzahl " + blz;
|
||||
*/
|
||||
public String anzeigen() {
|
||||
return "Der Kunde " + name + " hat die folgende Telefonnummer: " + telefon + " seine Kontonummer lautet: " + kontoNr + " mit der Bankleitzahl " + blz;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package verwaltung.kunden;
|
||||
|
||||
public class Privatkunden extends Kunden {
|
||||
|
||||
private int bonitaet;
|
||||
|
||||
public Privatkunden(String name, String telefon, int blz, int kontoNr) {
|
||||
super(name, telefon , blz , kontoNr);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue