Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. package modelo;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.List;
  5.  
  6. import enums.NombresTiendas;
  7.  
  8. public class Compradores {
  9.  
  10. private String nombre;
  11. private Boolean habitual;
  12. private Integer mediaGasto;
  13. private List<NombresTiendas> nomTiendaLST;
  14.  
  15. public Compradores() {
  16.  
  17. }
  18.  
  19. public Compradores(String nombreAux, Boolean habitualAux, Integer mediaGastoAux,
  20. List<NombresTiendas> nomTiendaLSTAux) {
  21.  
  22. nombre = nombreAux;
  23. habitual = habitualAux;
  24. mediaGasto = mediaGastoAux;
  25.  
  26. if (nomTiendaLSTAux != null) {
  27.  
  28. nomTiendaLST = nomTiendaLSTAux;
  29.  
  30. }
  31.  
  32. else {
  33.  
  34. nomTiendaLST = new ArrayList<NombresTiendas>();
  35.  
  36. }
  37.  
  38. }
  39.  
  40. public String getNombre() {
  41.  
  42. return nombre;
  43.  
  44. }
  45.  
  46. public void setNombre(String nombreAux) {
  47.  
  48. nombre = nombreAux;
  49.  
  50. }
  51.  
  52. public Boolean getHabitual() {
  53.  
  54. return habitual;
  55.  
  56. }
  57.  
  58. public void setHabitual(Boolean habitualAux) {
  59.  
  60. habitual = habitualAux;
  61.  
  62. }
  63.  
  64. public Integer getMediaGasto() {
  65.  
  66. return mediaGasto;
  67.  
  68. }
  69.  
  70. public void setMediaGasto(Integer mediaGastoAux) {
  71.  
  72. mediaGasto = mediaGastoAux;
  73.  
  74. }
  75.  
  76. public List<NombresTiendas> getNomTiendaLST() {
  77.  
  78. return nomTiendaLST;
  79.  
  80. }
  81.  
  82. public void setNomTiendaLST(List<NombresTiendas> nomTiendaLSTAux) {
  83.  
  84. nomTiendaLST = nomTiendaLSTAux;
  85.  
  86. }
  87.  
  88. public String toString() {
  89.  
  90. return nombre + " es un cliente de El Corte Inglés, " + habitual
  91. + " es habitual en la tienda. Gasta una media de " + mediaGasto
  92. + " € al año. Sin duda, su tienda favorita es " + nomTiendaLST;
  93.  
  94. }
  95.  
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement