Created
June 3, 2022 09:57
-
-
Save lusy/808425e0fef496b315560485838350b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BTables2 { | |
/** | |
* Die gibt den Wahrheitswert gemäß der vorgegeben Wahrheitstabelle (siehe Beschreibung) zurück. | |
* | |
* @param x1 Boolescher Wert | |
* @param x2 Boolescher Wert | |
* @param x3 Boolescher Wert | |
* @return Das Ergebnis gemäß Wahrheitstabelle | |
*/ | |
public static void main(boolean[] args) { | |
boolean x1 = false; | |
boolean x2 = true; | |
boolean x3 = true; | |
} | |
public boolean evaluateBs(boolean x1, boolean x2, boolean x3) { | |
boolean ausgabe; | |
if ((x1 == false)&&(x2 == false)&&(x3 == false)) | |
{ ausgabe = false; } | |
else if ((x1 == false)&&(x2 == false)&&(x3 == true)) | |
{ ausgabe = false; } | |
else if ((x1 == false)&&(x2 == true)&&(x3 == false)) | |
{ ausgabe = false; } | |
else if ((x1 == false)&&(x2 == true)&&(x3 == true)) | |
{ ausgabe = true; } | |
else if ((x1 == false)&&(x2 == false)&&(x3 == false)) | |
{ ausgabe = true; } | |
else if ((x1 == true)&&(x2 == false)&&(x3 == true)) | |
{ ausgabe = true; } | |
else if ((x1 == true)&&(x2 == true)&&(x3 == false)) | |
{ ausgabe = false; } | |
else | |
{ ausgabe = true; } | |
return ausgabe; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment