package Voting is type State is (Empty, Voting, Finished); type Natural_Array is array(Positive range <>) of Natural; Number_Of_Candidates: constant Positive := 20; subtype Candidate is Positive range 1..Number_Of_Candidates; S: State := Empty; Number_Of_Electorates: Natural; Ballot_Box: Natural_Array(1..Number_Of_Candidates); -- Sets the Number_Of_Electorates to NOE, -- sets State to Voting, -- sets all values of Ballot_Box to zero. procedure Initialize(NOE: Natural); -- Increases the number of votes for candidate C by 1 -- (candidate is given by the index of Ballot_Box). -- State has to be Voting. procedure Vote(C: Candidate); -- State has to be Voting. -- Sets State to Finished. procedure Stop_Voting; -- Returns an array which contains the candidates with -- the highest number of votes. -- State has to be Finished. function Get_Winners return Natural_Array; end Voting;