clean structure

This commit is contained in:
2026-02-10 18:05:13 +01:00
parent 5f2d805875
commit 4b4a0a3597
33 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import java.util.ArrayList;
public class Votes {
private String competitor;
private ArrayList<Vote> voters;
public Votes(String competitor, ArrayList<Vote> voters) {
this.competitor = competitor;
this.voters = voters;
}
public String getCompetitorName() {
return this.competitor;
}
public ArrayList<Vote> getVoters() {
return this.voters;
}
public int getTotalPoints() {
int sum = 0;
for(Vote vote : this.voters) {
sum += vote.getPoints();
}
return sum;
}
}