Add classes and files for voting
This commit is contained in:
5
DecisionSystem/centralisedvoter.py
Normal file
5
DecisionSystem/centralisedvoter.py
Normal file
@@ -0,0 +1,5 @@
|
||||
import voter
|
||||
|
||||
class BallotVoter(Voter):
|
||||
def submit_vote(self):
|
||||
pass
|
||||
6
DecisionSystem/commander.py
Normal file
6
DecisionSystem/commander.py
Normal 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")
|
||||
7
DecisionSystem/decentralisedvoter.py
Normal file
7
DecisionSystem/decentralisedvoter.py
Normal file
@@ -0,0 +1,7 @@
|
||||
import voter
|
||||
|
||||
class VoteReplicator(Voter):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
2
DecisionSystem/executor.py
Normal file
2
DecisionSystem/executor.py
Normal file
@@ -0,0 +1,2 @@
|
||||
class Executor:
|
||||
pass
|
||||
5
DecisionSystem/timeoutexecutor.py
Normal file
5
DecisionSystem/timeoutexecutor.py
Normal file
@@ -0,0 +1,5 @@
|
||||
import executor
|
||||
|
||||
class TimeoutExecutor(Executor):
|
||||
pass
|
||||
|
||||
23
DecisionSystem/vote.py
Normal file
23
DecisionSystem/vote.py
Normal 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
4
DecisionSystem/voter.py
Normal file
@@ -0,0 +1,4 @@
|
||||
class Voter:
|
||||
def submit_vote(self):
|
||||
raise Exception("Vote cannot be submitted as it's not implemented")
|
||||
|
||||
Reference in New Issue
Block a user