From 9c277a19de51c9c02503a410b8a35120a932d0cf Mon Sep 17 00:00:00 2001 From: jannisfingerhut Date: Fri, 10 Feb 2023 03:00:16 +0100 Subject: [PATCH] Test --- .DS_Store | Bin 6148 -> 6148 bytes LernProgramm/.DS_Store | Bin 6148 -> 6148 bytes LernProgramm/ProgrammMain.java | 219 +----------------- LernProgramm/testProgramm.java | 1 - bin/.DS_Store | Bin 6148 -> 6148 bytes bin/LernProgramm/.DS_Store | Bin 6148 -> 6148 bytes .../ProgrammMain$FactorialCalculator.class | Bin 1331 -> 0 bytes bin/LernProgramm/ProgrammMain.class | Bin 6303 -> 405 bytes bin/LernProgramm/testProgramm.class | Bin 2901 -> 2695 bytes 9 files changed, 6 insertions(+), 214 deletions(-) delete mode 100644 bin/LernProgramm/ProgrammMain$FactorialCalculator.class diff --git a/.DS_Store b/.DS_Store index 32668bb112658f651e8dfa854ae6cac0f009c3bb..096018eac0d3d63bf5d528b26c00f276ad4fcc2d 100644 GIT binary patch delta 86 zcmZoMXfc@JFU-ooz`)4BAi$8HoRpKF1mp>9Ze(7`C=HTeW=LYlWXSW(K}Z5s%TBgn e(wMBlw1dOa#6(BI+}v#Q3#Okeo7p-3@&f=4OcU+^ delta 65 zcmZoMXfc@JFUrEez`)4BAi%&7z)-}H&yWrz6E|;UUe3tKGC7M$X0jjC4h{<=104l( UW0TE%%s*KsHmGf8=lIJH0M7dl`2YX_ diff --git a/LernProgramm/.DS_Store b/LernProgramm/.DS_Store index a41539c88917204a02418228dbdc08b2a398b3e7..90c929fd3d10518d075f792739fe357d3849d744 100644 GIT binary patch delta 298 zcmZoMXfc=|#>B`mF;Q%yo}wr-0|Nsi1A_nqLkUABLq0+Cy&1 z>b7!uZ@BVV8X0%kCYD<@wq*_{Ce~4 zXxSV5#@jz%p4EXgSTA7%*7nCq-_H8Q??+)WbetK_WOEN5=0#o<#Rua#eRv32%Iw1@?5c2*si~}{UsZksxI@dD}Q4ob@X?HSt z=~T+H>b#nk<)q?N-<0L+gBR0jK|I}met6vc6!l_th5LoC8$NF>k1fvO8anoIR_WXO zx$rF0cl+b}f<8?{Pc7(M_im=|!W+bqio3ARe0TF*5fTH$05PzI0eftS;+8ma69dG+ z|HlBH4-yp7wU`>zM+Y>z1OUu|Sqt>BmcSfo(Y2Tw1P=%|semSx+Y*DDbg)Ys=UPk+ znsml(@xkrN+*T-DuMYD|9nQFGkXmAZ7+7T>YlbDf|KDw{|5uY}L<|rE{}cl}SNG~Q zcqDtbu00&ywG#9rC= 0; i--) { - char currentChar = binaryCode.charAt(i); - if (currentChar == '1') { - decimal += Math.pow(2, binaryCode.length() - i - 1); - } else if (currentChar != '0') { - System.out.println("Ungültiger Binärcode! Bitte gebe nur Nullen und Einsen ein."); - return 0; - } - } - return decimal; - } - - public static int decimalToBinary(int decimal) { - int binary = 0; - int power = 0; - while (decimal > 0) { - binary += (decimal % 2) * (int) Math.pow(10, power); - decimal /= 2; - power++; - } - return binary; - } - - public class FactorialCalculator { - - public static int calculateFactorial(int number) { - if (number <= 0) { - return 1; - } - int result = 1; - for (int i = 1; i <= number; i++) { - result *= i; - } - return result; - } - - public static void main(String[] args) { - int number = 5; - int result = calculateFactorial(number); - System.out.println(number + "! = " + result); - - } - - } - public static void main(String[] args) { - System.out.println("Willkommen bei diesem kleinen konsolenbasierten Spiel!\n"); - System.out.println("Du hast 3 Spielmodi!\n"); - System.out.println("1. Karteikarten\n"); - System.out.println("2. Quizz\n"); - System.out.println("3. Binaer-Inverter\n"); - System.out.println("4. PrimZahlenAusgabe\n"); - - try (Scanner einleser = new Scanner(System.in)) { - int wahl = einleser.nextInt(); - switch (wahl) { - case 1: - Karteikarten(); - break; - case 2: - Quizz(); - // Funktion - break; - case 3: - PrimBis100(); - // Funktion - break; - case 4: - Binaerrechner(); - // Funktion - break; - case 5: - System.out.println( - "Diese Funktion wird derzeit entwickelt! Hab bitte etwas Geduld oder sei kreativ und erstelle dir selber eine Funktion!"); - // Funktion - break; - - default: - System.out.println("Ungültige Eingabe, versuche es bitte erneut!\n"); - } - } - - System.out.println("Programm beendet\n"); - + + + + + + } - } diff --git a/LernProgramm/testProgramm.java b/LernProgramm/testProgramm.java index 2c91777..2a74cf7 100644 --- a/LernProgramm/testProgramm.java +++ b/LernProgramm/testProgramm.java @@ -4,7 +4,6 @@ import static org.junit.jupiter.api.Assertions.*; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; -import java.io.InputStream; import java.io.PrintStream; import org.junit.jupiter.api.Test; diff --git a/bin/.DS_Store b/bin/.DS_Store index 32668bb112658f651e8dfa854ae6cac0f009c3bb..096018eac0d3d63bf5d528b26c00f276ad4fcc2d 100644 GIT binary patch delta 86 zcmZoMXfc@JFU-ooz`)4BAi$8HoRpKF1mp>9Ze(7`C=HTeW=LYlWXSW(K}Z5s%TBgn e(wMBlw1dOa#6(BI+}v#Q3#Okeo7p-3@&f=4OcU+^ delta 65 zcmZoMXfc@JFUrEez`)4BAi%&7z)-}H&yWrz6E|;UUe3tKGC7M$X0jjC4h{<=104l( UW0TE%%s*KsHmGf8=lIJH0M7dl`2YX_ diff --git a/bin/LernProgramm/.DS_Store b/bin/LernProgramm/.DS_Store index a41539c88917204a02418228dbdc08b2a398b3e7..90c929fd3d10518d075f792739fe357d3849d744 100644 GIT binary patch delta 298 zcmZoMXfc=|#>B`mF;Q%yo}wr-0|Nsi1A_nqLkUABLq0+Cy&1 z>b7!uZ@BVV8X0%kCYD<@wq*_{Ce~4 zXxSV5#@jz%p4EXgSTA7%*7nCq-_H8Q??+)WbetK_WOEN5=0#o<#Rua#eRv32%Iw1@?5c2*si~}{UsZksxI@dD}Q4ob@X?HSt z=~T+H>b#nk<)q?N-<0L+gBR0jK|I}met6vc6!l_th5LoC8$NF>k1fvO8anoIR_WXO zx$rF0cl+b}f<8?{Pc7(M_im=|!W+bqio3ARe0TF*5fTH$05PzI0eftS;+8ma69dG+ z|HlBH4-yp7wU`>zM+Y>z1OUu|Sqt>BmcSfo(Y2Tw1P=%|semSx+Y*DDbg)Ys=UPk+ znsml(@xkrN+*T-DuMYD|9nQFGkXmAZ7+7T>YlbDf|KDw{|5uY}L<|rE{}cl}SNG~Q zcqDtbu00&ywG#9rCc$KYm`o8_9xDNvy>bS(2#o;10&n4Ftm7G;+q;4T@}*m;I<;Yhp` zrKJtaaBngU#{ZL-C^0BmdqK2<;h2sV1T^^3rbESX27g>8v=bNbNQ&*&@COw$Kokbd(t|rgMpcU5wBbRtAis~o!q!VAil z6~Y5+Xi+wmw369?7LF{XU;0>NVExa}@FrdRJ;*^S4ZMPa*98BDXsn|RZwYoC{n+qI zMYrM5gI>xFQmH=jNI60{L7tB?B?W)r7Xpk0$Q?kq!Nw+N$z~*&4u3%;^9h6B5PMAi znJt_PCF{5lspE1T*Xl^`wHl(&fOmwwNeti95PjIkWdwIHMfW}od#t2@gB~l{de*zS Si+l7hmy#ieX|j3mJogt-I5JNF diff --git a/bin/LernProgramm/ProgrammMain.class b/bin/LernProgramm/ProgrammMain.class index 8fa8f6dbb1f145f77e5cb80a1f717c92a4161a21..d7df8c247b91281485ec155e1e754e141b70a262 100644 GIT binary patch delta 151 zcmbPlIF(u8)W2Q(7#JAr7)00^m>3x(Cr*@{sM#|40GFIBBLhofQF<{WgK)G@R$^JA zeokUux_)p;QD$Dc_2h*-iaZR842%rSK+$liF^bs!g1x#*I*88z-TT>$qv!v}x+5Y15{QyZ+KO4K-H3Gw*33 z5`Xkp!RX$(_uPBW@}2M8(bwPp(j@@9R8Z#m{*Zfw}}jvB+Z zsZieUrVRU-;aT!t7!3OvE32@+|GEmaE5r{Po^M*C@|y~kDXa_>%K4VvoJ<*xV|v9X z$LbhXU88LB-mGtq#ZiGZ3PqNqP|+W(wA|)CXFTU8ea|$;+DlN1b)tBs!n)ceMe2^l zuwG%+$^2~K3$C`Dk@griTzhITtl>t5n~xh=-OBoU+A{V1MsD2C`bOH<&$^D@W9Iy9 zD#M-9yEW9%rCp|HTaJczDC{_H+Nq3LSZsRwhMC4s(U+>z1SEoUG}YV|vo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