/* Vorlage für Aufgabe 1 & 2 */ public class DnaSequence { String id; String sequence; public DnaSequence(String id, String sequence) { this.id = id; this.sequence = sequence; if (!this.isValidSequence()) System.out.println("Achtung: Keine gültige DNA Sequenz!"); } public int length() { return this.sequence.length(); } public boolean isValidSequence() { for (char c : sequence.toCharArray()) { if (c != 'A' && c != 'G' && c != 'C' && c != 'T') return false; } return true; } }