public static void Main() { var builder = new ReportBuilder(); var sender = new SmsReportSender(); var reporter = new Reporter(builder, sender); reporter.SendReports(); }
static void Main(string[] args) { //new new new ...? var builder = new ReportBuilder(); var senderSms = new SmsReportSender(); var reporter = new Reporter(builder, senderSms); reporter.SendReports(); var senderEmail = new EmailReportSender(); var reporter2 = new Reporter(builder, senderEmail); reporter2.SendReports(); }