diff --git a/sae/java/sommer2010/Sommer2010FS/build.xml b/sae/java/sommer2010/Sommer2010FS/build.xml new file mode 100644 index 0000000..5e7b0e7 --- /dev/null +++ b/sae/java/sommer2010/Sommer2010FS/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Sommer2010FS. + + + diff --git a/sae/java/sommer2010/Sommer2010FS/nbproject/build-impl.xml b/sae/java/sommer2010/Sommer2010FS/nbproject/build-impl.xml new file mode 100644 index 0000000..4a97255 --- /dev/null +++ b/sae/java/sommer2010/Sommer2010FS/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sae/java/sommer2010/Sommer2010FS/nbproject/genfiles.properties b/sae/java/sommer2010/Sommer2010FS/nbproject/genfiles.properties new file mode 100644 index 0000000..89a0ee8 --- /dev/null +++ b/sae/java/sommer2010/Sommer2010FS/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=d12440a4 +build.xml.script.CRC32=84005230 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=d12440a4 +nbproject/build-impl.xml.script.CRC32=65b41945 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/sae/java/sommer2010/Sommer2010FS/nbproject/private/private.properties b/sae/java/sommer2010/Sommer2010FS/nbproject/private/private.properties new file mode 100644 index 0000000..0723c7c --- /dev/null +++ b/sae/java/sommer2010/Sommer2010FS/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\janek.schoffit\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/sae/java/sommer2010/Sommer2010FS/nbproject/private/private.xml b/sae/java/sommer2010/Sommer2010FS/nbproject/private/private.xml new file mode 100644 index 0000000..98af713 --- /dev/null +++ b/sae/java/sommer2010/Sommer2010FS/nbproject/private/private.xml @@ -0,0 +1,10 @@ + + + + + + file:/H:/NetBeansProjects/Sommer2010FS/src/sommer2010fs/ArbeitsplatzPC.java + file:/H:/NetBeansProjects/Sommer2010FS/src/sommer2010fs/Sommer2010FS.java + + + diff --git a/sae/java/sommer2010/Sommer2010FS/nbproject/project.properties b/sae/java/sommer2010/Sommer2010FS/nbproject/project.properties new file mode 100644 index 0000000..05c7524 --- /dev/null +++ b/sae/java/sommer2010/Sommer2010FS/nbproject/project.properties @@ -0,0 +1,73 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Sommer2010FS.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=sommer2010fs.Sommer2010FS +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/sae/java/sommer2010/Sommer2010FS/nbproject/project.xml b/sae/java/sommer2010/Sommer2010FS/nbproject/project.xml new file mode 100644 index 0000000..b64fce0 --- /dev/null +++ b/sae/java/sommer2010/Sommer2010FS/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Sommer2010FS + + + + + + + + + diff --git a/sae/java/sommer2010/Sommer2010FS/src/sommer2010fs/ArbeitsplatzPC.java b/sae/java/sommer2010/Sommer2010FS/src/sommer2010fs/ArbeitsplatzPC.java new file mode 100644 index 0000000..c48813a --- /dev/null +++ b/sae/java/sommer2010/Sommer2010FS/src/sommer2010fs/ArbeitsplatzPC.java @@ -0,0 +1,71 @@ +package sommer2010fs; + +public class ArbeitsplatzPC { + private String macAdresse; + private char netz; + + /* Aufgabe 2.1: + * Diese Methode hat keinen Rückgabewert, + * da es ein Konstruktor ist. Dieser wird + * nur zum erstellen des Objekts genutzt. + */ + public ArbeitsplatzPC(String macAdresse, char netz) { + this.macAdresse = macAdresse; + this.netz = netz; + } + + public boolean setMacAdresse(String macAdresse) { + if (macAdresse.length() == 10) { + this.macAdresse = macAdresse; + return true; + } else { + return false; + } + } + + public boolean setNetz(char netz) { + netz = Character.toUpperCase(netz); + if (netz == 'A' || netz == 'B') { + this.netz = netz; + return true; + } else { + return false; + } + } + + public String getMacAdresse() { + return macAdresse; + } + + public char getNetz() { + return netz; + } + + private boolean checknetz(char netz) { + return true; + } + + private boolean checkMac(String mac) { + return true; + } + + private boolean checkHex(char hex) { + char allowedChars[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E', 'f', 'F'}; + boolean valid = false; + + for (int i = 0; i < allowedChars.length; i++) { + if (allowedChars[i] == hex) { + valid = true; + } + } + + return valid; + } + + + + + + + +} diff --git a/sae/java/sommer2010/Sommer2010FS/src/sommer2010fs/Sommer2010FS.java b/sae/java/sommer2010/Sommer2010FS/src/sommer2010fs/Sommer2010FS.java new file mode 100644 index 0000000..6e0cc6e --- /dev/null +++ b/sae/java/sommer2010/Sommer2010FS/src/sommer2010fs/Sommer2010FS.java @@ -0,0 +1,9 @@ +package sommer2010fs; + +public class Sommer2010FS { + + public static void main(String[] args) { + + } + +} diff --git a/sae/java/sommer2013/Sommer2013FS/build.xml b/sae/java/sommer2013/Sommer2013FS/build.xml new file mode 100644 index 0000000..6a0606f --- /dev/null +++ b/sae/java/sommer2013/Sommer2013FS/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Sommer2013FS. + + + diff --git a/sae/java/sommer2013/Sommer2013FS/build/classes/.netbeans_automatic_build b/sae/java/sommer2013/Sommer2013FS/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/sae/java/sommer2013/Sommer2013FS/build/classes/.netbeans_update_resources b/sae/java/sommer2013/Sommer2013FS/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/sae/java/sommer2013/Sommer2013FS/build/classes/sommer2013fs/Sommer2013FS.class b/sae/java/sommer2013/Sommer2013FS/build/classes/sommer2013fs/Sommer2013FS.class new file mode 100644 index 0000000..cce8dcb Binary files /dev/null and b/sae/java/sommer2013/Sommer2013FS/build/classes/sommer2013fs/Sommer2013FS.class differ diff --git a/sae/java/sommer2013/Sommer2013FS/nbproject/build-impl.xml b/sae/java/sommer2013/Sommer2013FS/nbproject/build-impl.xml new file mode 100644 index 0000000..9d8a98d --- /dev/null +++ b/sae/java/sommer2013/Sommer2013FS/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sae/java/sommer2013/Sommer2013FS/nbproject/genfiles.properties b/sae/java/sommer2013/Sommer2013FS/nbproject/genfiles.properties new file mode 100644 index 0000000..7b5a073 --- /dev/null +++ b/sae/java/sommer2013/Sommer2013FS/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=b9548ce0 +build.xml.script.CRC32=a8535e5e +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=b9548ce0 +nbproject/build-impl.xml.script.CRC32=929b6dd6 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/sae/java/sommer2013/Sommer2013FS/nbproject/private/private.properties b/sae/java/sommer2013/Sommer2013FS/nbproject/private/private.properties new file mode 100644 index 0000000..0723c7c --- /dev/null +++ b/sae/java/sommer2013/Sommer2013FS/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\janek.schoffit\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/sae/java/sommer2013/Sommer2013FS/nbproject/private/private.xml b/sae/java/sommer2013/Sommer2013FS/nbproject/private/private.xml new file mode 100644 index 0000000..9fcc59f --- /dev/null +++ b/sae/java/sommer2013/Sommer2013FS/nbproject/private/private.xml @@ -0,0 +1,9 @@ + + + + + + file:/H:/NetBeansProjects/Sommer2013FS/src/sommer2013fs/Sommer2013FS.java + + + diff --git a/sae/java/sommer2013/Sommer2013FS/nbproject/project.properties b/sae/java/sommer2013/Sommer2013FS/nbproject/project.properties new file mode 100644 index 0000000..6aff081 --- /dev/null +++ b/sae/java/sommer2013/Sommer2013FS/nbproject/project.properties @@ -0,0 +1,73 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Sommer2013FS.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=sommer2013fs.Sommer2013FS +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/sae/java/sommer2013/Sommer2013FS/nbproject/project.xml b/sae/java/sommer2013/Sommer2013FS/nbproject/project.xml new file mode 100644 index 0000000..7400a4a --- /dev/null +++ b/sae/java/sommer2013/Sommer2013FS/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Sommer2013FS + + + + + + + + + diff --git a/sae/java/sommer2013/Sommer2013FS/src/sommer2013fs/Sommer2013FS.java b/sae/java/sommer2013/Sommer2013FS/src/sommer2013fs/Sommer2013FS.java new file mode 100644 index 0000000..62e337b --- /dev/null +++ b/sae/java/sommer2013/Sommer2013FS/src/sommer2013fs/Sommer2013FS.java @@ -0,0 +1,20 @@ +package sommer2013fs; + +public class Sommer2013FS { + + public static void main(String[] args) { + System.out.println(chiffriere("Ölkännchen", "geheimcode")) ; + } + + + public static String chiffriere(String klartext, String schluessselwort) { + char[] ktchar = klartext.toCharArray(); + char[] swchar = schluessselwort.toCharArray(); + char[] result = new char[ktchar.length]; + for (int i = 0; i < ktchar.length; i++) { + result[i] = (char)((ktchar[i] + swchar[i]) % 256); + } + return new String(result); + } + +}