Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Date;
- public class User_Profile {
- private String username;
- private String password;
- private Boolean admin;
- private Date dateOfBirth;
- private String email;
- private int ID;
- public User_Profile(String username, String password, Boolean admin, Date dateOfBirth, String email, int ID){
- setUsername(username);
- setPassword(password);
- setAdmin(admin);
- setDateOfBirth(dateOfBirth);
- setEmail(email);
- setID(ID);
- if(username == null || password == null) {
- throw new NullPointerException("Null initialisation of user object");
- }
- this.username = username;
- this.password = password;
- }
- public String getUsername() {
- return username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public Boolean getAdmin() {
- return admin;
- }
- public void setAdmin(Boolean admin) {
- this.admin = admin;
- }
- public Date getDateOfBirth() {
- return dateOfBirth;
- }
- public void setDateOfBirth(Date dateOfBirth) {
- this.dateOfBirth = dateOfBirth;
- }
- public String getEmail() {
- return email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public int getID() {
- return ID;
- }
- public void setID(int iD) {
- ID = iD;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement