Develop #1

Merged
HoseinA05 merged 4 commits from develop into main 2026-07-30 12:25:02 +00:00
Showing only changes of commit 8bd1c24c95 - Show all commits
+19 -3
View File
@@ -1,4 +1,5 @@
import java.io.IOException;
import java.util.List;
public class Main {
public static void main(String[] args) {
@@ -9,10 +10,25 @@ public class Main {
// Instantiate the parser
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("--- Movies Sorted By Title ---");
List<Movie> sortedByTitle = parser.sortByTitle();
for (Movie movie : sortedByTitle) {
System.out.println(movie.toString());
}
// Testing sortByRating
System.out.println("\n--- Movies Sorted By Rating (Descending) ---");
List<Movie> sortedByRating = parser.sortByRating();
for (Movie movie : sortedByRating) {
System.out.println(movie.toString());
}
// Testing sortByYear
System.out.println("\n--- Movies Sorted By Year (Descending) ---");
List<Movie> sortedByYear = parser.sortByYear();
for (Movie movie : sortedByYear) {
System.out.println(movie.toString());
}
System.out.println("Movies parsed successfully! Total movies: " + parser.sortByTitle().size());
} catch (IOException e) {