Last active
January 30, 2019 14:22
-
-
Save nschlimm/13fe09e5d9decd8201edf4b278e97e14 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ShoppingBasket1 { | |
private String orderNo; | |
private List<String> articleNumbers = new ArrayList<>(); | |
public void add(String articleNumber) { | |
articleNumbers.add(articleNumber); | |
} | |
public String getOrderNo() { | |
return orderNo; | |
} | |
public void setOrderNo(String orderNo) { | |
this.orderNo = orderNo; | |
} | |
public void order() { | |
// some ordering logic and if succeeded, change state | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment