Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Lawaaimaken;
- import java.util.*;
- public class AnimalFarm {
- /**
- * @param args
- */
- public static void main(String[] args) {
- ArrayList<LawaaiMaker> dieren = new ArrayList<LawaaiMaker>();
- for (int i = 0; i<dieren.size(); i++){
- int z = (int)(3*Math.random());
- if (z==0) dieren.add(new Kat());
- else if (z==1) dieren.add(new Hond());
- else dieren.add(new Koe());
- }
- for (int i = 0; i<dieren.size(); i++){
- (dieren.get(i)).maakLawaai();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement