March 2018
Intermediate to advanced
324 pages
8h 30m
English
The system is only able to send emails right now, so a change is necessary. Where? A quick investigation shows that the strategy for sending the greeting is decided in the constructor for the BirthdayGreetingService class following the strategy pattern (https://en.wikipedia.org/?title=Strategy_pattern):
public class BirthdayGreetingService {
public BirthdayGreetingService() {
messageSender = new EmailMessageSender();
}
[...]
}
Read now
Unlock full access