Alexis-Coria

Correo

Nov 8th, 2021
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. public class Correo {
  2.  
  3. private String remitente;
  4. private String asunto;
  5. private String cuerpo;
  6.  
  7. public Correo(String remitente, String asunto, String cuerpo) {
  8. this.remitente = remitente;
  9. this.asunto = asunto;
  10. this.cuerpo = cuerpo;
  11. }
  12.  
  13. public String getRemitente() {
  14. return remitente;
  15. }
  16.  
  17. public void setRemitente(String remitente) {
  18. this.remitente = remitente;
  19. }
  20.  
  21. public String getAsunto() {
  22. return asunto;
  23. }
  24.  
  25. public void setAsunto(String asunto) {
  26. this.asunto = asunto;
  27. }
  28.  
  29. public String getCuerpo() {
  30. return cuerpo;
  31. }
  32.  
  33. public void setCuerpo(String cuerpo) {
  34. this.cuerpo = cuerpo;
  35. }
  36.  
  37. @Override
  38. public String toString() {
  39. return "Correo recibido: {Remitente:" + remitente + " | Asunto:" + asunto + " | Cuerpo: " + cuerpo+"}";
  40.  
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment