38 lines
722 B
Java
38 lines
722 B
Java
package exp11;
|
|
|
|
public class Account {
|
|
private String username;
|
|
private String password;
|
|
private boolean lock;
|
|
|
|
public Account(String username, String password, String lock) {
|
|
this.username = username;
|
|
this.password = password;
|
|
if(lock.equals("true")){
|
|
this.lock = true;
|
|
}else {
|
|
this.lock = false;
|
|
}
|
|
}
|
|
|
|
String getUserName() {
|
|
return this.username;
|
|
}
|
|
|
|
String getPassword() {
|
|
return this.password;
|
|
}
|
|
|
|
boolean isLock() {
|
|
return lock;
|
|
}
|
|
|
|
void lock() {
|
|
this.lock = true;
|
|
}
|
|
|
|
public String toString() {
|
|
return this.username +"," +this.password +"," +this.lock;
|
|
}
|
|
}
|