-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBackendInterface.java
More file actions
47 lines (41 loc) · 1.47 KB
/
Copy pathBackendInterface.java
File metadata and controls
47 lines (41 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// --== CS400 Fall 2023 File Header Information ==--
// Name: Arnav Srivastav
// Email: asrivastav32@wisc.edu
// Group: C35
// TA: Alexander Peseckis
// Lecturer: Florian Heimerl
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
public interface BackendInterface {
/**
* Read meteorite data from a file and populate the data structure.
*
* @param filePath The path to the data file.
* @throws FileNotFoundException If the file is not found.
* @throws IOException If an I/O error occurs.
*/
void readDataFromFile(String filePath) throws FileNotFoundException, IOException;
/**
* Insert meteorite data from a CSV file into the data structure.
*
* @param fileName The name of the CSV file.
* @return True if insertion is successful, false otherwise.
* @throws IOException If an I/O error occurs.
*/
boolean insertFromCSV(String fileName) throws IOException;
/**
* Get meteorites with the maximum mass.
*
* @return A list of meteorites with the maximum mass.
*/
List<Meteorite> getMeteoritesWithMaxMass();
/**
* Get meteorites within a specified mass range.
*
* @param minMass The lower bound of the mass range.
* @param maxMass The upper bound of the mass range.
* @return A list of meteorites within the specified mass range.
*/
List<Meteorite> getMeteoritesWithinMassRange(double minMass, double maxMass);
}