You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
359 B
19 lines
359 B
3 years ago
|
package patronMediator;
|
||
|
|
||
|
public class ColegaConcreto2 extends Colega{
|
||
|
|
||
|
public ColegaConcreto2(Mediador mediador) {
|
||
|
super(mediador);
|
||
|
}
|
||
|
|
||
|
public void enviarMensaje(String mensaje) {
|
||
|
mediador.enviarMensaje(mensaje, this);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void mensajeRecibido(String mensaje) {
|
||
|
System.out.println("Colega 2 recibe el mensaje: " + mensaje);
|
||
|
}
|
||
|
|
||
|
}
|