|
@@ -0,0 +1,71 @@
|
|
|
+/*
|
|
|
+ * 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 javaapp1;
|
|
|
+
|
|
|
+/**
|
|
|
+ *
|
|
|
+ * @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},
|
|
|
+ {5, 5, 5, 5, 5}
|
|
|
+ };
|
|
|
+ /*students = new Object[][]{
|
|
|
+ {"Андронова Вероника",new Double (5), new Double (5),new Double (4),new Double (5),new Double (4), avg.averageMark(marks[0])},
|
|
|
+ {"Баранов Михаил",new Double (5), new Double (4),new Double (5),new Double (5),new Double (5),avg.averageMark(marks[1])},
|
|
|
+ {"Белкин Пётр",new Double (4), new Double (3),new Double (4),new Double (5),new Double (5),avg.averageMark(marks[2])},
|
|
|
+ {"Бурдаев Павел",new Double (5), new Double (4),new Double (4),new Double (5),new Double (3),avg.averageMark(marks[3])},
|
|
|
+ {"Голубева Анастасия",new Double (5), new Double (4),new Double (5),new Double (5),new Double (4),avg.averageMark(marks[4])},
|
|
|
+ {"Губанов Александр",new Double (5), new Double (4),new Double (3),new Double (5),new Double (3),avg.averageMark(marks[5])},
|
|
|
+ {"Ларионова Анастасия",new Double (5), new Double (3),new Double (5),new Double (4),new Double (5),avg.averageMark(marks[6])},
|
|
|
+ {"Леонов Никита",new Double (4), new Double (5),new Double (5),new Double (3),new Double (3),avg.averageMark(marks[7])},
|
|
|
+ {"Лыско Илья",new Double (4), new Double (5),new Double (5),new Double (4),new Double (3),avg.averageMark(marks[8])},
|
|
|
+ {"Марченков Максим",new Double (4), new Double (5),new Double (5),new Double (3),new Double (5),avg.averageMark(marks[9])},
|
|
|
+ {"Пивоваров Тимур",new Double (3), new Double (5),new Double (5),new Double (4),new Double (4),avg.averageMark(marks[10])},
|
|
|
+ {"Подугольников Александр",new Double (5), new Double (5),new Double (5),new Double (5),new Double (5),avg.averageMark(marks[11])},
|
|
|
+ {"Тазиева Ирина",new Double (4), new Double (5),new Double (5),new Double (5),new Double (4),avg.averageMark(marks[12])}
|
|
|
+ };*/
|
|
|
+ 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])));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|