From c3973f2ade85ab9daea3435d22656097dd300602 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Mon, 25 Apr 2022 18:04:14 +0200 Subject: Initial commit --- src/com/encrox/automaten/Core.java | 262 +++++++++++++++++++++++++++++++++ src/com/encrox/automaten/Schlange.java | 56 +++++++ src/com/encrox/automaten/Stapel.java | 54 +++++++ 3 files changed, 372 insertions(+) create mode 100755 src/com/encrox/automaten/Core.java create mode 100755 src/com/encrox/automaten/Schlange.java create mode 100755 src/com/encrox/automaten/Stapel.java (limited to 'src/com/encrox/automaten') diff --git a/src/com/encrox/automaten/Core.java b/src/com/encrox/automaten/Core.java new file mode 100755 index 0000000..3ec994f --- /dev/null +++ b/src/com/encrox/automaten/Core.java @@ -0,0 +1,262 @@ +package com.encrox.automaten; + +public class Core { + + public static void main(String args[]) { + System.out.println(isOkNormal("z")); + System.out.println(isOk("z")); + } + + public static boolean isOkNormal(String str) { + boolean out = false; + char current; + Schlange schlange = new Schlange(); + for(int i = 0, len = str.length(); i