Order.java 363 B

123456789101112131415161718192021222324
  1. class Order {
  2. private String id;
  3. private double total;
  4. public Order(String id, double total) {
  5. this.id = id;
  6. this.total = total;
  7. }
  8. public String getId() {
  9. return id;
  10. }
  11. public double getTotal() {
  12. return total;
  13. }
  14. public String toString() {
  15. return "Order{" +
  16. "id='" + id + '\'' +
  17. ", total=" + total + '}';
  18. }
  19. }