Add classes and files for voting

This commit is contained in:
DSTO\pivatom
2018-12-10 16:52:23 +10:30
parent f8db12b5b6
commit 1bc7948b51
7 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
import voter
class BallotVoter(Voter):
def submit_vote(self):
pass

View File

@@ -0,0 +1,6 @@
class Commander:
def get_votes(self):
raise Exception("Vote cannot be submitted as it's not implemented")
def make_decision(self):
raise Exception("Vote cannot be submitted as it's not implemented")

View File

@@ -0,0 +1,7 @@
import voter
class VoteReplicator(Voter):
def __init__(self):
pass

View File

@@ -0,0 +1,2 @@
class Executor:
pass

View File

@@ -0,0 +1,5 @@
import executor
class TimeoutExecutor(Executor):
pass

23
DecisionSystem/vote.py Normal file
View File

@@ -0,0 +1,23 @@
class Vote:
def __init__(self, voter, vote):
self._voter = voter
self._vote = vote
@property
def voter(self):
return self._voter
@voter.setter
def voter(self, value):
self._voter = value
@property
def vote(self):
return self._vote
@vote.setter
def vote(self, value):
self._vote = value
def to_string(self):
pass

4
DecisionSystem/voter.py Normal file
View File

@@ -0,0 +1,4 @@
class Voter:
def submit_vote(self):
raise Exception("Vote cannot be submitted as it's not implemented")