Example #1
0
  public String toString() {
    StringBuilder output = new StringBuilder();
    // String NEW_LINE = System.getProperty("line.separator");

    output.append("Common Name: " + myCommonName + "\n");
    output.append(myGenericInfo.toString());
    output.append(myPicture.toString());
    output.append(mySound.toString());

    return output.toString();
  }
Example #2
0
  public int buildBird(String[] birdData, int location) throws FileNotFoundException {
    myCommonName = birdData[location++];

    myGenericInfo = new GenericInfo();
    location = myGenericInfo.buildGenericInfo(birdData, location);
    myPicture = new Picture();
    location = myPicture.buildPicture(birdData, location);
    mySound = new Sound();
    location = mySound.buildSound(birdData, location);
    // System.out.println(mySound.toString());

    // System.out.println(location);
    return location;
  }