This commit is contained in:
Arefe Talebi
2026-05-14 20:57:03 +03:30
parent 7e0386ce16
commit ff4f6e0f83
3 changed files with 43 additions and 19 deletions
+14 -3
View File
@@ -10,9 +10,20 @@ public class Main {
Parser parser = new Parser(filePath);
// TODO: You can test your code here before you run the unit tests.
// Example: Call your sorting methods, iterate through the returned list,
// and print out the movies to see if they match the expected results in the Help folder.
System.out.println("=== Sort By Title ===");
for (Movie movie : parser.sortByTitle()) {
System.out.println(movie);
}
System.out.println();
System.out.println("=== Sort By Rating ===");
for (Movie movie : parser.sortByRating()) {
System.out.println(movie);
}
System.out.println();
System.out.println("=== Sort By Year ===");
for (Movie movie : parser.sortByYear()) {
System.out.println(movie);}
System.out.println();
System.out.println("Movies parsed successfully! Total movies: " + parser.sortByTitle().size());
} catch (IOException e) {