Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package backpack;
- public class Driver
- {
- public static void main(String[] args)
- {
- Fish fish = new Fish();
- String typeFish = null;
- String size = null;
- String color = null;
- Aquarium aq = new Aquarium();
- Fish[] fishies = new Fish[2];
- fishies[0] = new Fish();
- fishies[0].setColor("Green");
- fishies[0].setSize("Big");
- fishies[0].setTypeFish("Trout");
- fishies[1] = new Fish(typeFish, size, color);
- for(int i = 0; i < fishies.length;i++)
- {
- aq.addFish(fishies [i]);
- String five = fishies.toString();
- System.out.println(five);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement