Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.student.first_machlakot;
- /**
- * Created by student on 07/12/2017.
- */
- public class User {
- protected String nameOfUser;
- protected boolean gender; // True -> male , False -> female
- protected int phone;
- protected String email;
- protected int password;
- protected int id;
- protected String place;
- protected int numberOfAddedTresh;
- protected int numberOfAddedThings;
- protected int points;
- //All propartirs user
- public User(String nameOfUser, boolean gender, int phone, String email, int password, int id, String place, int numberOfAddedTresh, int numberOfAddedThings, int points) {
- this.nameOfUser = nameOfUser;
- this.gender = gender;
- this.phone = phone;
- this.email = email;
- this.password = password;
- this.id = id;
- this.place = place;
- this.numberOfAddedTresh = numberOfAddedTresh;
- this.numberOfAddedThings = numberOfAddedThings;
- this.points = points;
- }
- //No ID user
- public User(String nameOfUser, boolean gender, int phone, String email, int password, String place, int numberOfAddedTresh, int numberOfAddedThings, int points) {
- this.nameOfUser = nameOfUser;
- this.gender = gender;
- this.phone = phone;
- this.email = email;
- this.password = password;
- this.place = place;
- this.numberOfAddedTresh = numberOfAddedTresh;
- this.numberOfAddedThings = numberOfAddedThings;
- this.points = points;
- }
- //Only email and password user
- public User(String email, int password) {
- this.email = email;
- this.password = password;
- }
- //Important things only+
- public User(String nameOfUser, boolean gender, String email, int password) {
- this.nameOfUser = nameOfUser;
- this.gender = gender;
- this.email = email;
- this.password = password;
- }
- //Copy function
- public User(User user) {
- this.nameOfUser = user.nameOfUser;
- this.gender = user.gender;
- this.phone = user.phone;
- this.email = user.email;
- this.password = user.password;
- this.id = user.id;
- this.place = user.place;
- this.numberOfAddedTresh = user.numberOfAddedTresh;
- this.numberOfAddedThings = user.numberOfAddedThings;
- this.points = user.points;
- }
- public String getNameOfUser() {
- return nameOfUser;
- }
- public void setNameOfUser(String nameOfUser) {
- this.nameOfUser = nameOfUser;
- }
- public boolean isGender() {
- return gender;
- }
- public void setGender(boolean gender) {
- this.gender = gender;
- }
- public int getPhone() {
- return phone;
- }
- public void setPhone(int phone) {
- this.phone = phone;
- }
- public String getEmail() {
- return email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public int getPassword() {
- return password;
- }
- public void setPassword(int password) {
- this.password = password;
- }
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public String getPlace() {
- return place;
- }
- public void setPlace(String place) {
- this.place = place;
- }
- public int getNumberOfAddedTresh() {
- return numberOfAddedTresh;
- }
- public void setNumberOfAddedTresh(int numberOfAddedTresh) {
- this.numberOfAddedTresh = numberOfAddedTresh;
- }
- public int getNumberOfAddedThings() {
- return numberOfAddedThings;
- }
- public void setNumberOfAddedThings(int numberOfAddedThings) {
- this.numberOfAddedThings = numberOfAddedThings;
- }
- public int getPoints() {
- return points;
- }
- public void setPoints(int points) {
- this.points = points;
- }
- @Override
- public String toString() {
- return "User{" +
- "nameOfUser='" + nameOfUser + '\'' +
- ", gender=" + gender +
- ", phone=" + phone +
- ", email='" + email + '\'' +
- ", password=" + password +
- ", id=" + id +
- ", place='" + place + '\'' +
- ", numberOfAddedTresh=" + numberOfAddedTresh +
- ", numberOfAddedThings=" + numberOfAddedThings +
- ", points=" + points +
- '}';
- }
- }
Add Comment
Please, Sign In to add comment