TempScop: (Partial) Implement the printDetail function.