Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Group
- public class Group {
- private Student[] students;
- private Integer id;
- public Student getOldestStudent()
- {
- Integer maxx = 100000;
- for (int i = 0; i < students.length;i++)
- {
- Integer a = students[i];
- maxx = Integer.max(maxx, students[i]);
- }
- return ;
- }
- public boolean isEmpty()
- {
- return ;
- }
- }
- Student
- import java.text.SimpleDateFormat;
- import java.util.Date;
- public class Student {
- private String lastName;
- private String firstName;
- private String secondName;
- private Integer studentId;
- private Date birthday;
- public Student(String Name, String FName, String SName, Integer Id, Date DR)
- {
- lastName = Name;
- firstName = FName;
- secondName = SName;
- studentId = Id;
- birthday = DR;
- }
- @Override
- public String toString()
- {
- SimpleDateFormat DataFormat = new SimpleDateFormat("ddMMYYYY");
- return this.lastName+" "+this.firstName+", "+this.secondName+" "+this.studentId+" "+DataFormat.format(new Date());
- }
- }
- Solution
- import java.io.*;
- import java.util.Date;
- public class Solution {
- public static Student a1 = new Student("Enc", "Michail", "Vladimirovich", 8, new Date());
- public static Group[] group;
- public static void main(String[] args)
- {
- File file = new File("Group.txt");
- FileInputStream inFile = null;
- DataInputStream inData = null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement