-
Notifications
You must be signed in to change notification settings - Fork 313
Mediator. Minor changes; Strategy. Major changes #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -35,7 +35,7 @@ public void collectPaymentDetails() { | |||
System.out.print("Enter password: "); | |||
password = READER.readLine(); | |||
if (verify()) { | |||
System.out.println("Data verification was successful"); | |||
System.out.println("Data verification has succeeded"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to match success message in Demo class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it should be "has been". Can you please fix it there too?
UPD: Nevermind, I'll do it myself.
@@ -59,7 +59,7 @@ public static void main(String[] args) throws IOException { | |||
// пользовательских данных, конфигурации и прочих параметров. | |||
if (paymentMethod.equals("1")) { | |||
strategy = new PayByPayPal(); | |||
} else if (paymentMethod.equals("2")) { | |||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to prevent null pointer exception if value is not 1 or 2
@@ -71,20 +71,20 @@ public static void main(String[] args) throws IOException { | |||
// т.к. только стратегии знают какие данные им нужны для приёма | |||
// оплаты. | |||
order.processOrder(strategy); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved this code inside while loop
@@ -35,7 +35,7 @@ public void collectPaymentDetails() { | |||
System.out.print("Enter password: "); | |||
password = READER.readLine(); | |||
if (verify()) { | |||
System.out.println("Data verification was successful"); | |||
System.out.println("Data verification has succeeded"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it should be "has been". Can you please fix it there too?
UPD: Nevermind, I'll do it myself.
No description provided.