Created
April 5, 2018 18:31
-
-
Save aritraroy/2dc4d4a339737ddf31ae2d48e47588ec to your computer and use it in GitHub Desktop.
This file contains 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 class Order { | |
private String id; | |
private String origin; | |
private double price; | |
public Order(String id, String origin, double price) { | |
this.id = id; | |
this.origin = origin; | |
if (price < 0) { | |
this.price = 0; | |
} else { | |
this.price = price; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment