Format
This commit is contained in:
parent
8a37f15a13
commit
dc698c3f88
6
pom.xml
6
pom.xml
@ -28,6 +28,12 @@
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.9.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>RELEASE</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
@ -1,64 +1,58 @@
|
||||
public class Person {
|
||||
|
||||
private Account account;
|
||||
private Education edu;
|
||||
private String name;
|
||||
private Car car;
|
||||
private Location location;
|
||||
private Account account;
|
||||
private Education edu;
|
||||
private String name;
|
||||
private Car car;
|
||||
private Location location;
|
||||
|
||||
|
||||
public Person(int ID, String name, Level lvl) {
|
||||
account = new Account(name,ID);
|
||||
edu = new Education(null, null, lvl);
|
||||
car = new Car();
|
||||
location = new Location();
|
||||
this.name = name;
|
||||
}
|
||||
public Person(int ID, String name, Level lvl) {
|
||||
account = new Account(name, ID);
|
||||
edu = new Education(null, null, lvl);
|
||||
car = new Car();
|
||||
location = new Location();
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Account getAccount() {
|
||||
return account;
|
||||
}
|
||||
public Account getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public Education getEdu() {
|
||||
return edu;
|
||||
}
|
||||
public Education getEdu() {
|
||||
return edu;
|
||||
}
|
||||
|
||||
public Car getCar() {
|
||||
return car;
|
||||
}
|
||||
public Car getCar() {
|
||||
return car;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setCar(Car car) {
|
||||
this.car = car;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Location getLocation() {
|
||||
return location;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setLocation(Location location) {
|
||||
this.location = location;
|
||||
}
|
||||
public Location getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setCar(Car car) {
|
||||
this.car = car;
|
||||
}
|
||||
public void setLocation(Location location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public boolean hasCar() {
|
||||
if (car.getMake() != null) {
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
public boolean hasCar() {
|
||||
return car.getMake() != null;
|
||||
}
|
||||
|
||||
public boolean isPHD() {
|
||||
if (this.edu.getLevel() == Level.PHD) {
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
public boolean isPHD() {
|
||||
return this.edu.getLevel() == Level.PHD;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user