UML Diagrams
UML Diagrams
UML Diagrams
GROUP MEMBERS
Ayesha Kamran – 006
Saad Ullah – 032
Zaib-un-Nisa - 044
UML Diagrams
Usecase diagram
Class diagram
State diagram
1. Usecase diagram
Diagram
Description
In this usecase, we have five actors. They perform different tasks according to
their functionalities. Actors and their functionalities are:
Primary actors:
1. Voter :
Firstly, the user has to register themselves to access the system. If registration is
done successfully than user login to the system. Voter can View candidates, Cast
vote and View results.
2. Candidate:
To use functionalities of the system user has to register his/herself. After this
user login to the system. Candidate can View candidates, Cast vote and View
results.
3. Admin:
User login to the system and perform different functionalities. Admin can
View candidates, Register voters, Generate voter ID, Calculate results and
Display result
Secondary actors:
4. Voter Record:
To store the information related to voter.
5. Candidate Record:
To store the information related to Candidate.
2. Class diagram
Diagram
Description
For Online Voting System, we create different classes to distribute modules of
that system. Like we have voter class which shows different attributes and
methods. The attributes of this class are voter id, name, password and CNIC and
methods are as follows,
1. getRegister();
2. Login();
3. ViewCandidates();
4. CastVote();
5. ViewResults();
Than we have admin, candidate and result class. In admin class, admin generates
voter id, add candidates, Register voters, calculate results, Generate results. Cast
vote class shows vote submission which is done by candidate and voter. Result
class shows no of votes that successfully get by candidate. DbConnector class
store the records of voter and candidate class.
3. State diagram
Login state
Diagram
Description
In this state it is shown how the user will log into the system. User has to enter
his/her CNIC and password. after entering, system will validate the credentials of
the user if the credentials are correct then user will be shown the homepage but
if credentials are incorrect then the user will have again enter his/her credentials
until entered correct.
Add candidate
Diagram
Description
When talking about the state to add a new candidate in the system so he/she
can be voted by the voter. The candidate has to enter his/her CNIC, name and
symbol. Now candidate will be entered in the system only when user enter the
correct format of CNIC, name and an image in symbol. Otherwise in case of
wrong format user will have to enter the details again until he/she does not
enters them in correct format.
Cast vote
Diagram
Description
This state will be used by voters, candidates and admin. In this state the user of
the system is supposed to cast the vote to the candidate of their own choice.
Before casting vote the user has to enter the unique voter id, this is to verify the
voter. If voter enters correct voter id, system verifies the voter and he/she is
now legible for voting. On the other hand if the voter id is incorrect then voter
has to re-enter the voter id till it is entered correctly.