Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. package backpack;
  2.  
  3. public class Driver
  4. {
  5.  
  6.  
  7. public static void main(String[] args)
  8. {
  9. Fish fish = new Fish();
  10. String typeFish = null;
  11. String size = null;
  12. String color = null;
  13. Aquarium aq = new Aquarium();
  14. Fish[] fishies = new Fish[2];
  15. fishies[0] = new Fish();
  16. fishies[0].setColor("Green");
  17. fishies[0].setSize("Big");
  18. fishies[0].setTypeFish("Trout");
  19. fishies[1] = new Fish(typeFish, size, color);
  20.  
  21. for(int i = 0; i < fishies.length;i++)
  22. {
  23. aq.addFish(fishies [i]);
  24. String five = fishies.toString();
  25. System.out.println(five);
  26. }
  27.  
  28.  
  29.  
  30.  
  31.  
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement