Skip to content

Instantly share code, notes, and snippets.

@djiwandou
Created October 11, 2019 04:13
Show Gist options
  • Select an option

  • Save djiwandou/1cf025fb7373f449bb434604a8a7e1c3 to your computer and use it in GitHub Desktop.

Select an option

Save djiwandou/1cf025fb7373f449bb434604a8a7e1c3 to your computer and use it in GitHub Desktop.
class Order {
// ...
public double price() {
private double primaryBasePrice;
private double secondaryBasePrice;
//this might be needed in the future
private double tertiaryBasePrice;
public double getPrimaryBasePrice() {
return primaryBasePrice;
}
public double setPrimaryBasePrice(double primaryBasePrice) {
this.primaryBasePrice = primaryBasePrice;
}
public double getSecondaryBasePrice() {
return secondaryBasePrice;
}
public double setSecondaryBasePrice(double secondaryBasePrice) {
this.secondaryBasePrice = secondaryBasePrice;
}
//this might be needed in the future
public double getTertiaryBasePrice() {
return tertiaryBasePrice;
}
public double setTertiaryBasePrice(double tertiaryBasePrice) {
this.tertiaryBasePrice = tertiaryBasePrice;
}
// Perform long computation.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment