public class ReportPrinter {
public static void printStudentReport(Student s) {
CorsoDiLaurea cdl = s.getCorsoDiLaurea();
Carriera c = s.getCarriera();
String a = s.getInfoAnagrafiche();
this.println (a + "\n" + cdl.detailString() + "\nCarriera:");
for(EsameSostenuto e: c.getEsamiSostenuti() ) {
this.println(e.nome + "-" + e.cfu + "-" + e.getVoto() );
}
this.println ("Media: " + c.get.Media() );
}
/*any code omitted */
}
I have more or less arrived at this solution (below) but how is this managed? the println method is part of System.Out so you need to create a lifeline?
