Format
This commit is contained in:
parent
8a37f15a13
commit
dc698c3f88
70
pom.xml
70
pom.xml
@ -1,33 +1,39 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>Java</groupId>
|
<groupId>Java</groupId>
|
||||||
<artifactId>Java</artifactId>
|
<artifactId>Java</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<name>JavaTesting</name>
|
<name>JavaTesting</name>
|
||||||
<build>
|
<build>
|
||||||
<sourceDirectory>src</sourceDirectory>
|
<sourceDirectory>src</sourceDirectory>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.0</version>
|
<version>3.8.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.googlecode.json-simple</groupId>
|
<groupId>com.googlecode.json-simple</groupId>
|
||||||
<artifactId>json-simple</artifactId>
|
<artifactId>json-simple</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>joda-time</groupId>
|
<groupId>joda-time</groupId>
|
||||||
<artifactId>joda-time</artifactId>
|
<artifactId>joda-time</artifactId>
|
||||||
<version>2.9.9</version>
|
<version>2.9.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
</dependencies>
|
<groupId>org.jetbrains</groupId>
|
||||||
|
<artifactId>annotations</artifactId>
|
||||||
|
<version>RELEASE</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
</project>
|
</project>
|
122
src/Person.java
122
src/Person.java
@ -1,64 +1,58 @@
|
|||||||
public class Person {
|
public class Person {
|
||||||
|
|
||||||
private Account account;
|
private Account account;
|
||||||
private Education edu;
|
private Education edu;
|
||||||
private String name;
|
private String name;
|
||||||
private Car car;
|
private Car car;
|
||||||
private Location location;
|
private Location location;
|
||||||
|
|
||||||
|
|
||||||
public Person(int ID, String name, Level lvl) {
|
public Person(int ID, String name, Level lvl) {
|
||||||
account = new Account(name,ID);
|
account = new Account(name, ID);
|
||||||
edu = new Education(null, null, lvl);
|
edu = new Education(null, null, lvl);
|
||||||
car = new Car();
|
car = new Car();
|
||||||
location = new Location();
|
location = new Location();
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Account getAccount() {
|
public Account getAccount() {
|
||||||
return account;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Education getEdu() {
|
public Education getEdu() {
|
||||||
return edu;
|
return edu;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Car getCar() {
|
public Car getCar() {
|
||||||
return car;
|
return car;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public void setCar(Car car) {
|
||||||
return name;
|
this.car = car;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName(String name) {
|
public String getName() {
|
||||||
this.name = name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location getLocation() {
|
public void setName(String name) {
|
||||||
return location;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLocation(Location location) {
|
public Location getLocation() {
|
||||||
this.location = location;
|
return location;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCar(Car car) {
|
public void setLocation(Location location) {
|
||||||
this.car = car;
|
this.location = location;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasCar() {
|
public boolean hasCar() {
|
||||||
if (car.getMake() != null) {
|
return car.getMake() != null;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
else return false;
|
public boolean isPHD() {
|
||||||
}
|
return this.edu.getLevel() == Level.PHD;
|
||||||
|
}
|
||||||
public boolean isPHD() {
|
|
||||||
if (this.edu.getLevel() == Level.PHD) {
|
}
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user