Advertisement
Guest User

coddee

a guest
May 13th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. import java.util.Date;
  2.  
  3. public class User_Profile {
  4. private String username;
  5. private String password;
  6. private Boolean admin;
  7. private Date dateOfBirth;
  8.  
  9. private String email;
  10. private int ID;
  11.  
  12. public User_Profile(String username, String password, Boolean admin, Date dateOfBirth, String email, int ID){
  13. setUsername(username);
  14. setPassword(password);
  15. setAdmin(admin);
  16. setDateOfBirth(dateOfBirth);
  17. setEmail(email);
  18. setID(ID);
  19.  
  20. if(username == null || password == null) {
  21. throw new NullPointerException("Null initialisation of user object");
  22.  
  23. }
  24. this.username = username;
  25. this.password = password;
  26. }
  27.  
  28. public String getUsername() {
  29. return username;
  30. }
  31.  
  32. public void setUsername(String username) {
  33. this.username = username;
  34. }
  35.  
  36. public String getPassword() {
  37. return password;
  38. }
  39.  
  40. public void setPassword(String password) {
  41. this.password = password;
  42. }
  43.  
  44. public Boolean getAdmin() {
  45. return admin;
  46. }
  47.  
  48. public void setAdmin(Boolean admin) {
  49. this.admin = admin;
  50. }
  51.  
  52. public Date getDateOfBirth() {
  53. return dateOfBirth;
  54. }
  55.  
  56. public void setDateOfBirth(Date dateOfBirth) {
  57. this.dateOfBirth = dateOfBirth;
  58. }
  59.  
  60. public String getEmail() {
  61. return email;
  62. }
  63.  
  64. public void setEmail(String email) {
  65. this.email = email;
  66. }
  67.  
  68. public int getID() {
  69. return ID;
  70. }
  71.  
  72. public void setID(int iD) {
  73. ID = iD;
  74. }
  75.  
  76.  
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement