public class Person
   {private String name;
    private double avg;
    
    public Person(String name, double avg)
     {this.name = name;
      this.avg = avg;
    }
    
    public String getName()
     {return name;
        }
        
        public double getAvg()
         {return avg;
            }
        }

____________________________________________________

public class Room
 {private Person[][] ar = new Person[3][4];
     
  public Room()
   {for(int r=0; r < ar.length; r++)
       for (int c=0; c < ar[0].length; c++)
         ar[r][c] = new Person("Joe",Math.random()*100);
        }
        
    public void print()
     {for (Person[] row :  ar)
          for (Person p : row)
            System.out.println(p.getName() + " " + p.getAvg());
        }
    }