Question: I have a class Worker which I want to access methods from hive, garden and all the subclasses of the superclass flower. A worker is in an arraylist in hive which is in a garden and the garden also has an arraylist of flowers. I have accessed the methods from hive using the constructor:

```
public worker(Hive hive){
    this.hive= hive
}

```

And I want to access the method findFlower() from the garden to get a flower and extractPollen() (which every type of flower inherits from the super class flower) from the flowers I get to get pollen from them. Do I need to make more constructors for garden and for each type of flower or will 2 constructors, 1 for the garden and 1 for the super constructor flower work? 

My code so far:

```
public class Worker extends Bee {

    Hive hive = null; 
    public Garden garden;
    public Flower flower;

    public Worker(Hive hive){
        this.hive=hive;
        this.type = 2;
        this.age=11;
        this.health=3;
    }

    public Bee anotherDay(){
        flower= garden.findFlower();
        flower.extractPollen(int);
        eat();
        age++; 
    }
}

public class Garden{

    ArrayList<Flower> flowerbed = new ArrayList<Flower>();

    public Flower findFlower(){
        //code which returns a random flower from my arraylist
    }
}

public class Flower{

    public boolean extractPollen(int po){
        if(po <= pollen){
            pollen= pollen - po;
            return true;
        }return false;
    }
}

```

Answer: 
Looks like the version of Yeoman you had back when this was asked used windows newlines `\r\n`. Because of this, at the top of the file, `#!/usr/bin/env node` actually resulted in the shell trying to run a command called `node\r`. (Note the carriage return on the end).

This is probably fixed by now, but this isn't a node issue, it's a windows-newlines-in-osx issue. The carriage returns should be replaced with `\n` newline characters.
open the script with vim.

`:set ff=unix` to modify the format of the file.

`:wq!` to save and exit.