Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. package model;
  2. import javafx.beans.property.SimpleIntegerProperty();
  3. import javafx.beans.property.SimpleStringProperty();
  4.  
  5. // Customer Class
  6. public final class Customer {
  7. private final SimpleIntegerProperty customerId = newSimpleIntegerProperty();
  8. private final SimpleStringProperty customerName = newSimpleStringProperty();
  9. private final SimpleStringProperty customerAddress = newSimpleStringProperty();
  10. private final SimpleStringProperty customerCity = newSimpleStringProperty();
  11. private final SimpleStringProperty customerZip = newSimpleStringProperty();
  12. private final SimpleStringProperty customerPhone = newSimpleStringProperty();
  13.  
  14. public Customer() {}
  15.  
  16. public Customer(int id, String name, String address, String phone, String zip) {
  17. setCustomerId(id);
  18. setCustomerName(name);
  19. setCustomerAddress(address);
  20. setCustomerCity(city);
  21. setCustomerPhone(phone);
  22. setCustomerZip(zip);
  23. }
  24.  
  25. // Getters
  26. public int getCustomerId() {
  27. return customerId.get();
  28. }
  29.  
  30. public String getCustomerName() {
  31. return customerName.get();
  32. }
  33.  
  34. public String getCustomerAddress() {
  35. return customerAddress.get();
  36. }
  37. public String getCustomerCity() {
  38. return customerCity.get();
  39. }
  40.  
  41. public String getCustomerPhone() {
  42. return customerPhone.get();
  43. }
  44.  
  45. public String getCustomerZip() {
  46. return customerZip.get();
  47. }
  48.  
  49. // Setters
  50. public void setCustomerId(int customerId) {
  51. this.customerId.set(customerId);
  52. }
  53.  
  54. public void setCustomerName(String customerName) {
  55. this.customerName.set(customerName);
  56. }
  57.  
  58. public void setCustomerAddress(String customerAddress) {
  59. this.customerAddress.set(customerAddress);
  60. }
  61.  
  62. public void setCustomerCity(String customerCity) {
  63. this.customerCity.set(customerCity);
  64. }
  65.  
  66. public void setCustomerPhone(String customerPhone) {
  67. this.customerPhone.set(customerPhone);
  68. }
  69.  
  70. public void setCustomerZip(String customerZip) {
  71. this.customerZip.set(customerZip);
  72. }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement