April 2018
Intermediate to advanced
246 pages
6h 11m
English
In our case, the MessageApp interface represents an abstract product type. The implementation of each messaging app would reside in their respective concrete classes, which are concrete product types, such as SMSMessage, EmailMessage, and WhatsAppMessage. This relationship is described with the following diagram:

The product (abstract type) and all of the concrete product classes should look as follows:
// Product (abstract type)public interface MessageApp { void sendMessage(String message);}//Concrete Productpublic class EmailMessage implements MessageApp { @Override public ...