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