From 1f0c160216f8c7bb5269c2150ed692c53f6fe55a Mon Sep 17 00:00:00 2001 From: kxtzzl <123520267+romchhh@users.noreply.github.com> Date: Thu, 6 Apr 2023 00:22:53 +0300 Subject: [PATCH] Update lab4 --- lab4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lab4 b/lab4 index f934e79..cc834d1 100644 --- a/lab4 +++ b/lab4 @@ -44,7 +44,7 @@ public class Lab4 { int C11 = 2430 % 11; System.out.println("\n ----------------------------------------------------------------------------------------------------------"); - System.out.println(" C17 = " + C11 + ", So, the task is: Define the student class, which consists of at least 5 fields."); + System.out.println(" C11 = " + C11 + ", So, the task is: Define the student class, which consists of at least 5 fields."); System.out.println(" ----------------------------------------------------------------------------------------------------------"); Student[] students = { @@ -80,7 +80,7 @@ public class Lab4 { System.out.println("Invalid sort order! Please enter 'asc' or 'desc'."); continue; } - + Comparator comparator = null; switch (field) { case "greed book": @@ -103,7 +103,7 @@ public class Lab4 { comparator = comparator.reversed(); } Arrays.sort(students, comparator); - + System.out.println("\nSorted by " + field + " (in " + order + "ending order):"); System.out.println(String.format("%n%-15s | %-20s | %-4s | %-4s | %-10s", "Greed book", "Name", "Age", "GPA", " Faculty")); System.out.println("----------------------------------------------------------------");