-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleVoter.java
More file actions
44 lines (42 loc) · 990 Bytes
/
Copy pathSimpleVoter.java
File metadata and controls
44 lines (42 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package UserPack;
/**
* Represents a simple voter user.
* imitates the class {@link Voter}
*/
public class SimpleVoter extends Voter{
/**
* Constructor for creating a simple voter user.
*
* @param username The username of the voter.
* @param password The password of the voter.
*/
public SimpleVoter(String username, String password) {
super(username, password);
setKoefHol(1);
}
/**
* Gets the role of the simple voter.
*
* @return The role of the simple voter.
*/
@Override
public String getRol(){
return "Voter";
}
/**
* Sets the coefficient of the vote.
*
* @param koefHol The coefficient of the vote.
*/
public void setKoefHol(int koefHol){
super.koefHol=koefHol*1;
}
/**
* Gets the coefficient of the vote.
*
* @return The coefficient of the vote.
*/
public int getKoefHol(){
return super.koefHol;
}
}