コード例 #1
0
ファイル: Bird.java プロジェクト: Omniwrath/Team7
  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();
  }
コード例 #2
0
ファイル: Bird.java プロジェクト: Omniwrath/Team7
  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;
  }