/** Generierung einer Zufallszahl aus [1;49].*/import java.util.Random;public class Zufallszahl{ Random generator=new Random(); private int zufallszahl=generator.nextInt(49)+1; public int getZufallszahl() { return zufallszahl; }}--------------------------------------/** Es werden 6 Zufallszahlen aufgenommen.* Ist die aufgenommene Zahl schon vorhanden, wird die aufnahme wiederholt.*/public class Gewinnzahlen{ private int[] gewinnzahlen=new int[6]; public int[] getGewinnzahlen(){ for(int i=0;i<6;i++){ gewinnzahlen[i]=new Zufallszahl().getZufallszahl(); for(int j=0;j<i;j++){ while(gewinnzahlen[i]==gewinnzahlen[j]){ gewinnzahlen[i]=new Zufallszahl().getZufallszahl(); } } return gewinnzahlen; } }--------------------------------------/** Ein Tipp wird als 6er int-Array aufgenommen.* Ungueltige Angaben moeglich.*/public class Tipp{ private int[] tippzahlen=new int[6]; public void setTippzahlen(int[] tippzahlen){ for(int i=0;i<6;i++) this.tippzahlen[i]=tippzahlen[i]; } public int[] getTippzahlen(){ return tippzahlen; }}-----------------------------------------------/** Main-Methode zieht Gewinnzahlen und zeigt sie an.* Ermittlung des Gewinners nicht implementiert.*/public class Ziehen{ public static void main(String[] args){ Tipp tipp1=new Tipp(); Tipp tipp2=new Tipp(); Tipp tipp3=new Tipp(); Gewinnzahlen meineGewinnzahlen=new Gewinnzahlen(); System.out.println(meineGewinnzahlen.getGewinnzahlen()); }}