import { DataModel } from '../data-model' ; import { Logger , MessageType } from '../logging' ; export class MainReport { private readonly _logger : Logger ; public constructor ( logger ) { this . _logger = logger ; this . _logger . log ( MessageType . Info , 'Constructing MainReport' ) ; } public showReport ( dataModel ) { console . log ( '\n---------------------------------------' ) ; console . log ( 'REPORT' ) ; console . log ( '---------------------------------------' ) ; for ( const record of dataModel . queryRecords ( ) ) { console . log ( `${ record . firstName } ${ record . lastName }: Age=${ record . age }` ) ; } console . log ( '---------------------------------------\n' ) ; } }