Advertisement
flomath

javakurs

Jan 27th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. package unit_07;
  2.  
  3. import java.util.Random;
  4.  
  5. public class StartApp {
  6.  
  7.     public static void main(String[] args) {
  8.         // TODO Auto-generated method stub
  9.         Random r = new Random();
  10.         GeometrischeFigur[] gf = new GeometrischeFigur[10];
  11.        
  12.         for(int i=0; i<10;i++){
  13.             int zahl = r.nextInt() % 2;
  14.             if(zahl==0){
  15.                 gf[0] = new Dreieck();
  16.             } else{
  17.                
  18.             }
  19.         }
  20.        
  21.         for(int i=0; i<10; i++){
  22.             gf[i].zeichne();
  23.         }
  24.        
  25.  
  26.     }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement