add a model to manage data

This commit is contained in:
2025-10-02 10:47:14 +02:00
parent e35f36db4b
commit 8b6d447574
3 changed files with 12 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ public class Main {
public static void main(String[] args) {
Database database = new Database();
Votes votesForItaly = database.getVotesFromCompetitor("Italie");
Votes votesForItaly = database.getVotesFromCompetitor("Pays-Bas");
System.out.println("Vote " + votesForItaly.getCompetitorName() + " :");
for(Vote vote : votesForItaly.getVoters()) {
@@ -12,5 +12,7 @@ public class Main {
System.out.println("-------------------");
System.out.println("Total " + votesForItaly.getTotalPoints());
database.close();
}
}