/** Un aviso que se envía como mensaje de texto a un celular. */
public class SmsNotification extends Notification {

    public SmsNotification(String phoneNumber, String text) {
        super(phoneNumber, text);
    }

    /** Solo existe en SmsNotification, no en Notification. */
    public String phoneNumber() {
        return recipient();
    }

    @Override
    public String send() {
        return "[SMS] al " + phoneNumber() + ": " + text();
    }

    @Override
    public long cost() {
        return 5;
    }
}
