- Lesbarkeit
- Keep it simple:
- keine unnötigen Kommentaren
- keine komplizierten Schreibweisen
- Einrückungen + Klammern: Der ganze Inhalt von einem Block (also Methoden-Rumpf, der Inhalt von einer for-Schleife, die Blöcke nach if/else-Abfragen) wird um eine Ebene eingerückt, damit dieser als Block visuell erkennbar ist
- Variablen/Klassen/Methoden-Namen:
- Variablen- und Methodennamen fangen klein an; Klassennamen fangen groß an. Siehe auch https://howtodoinjava.com/java/basics/java-naming-conventions/
- Man sollte sprechenden Bezeichner wählen und diese im Zweifel nicht abkürzen, sondern ganz ausschreiben (also z.B.
inputArray
stattinAr
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 BTables3 { | |
public static void main(String[]args){ | |
System.out.println(evaluateBs(false,false,false)); | |
System.out.println(evaluateBs(false,true,false)); | |
} | |
/** | |
* Die gibt den Wahrheitswert gemäß der vorgegeben Wahrheitstabelle (siehe Beschreibung) zurück. | |
* | |
* @param x1 Boolescher Wert | |
* @param x2 Boolescher Wert |
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 | |
*/ |
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 BTables1 { | |
/** | |
* 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 | |
*/ |
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 BTables { | |
/** | |
* 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 | |
*/ |
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
package spacetraveller; | |
import java.time.LocalDateTime; | |
public class Kontrollflug { | |
SpaceShip spaceShip; | |
private boolean klarZumAbflugFlag = false; | |
public Kontrollflug(SpaceShip spaceShip) { | |
this.spaceShip = spaceShip; |
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
# add file to last commit: | |
$ git add left_out_file | |
$ git commit --amend --no-edit | |
# change last commit message | |
$ git commit --amend |
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
hallo |