Advertisement
Tevronis

Java

Sep 27th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.53 KB | None | 0 0
  1. Group
  2.  
  3. public class Group {
  4.     private Student[] students;
  5.     private Integer id;
  6.     public Student getOldestStudent()
  7.     {
  8.         Integer maxx = 100000;
  9.         for (int i = 0; i < students.length;i++)
  10.         {
  11.             Integer a = students[i];
  12.             maxx = Integer.max(maxx, students[i]);
  13.         }
  14.         return ;
  15.  
  16.     }
  17.     public boolean isEmpty()
  18.     {
  19.  
  20.         return ;
  21.     }
  22.  
  23. }
  24.  
  25. Student
  26.  
  27. import java.text.SimpleDateFormat;
  28. import java.util.Date;
  29.  
  30. public class Student {
  31.     private String lastName;
  32.     private String firstName;
  33.     private String secondName;
  34.     private Integer studentId;
  35.     private Date birthday;
  36.     public Student(String Name, String FName, String SName, Integer Id, Date DR)
  37.     {
  38.         lastName = Name;
  39.         firstName = FName;
  40.         secondName = SName;
  41.         studentId = Id;
  42.         birthday = DR;
  43.     }
  44.     @Override
  45.     public String toString()
  46.     {
  47.         SimpleDateFormat DataFormat = new SimpleDateFormat("ddMMYYYY");
  48.         return this.lastName+" "+this.firstName+", "+this.secondName+" "+this.studentId+" "+DataFormat.format(new Date());
  49.     }
  50. }
  51.  
  52. Solution
  53.  
  54. import java.io.*;
  55. import java.util.Date;
  56.  
  57. public class Solution {
  58.     public static Student a1 = new Student("Enc", "Michail", "Vladimirovich", 8, new Date());
  59.     public static Group[] group;
  60.     public static void main(String[] args)
  61.     {
  62.  
  63.         File file = new File("Group.txt");
  64.         FileInputStream inFile = null;
  65.         DataInputStream inData = null;
  66.  
  67.  
  68.     }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement