hw3: init

This commit is contained in:
2025-03-24 01:38:54 -07:00
parent 593840bd51
commit 81abdd064d
12 changed files with 176 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
public interface AlbumIterator {
boolean hasNext(); // to check if there is a next element
boolean hasPrevious(); // to check if there is a previous element
Photo current(); // to get the photo at the current position
Photo next(); // to advance the iterator to the next position
Photo previous(); // to advance the iterator to the previous position
}

10
hw3/src/Photo.java Normal file
View File

@@ -0,0 +1,10 @@
import java.util.Date;
public class Photo {
private String name;
private String filePath;
private Date dateAdded;
private long fileSize;
// Constructor, getters, and setters
}

View File

@@ -0,0 +1,6 @@
import java.util.List;
public interface SortingStrategy<T> {
List<T> sort(List<T> photos);
}