title: Trying to create a class that contains objects from another class
body: <p>I have created a class called Album, which is this one:</p>
  
  <pre><code>public class Album {
  
      private String Titulo;
      private int temas;
      private int ano;
  
      public Album(String Titulo2, int temas2, int ano2) {
          this.Titulo = Titulo2;
          this.temas = temas2;
          this.ano = ano2;
      }
  
      public Album(String Titulo2, int temas2) {
          this.Titulo = Titulo2;
          this.temas = temas2;
      }
  
      public int getAno() {
          return this.ano;
      }
  
      public int getTemas() {
          return this.temas;
      }
  
      public String getTitulo() {
          return this.Titulo;
      }
  
      public void setAno(int ano) {
          this.ano = ano;
      }
  
      public boolean foiEditadoNesteSeculo() {
          if (this.ano &gt; 2000) {
              return true;
          } else {
              return false;
          }
      }
  
      public void adicionaTemasBonus(int x) {
          this.temas += x;
      }
  
      public void mostraAlbum() {
          System.out.println(this.Titulo + " (editado em " + this.ano + "; tem " + this.temas + " temas)");
      }
  }
  </code></pre>
  
  <p>It works fine. The problem is that the teacher asked me to create a new class called <code>Band</code> and it has to have an array of Albums. The Band object should be declared with an int that represents the limit of the number of albums (the length of the array). I already have some idea on how to work with arrays, but I have no idea on how to create a type of array that contains objects from another class, and after how to use the attributes of the objects to return something. I think I can figure out the rest after I'm able to properly create the class, though.</p>
  
  <p>Apologies, as it has been described in Portuguese and I don't have much experience in translating.</p>