public class Student { Notas notas; public Student(Notas notas){ this.notas = notas; } public void preguntarNotas(){ System.out.println("Las notas del estudiante son: "); int[] notass = notas.getNotas(); for(int nota: notass){ System.out.println(nota); } } public static void main(String[] args){ int[] notasTemp = {2, 3, 4, 5, 4}; Notas notas = new Notas(notasTemp, "Asuncion, Barrio Las Mercedes"); Student estudiante = new Student(notas); estudiante.preguntarNotas(); } } class Notas { private int[] notas; private String direccion; public Notas(int[] notas, String direccion){ this.notas = notas; this.direccion = direccion; } public int[] getNotas() { return notas; } public void setNotas(int[] notas) { this.notas = notas; } private String getDireccion() { return direccion; } public void setDireccion(String direccion) { this.direccion = direccion; } }