diff --git a/src/main/java/ru/j4j/pojo/College.java b/src/main/java/ru/j4j/pojo/College.java new file mode 100644 index 0000000..69286bc --- /dev/null +++ b/src/main/java/ru/j4j/pojo/College.java @@ -0,0 +1,15 @@ +package ru.j4j.pojo; + +import java.util.Date; + +public class College { + public static void main(String[] args) { + Student student = new Student(); + student.setSurname("Libovsky"); + student.setGroup(1814); + student.setStatStudy(new Date()); + + System.out.printf("Student: %s, Group: %s, Start of study: %s", student.getSurname(), + student.getGroup(), student.getStatStudy()); + } +} diff --git a/src/main/java/ru/j4j/pojo/License.java b/src/main/java/ru/j4j/pojo/License.java new file mode 100644 index 0000000..aa5b13c --- /dev/null +++ b/src/main/java/ru/j4j/pojo/License.java @@ -0,0 +1,43 @@ +package ru.j4j.pojo; + +import java.util.Date; + +public class License { + private String owner; + private String model; + private String code; + private Date created; + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } +} + diff --git a/src/main/java/ru/j4j/pojo/Police.java b/src/main/java/ru/j4j/pojo/Police.java new file mode 100644 index 0000000..3c47dc5 --- /dev/null +++ b/src/main/java/ru/j4j/pojo/Police.java @@ -0,0 +1,15 @@ +package ru.j4j.pojo; + +import java.util.Date; + +public class Police { + public static void main(String[] args) { + License license = new License(); + license.setOwner("Dmitrii Kapustin"); + license.setModel("Cadillac"); + license.setCode("x111xx"); + license.setCreated(new Date()); + + System.out.println(license.getOwner() + " has a car - " + license.getModel() + " : " + license.getCode()); + } +} diff --git a/src/main/java/ru/j4j/pojo/Student.java b/src/main/java/ru/j4j/pojo/Student.java new file mode 100644 index 0000000..1c1444e --- /dev/null +++ b/src/main/java/ru/j4j/pojo/Student.java @@ -0,0 +1,33 @@ +package ru.j4j.pojo; + +import java.util.Date; + +public class Student { + private String surname; + private int group; + private Date statStudy; + + public String getSurname() { + return surname; + } + + public void setSurname(String surname) { + this.surname = surname; + } + + public int getGroup() { + return group; + } + + public void setGroup(int group) { + this.group = group; + } + + public Date getStatStudy() { + return statStudy; + } + + public void setStatStudy(Date statStudy) { + this.statStudy = statStudy; + } +}