package vp; public class Koder { private String kodestreng = "abcdefghijklmnopqrstuvwxyzĉĝċ"; private int hop = 1; public String getKodestreng() { return kodestreng; } public void setKodestreng(String ny) { kodestreng = ny; } public void setHop(int ny) { hop = ny; } public int getHop() { return hop; } public String kod(String s) { StringBuffer sb = new StringBuffer(); for (int i=0; i=0) { p = (p + hop + kodestreng.length()) % kodestreng.length(); sb.append( kodestreng.charAt( p )); } else sb.append( s.charAt(i) ); } return sb.toString(); } }