Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class User {
- protected static final String String1 = "fdgf";
- protected String username = "phantomblade";
- protected String password = "shadows";
- protected static String addMoney = "AddMoney";
- protected static String pullingMoney = "PullingMoney";
- protected static String checkingAccount = "CheckingAccount";
- private double account;
- protected User(String username, String password) {
- this.password = password;
- this.username = username;
- this.account = 1000;
- }
- protected User() {
- }
- protected String getPassword() {
- return password;
- }
- protected String getUsername() {
- return username;
- }
- protected String getAddMoney() {
- return addMoney;
- }
- protected String getPullingMoney() {
- return pullingMoney;
- }
- protected String getCheckingAccount() {
- return checkingAccount;
- }
- protected String LoggIn(String User) {
- User obj = new User("phantomblade648", "magicalRod");
- if (obj.LoggIn(username).equals(username)) {
- System.out.println("penties");
- }
- return username;
- }
- protected double addMoney(int t) {
- double account=1000;
- account = account + t;
- return account;
- }
- protected double pullingMoney(int v) {
- double account=1000;
- account = account - v;
- return account;
- }
- protected double checkingAccount() {
- return account;
- }
- @Override
- public boolean equals(Object arg0) {
- if(!(arg0 instanceof User))
- return false;
- User user2 = (User) arg0;
- if(user2.username.equals(this.username) && user2.password.equals(this.password)){
- return true;
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement