hw3: init
This commit is contained in:
7
hw3/src/AlbumIterator.java
Normal file
7
hw3/src/AlbumIterator.java
Normal 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
10
hw3/src/Photo.java
Normal 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
|
||||
}
|
||||
6
hw3/src/SortingStrategy.java
Normal file
6
hw3/src/SortingStrategy.java
Normal file
@@ -0,0 +1,6 @@
|
||||
import java.util.List;
|
||||
|
||||
public interface SortingStrategy<T> {
|
||||
List<T> sort(List<T> photos);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user