removes the Citizen class in src directory.

changes messages printed by the secretary and the president.
This commit is contained in:
Ehsan 2019-11-29 02:59:56 +03:30
parent 5d790266e7
commit e30d11545f
3 changed files with 3 additions and 14 deletions

View File

@ -1,11 +0,0 @@
package com.designpatterns.structural.proxy;
import com.designpatterns.structural.proxy.president.PresidentSecretary;
public class Citizen {
public static void main(String[] args) {
PresidentSecretary presidentSecretary = new PresidentSecretary();
presidentSecretary.leaveValidMessageForPresident("Hello president.");
}
}

View File

@ -22,6 +22,6 @@ public class President {
void talkToThePresident(String message){
System.out.println("I, the President, have received this message:" + message);
System.out.println("President: I have received the message:" + message);
}
}

View File

@ -13,9 +13,9 @@ public class PresidentSecretary {
if(!isMessageValid(message))
throw new RuntimeException("invalid message");
System.out.println("message is being sent to the President...");
System.out.println("Secretary: message is being sent to the President...");
president.talkToThePresident(message);
System.out.println("message is received by the President.");
System.out.println("Secretary: message is sent to the President.");
}