|
@@ -0,0 +1,57 @@
|
|
|
+/*
|
|
|
+ * To change this license header, choose License Headers in Project Properties.
|
|
|
+ * To change this template file, choose Tools | Templates
|
|
|
+ * and open the template in the editor.
|
|
|
+ */
|
|
|
+package Students;
|
|
|
+
|
|
|
+/**
|
|
|
+ *
|
|
|
+ * @author Вероника
|
|
|
+ */
|
|
|
+import java.util.*;
|
|
|
+public class Main {
|
|
|
+ public ArrayList<Student> students = new ArrayList<Student>();
|
|
|
+ //public Object [][] students;
|
|
|
+ public static void main (String[] args) {
|
|
|
+ Main m = new Main();
|
|
|
+ m.createData();
|
|
|
+ Tablet tablet = new Tablet();
|
|
|
+ tablet.runGUI(m.students);
|
|
|
+ Sortirovka sort = new Sortirovka();
|
|
|
+ m.students = sort.quickSort(m.students, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void createData(){
|
|
|
+ Average avg = new Average();
|
|
|
+ double[][] marks = {{5, 5, 4, 5, 4},
|
|
|
+ {5, 4, 5, 5, 5},
|
|
|
+ {4, 3, 4, 5, 5},
|
|
|
+ {5, 4, 4, 5, 3},
|
|
|
+ {5, 4, 5, 5, 4},
|
|
|
+ {5, 4, 3, 5, 3},
|
|
|
+ {5, 3, 5, 4, 5},
|
|
|
+ {4, 5, 5, 3, 3},
|
|
|
+ {4, 5, 5, 4, 3},
|
|
|
+ {4, 5, 5, 3, 5},
|
|
|
+ {3, 5, 5, 4, 4},
|
|
|
+ {5, 5, 5, 5, 5},
|
|
|
+ {4, 5, 5, 5, 4}
|
|
|
+ };
|
|
|
+
|
|
|
+ students.add(new Student("Андронова Вероника", 5, 5, 4, 5, 4, avg.averageMark(marks[0])));
|
|
|
+ students.add(new Student("Баранов Михаил", 5, 4, 5, 5, 5, avg.averageMark(marks[1])));
|
|
|
+ students.add(new Student("Белкин Пётр", 4, 3, 3, 5, 5, avg.averageMark(marks[2])));
|
|
|
+ students.add(new Student("Бурдаев Павел", 5, 4, 4, 5, 3, avg.averageMark(marks[3])));
|
|
|
+ students.add(new Student("Голубева Анастасия", 5, 4, 5, 5, 4, avg.averageMark(marks[4])));
|
|
|
+ students.add(new Student("Губанов Александр", 5, 4, 3, 5, 3, avg.averageMark(marks[5])));
|
|
|
+ students.add(new Student("Ларионова Анастасия", 5, 3, 5, 4, 5, avg.averageMark(marks[6])));
|
|
|
+ students.add(new Student("Леонов Никита", 4, 5, 5, 3, 3, avg.averageMark(marks[7])));
|
|
|
+ students.add(new Student("Лыско Илья", 4, 5, 5, 4, 3, avg.averageMark(marks[8])));
|
|
|
+ students.add(new Student("Марченков Максим", 4, 5, 5, 3, 5, avg.averageMark(marks[9])));
|
|
|
+ students.add(new Student("Пивоваров Тимур", 3, 5, 5, 4, 4, avg.averageMark(marks[10])));
|
|
|
+ students.add(new Student("Подугольников Александр", 5, 5, 5, 5, 5, avg.averageMark(marks[11])));
|
|
|
+ students.add(new Student("Тазиева Ирина", 4, 5, 5, 5, 4, avg.averageMark(marks[12])));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|