neu neu
parent
859ad01076
commit
8a326f55b1
Binary file not shown.
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-19">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Indexverwaltung</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,14 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=19
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=19
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=19
|
|
@ -0,0 +1,5 @@
|
|||
package inputOutput;
|
||||
|
||||
public class Datei {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package inputOutput;
|
||||
public class DemoConsole {
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.out.println("Text eingeben: ");
|
||||
String text = Console.readString();
|
||||
System.out.println("Gelesener Text: " + text);
|
||||
|
||||
System.out.println("Text eingeben: ");
|
||||
char [] ca = Console.readCharArray();
|
||||
System.out.println("Gelesenes char-Feld: ");
|
||||
for(char celement: ca)
|
||||
System.out.print(celement);
|
||||
System.out.println();
|
||||
|
||||
System.out.println("Boolean eingeben: ");
|
||||
boolean b = Console.readBoolean();
|
||||
System.out.println("Gelesener Wert: " + b);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
package inputOutput.src;
|
||||
|
||||
package inputOutput;
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
package inputOutput.src;
|
||||
|
||||
package inputOutput;
|
||||
|
||||
public class IndexUI {
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package inputOutput;
|
||||
public class ZaehlerUI {
|
||||
public static void main(String[] args) throws Exception {
|
||||
Zaehler einZaehler, klonZaehler = null;
|
||||
|
||||
Verbraucher einVerbraucher = new Verbraucher("Schulz");
|
||||
einZaehler = new Zaehler("Elektro", einVerbraucher, 123);
|
||||
|
||||
try
|
||||
{
|
||||
klonZaehler = einZaehler.clone();
|
||||
}
|
||||
catch(CloneNotSupportedException e)
|
||||
{
|
||||
System.out.println("Fehler");
|
||||
}
|
||||
|
||||
System.out.println("Zählerstand =" + einZaehler.getZaehlerstand()
|
||||
+ " gehört zu Verbraucher " + einZaehler.getMeinVerbraucher().getName());
|
||||
|
||||
System.out.println("Geklonter Zähler Zählerstand = " + klonZaehler.getZaehlerstand()
|
||||
+ " gehört zu Verbraucher " + klonZaehler.getMeinVerbraucher().getName());
|
||||
|
||||
if(einZaehler.getMeinVerbraucher() == klonZaehler.getMeinVerbraucher())
|
||||
System.out.println("Verbraucher identisch");
|
||||
else
|
||||
System.out.println("Verbraucher nicht identisch");
|
||||
|
||||
Unterzaehler nochEinZaehler = new Unterzaehler("Gas", einVerbraucher, 500);
|
||||
|
||||
System.out.println("Zählerstand = " + nochEinZaehler.getZaehlerstand()
|
||||
+ " Unterzählerstand: " + nochEinZaehler.getUnterzaehlerstand()
|
||||
+ " gehört zu Verbraucher " + nochEinZaehler.getMeinVerbraucher().getName());
|
||||
|
||||
Unterzaehler klonUnterzaehler = null;
|
||||
|
||||
try
|
||||
{
|
||||
klonUnterzaehler = nochEinZaehler.clone();
|
||||
}
|
||||
catch(CloneNotSupportedException e)
|
||||
{
|
||||
System.out.println("Fehler");
|
||||
}
|
||||
|
||||
System.out.println("Geklonter Unterzähler: Zählerstand = " + klonUnterzaehler.getZaehlerstand()
|
||||
+ " Unterzählerstand: " + klonUnterzaehler.getUnterzaehlerstand()
|
||||
+ " gehört zu Verbraucher " + klonUnterzaehler.getMeinVerbraucher().getName());
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
package inputOutput.src;
|
||||
|
||||
|
||||
public class Datei {
|
||||
|
||||
}
|
Loading…
Reference in New Issue