date update
This commit is contained in:
parent
f97260e256
commit
a26e9a9a9f
6
pom.xml
6
pom.xml
@ -23,5 +23,11 @@
|
|||||||
<artifactId>json-simple</artifactId>
|
<artifactId>json-simple</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>joda-time</groupId>
|
||||||
|
<artifactId>joda-time</artifactId>
|
||||||
|
<version>2.9.9</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
@ -1,11 +1,15 @@
|
|||||||
|
import java.sql.Date;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
import org.joda.*;
|
||||||
|
import org.joda.time.LocalDate;
|
||||||
|
|
||||||
//TODO: save Person as JSON
|
//TODO: save Person as JSON
|
||||||
//TODO: save Persons as list (databse)
|
//TODO: save Persons as list (databse)
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Person p = new Person(12345, "Hesham", Level.BA);
|
Person p = new Person(12345, "Hesham", Level.BA);
|
||||||
@ -51,15 +55,18 @@ public class Main {
|
|||||||
* @since 0.1
|
* @since 0.1
|
||||||
*/
|
*/
|
||||||
public static void Print(Person p) {
|
public static void Print(Person p) {
|
||||||
|
LocalDate date = new LocalDate();
|
||||||
|
|
||||||
System.out.println(
|
System.out.println(
|
||||||
"\n\n\n\t---------INFO---------\n"
|
"\n\n\n\t---------INFO---------\n"
|
||||||
+ "\tName: "+p.getAccount().getName()+"\n"
|
+ "\t --- "+ date.toString()+" ---\n"
|
||||||
+ "\tID: "+p.getAccount().getID()+"\n"
|
+ "\tName: "+p.getAccount().getName()+"\n"
|
||||||
+ "\tMajor: "+p.getEdu().getMajor()+"\n"
|
+ "\tID: "+p.getAccount().getID()+"\n"
|
||||||
+ "\tSchool: "+p.getEdu().getSchool()+"\n"
|
+ "\tMajor: "+p.getEdu().getMajor()+"\n"
|
||||||
+ "\tCity: "+p.getLocation().cityBasedOnIP()+"\n"
|
+ "\tSchool: "+p.getEdu().getSchool()+"\n"
|
||||||
+ "\tAccountType: "+p.getAccount().getAccountType()+"\n"
|
+ "\tCity: "+p.getLocation().cityBasedOnIP()+"\n"
|
||||||
+ "\t---------COURSES---------");
|
+ "\tAccountType: "+p.getAccount().getAccountType()+"\n"
|
||||||
|
+ "\t---------COURSES---------");
|
||||||
int i = 1;
|
int i = 1;
|
||||||
for (Course course : p.getEdu().getCourses()) {
|
for (Course course : p.getEdu().getCourses()) {
|
||||||
System.out.println("\tCourse "+i+": "+course.name());
|
System.out.println("\tCourse "+i+": "+course.name());
|
||||||
|
Loading…
Reference in New Issue
Block a user