Assignment No-1 cs-304

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Assignment No: 1 CS-304 – Object Oriented Programming

E-Voting System

Extract the main objects (entities) of above system.


 User
 Admin
 Voters
 Cast Vote
 Candidate
 Result

Find the necessary attributes and functions that need to be associated with each object.
 USER
ATTRIBUTES FUNCTIONS

User_id Login()

User_name

User_password

 ADMIN
ATTRIBUTES FUNCTIONS
Admin_id Voterslist()
Admin_name Candidateslist()
Admin_Password Results()

 VOTERS
ATTRIBUTES FUNCTIONS
Voter_id Castvote()
Voter_name Viewresult()
Voter_password
Voter_CNIC
Voter_address
Voter_City
 CAST VOTE
ATTRIBUTES FUNCTIONS

Voter_id Vote()

Voter_name Cancelvote()

Candidate_id

Candidate_name

Candidate_symbol

 CANDIDATE
ATTRIBUTES FUNCTIONS

Candidate_id Registerforelection()

Candidate_name Vote()

Candidate_party Viewresults()

Candidate_symbol

 RESULT
ATTRIBUTES FUNCTIONS

Cadndidate_id Votecount()

Candidate_name Declareresult()

Candidate_party

Candidate_symbol

Totalvotes
Identify the relationships among identified objects.

 Association relationship between Admin and Voter


 Association relationship between Admin and Candidate
 Association relationship between Admin and Result
 Association relationship between Cast Vote and Voter
 Association relationship between Cast Vote and Candidate
 Composition relationship between Result and Cast Vote

E-Voting System Diagram

You might also like