Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created May 31, 2019 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/ae2c9afc7756479ddcd409e06838881f to your computer and use it in GitHub Desktop.
Save jasongorman/ae2c9afc7756479ddcd409e06838881f to your computer and use it in GitHub Desktop.
public class BasketItem {
private double price;
private int quantity;
public BasketItem(double price, int quantity) {
this.price = price;
this.quantity = quantity;
}
double subtotal() {
return price * quantity;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment