54 lines
1.8 KiB
Java
54 lines
1.8 KiB
Java
import java.util.ArrayList;
|
|
|
|
//time 11:10 - 11:22
|
|
//time 12:00 - 16:10
|
|
//time1 - 10:10 10:30
|
|
//~11:30 - 15:30 -- didn't realize how to class path properly to include both
|
|
//what I've done, and the jar file until seeing how intellij did it.
|
|
//Web searches were not very helpful in this depot
|
|
public class CovidManager {
|
|
public static void main(String[] args) {
|
|
CovidEntry covidObject = new CovidEntry("TX", 4, 12, 233343, 5, 10, 15);
|
|
System.out.println(covidObject);
|
|
|
|
CovidDatabase db = new CovidDatabase();
|
|
db.readCovidData();
|
|
System.out.println("highest daily d for texas");
|
|
CovidEntry highestTX = db.peakDailyDeaths("TX");
|
|
System.out.println(highestTX);
|
|
|
|
ArrayList<CovidEntry> may5th = db.getDailyDeaths(5, 5);
|
|
System.out.println("May 5th Data");
|
|
for (CovidEntry c : may5th) {
|
|
System.out.println(c);
|
|
}
|
|
|
|
int totalInfections = db.getTotalInfections();
|
|
System.out.println("Total Infections " + totalInfections);
|
|
|
|
System.out.println("Total Records: " + db.countRecords());
|
|
System.out.println("Total Deaths: " + db.getTotalDeaths());
|
|
System.out.println("Total Deaths for May 5th: " + db.countTotalDeaths(5, 5));
|
|
System.out.println("Peak deaths for May 5th: " + db.peakDailyDeaths(5, 5));
|
|
System.out.println(
|
|
"Most total deaths: " + db.mostTotalDeaths() + " Total: " + db.mostTotalDeaths().getTotalDeaths());
|
|
System.out.println("States with less than 300 infections on may 5th: ");
|
|
may5th = db.listMinimumDailyInfections(5, 5, 300);
|
|
for (CovidEntry c : may5th) {
|
|
System.out.println(c);
|
|
}
|
|
|
|
System.out.println("WA safe to open: ");
|
|
ArrayList<CovidEntry> WASafe = db.safeToOpen("WA");
|
|
for (CovidEntry c : WASafe) {
|
|
System.out.println(c);
|
|
}
|
|
|
|
System.out.println("Top 10 deaths for May 1st");
|
|
ArrayList<CovidEntry> topTenDeaths = db.topTenDeaths(5, 1);
|
|
for (CovidEntry c : topTenDeaths) {
|
|
System.out.println(c);
|
|
}
|
|
}
|
|
}
|