Mini Project 2011-’12

Online Voting System

s

SYSTEM DESIGN

Department of Computer Science and Engineering.

1

College of Engineering, Cherthala

Mini Project 2011-’12

Online Voting System

s

1.
1.1
1.1.1

SYSTEM DESIGN
INTRODUCTION
PURPOSE The Software requirement specification (SRS) step of a software development process yields specifications that are used in the project. If the software is “semi automated” or user centered, software design may involve user experience design yielding a story board to help to determine that specification. If the software is completely automated (meaning no user or user interface), a software design may be as simple as a flow chart or text describing a planned sequence of events. There are also semi-standard methods like unified modeling language and fundamental modeling concepts. In either case some documentation of the plan is usually the product of the design. A software design may be platform-independent or platform specific, depending on the availability of the technology called for by the design.

1.1.2

SCOPE OF DESIGN In our design, we include the following diagrams to illustrate the flow

sequence of the overall process.  Use case diagram  Sequence diagram  Data flow diagram 1.1.3 SCOPE OF PROJECT

 Advanced technology- It is an advanced technology used now a days. It increase the E knowledge of the users which is very necessary for current generation.

Department of Computer Science and Engineering.

2

College of Engineering, Cherthala

Mini Project 2011-’12

Online Voting System

s

1.2
1.2.1

DESIGN AND SPECIFICATION
DESIGN Design of the system includes mainly two steps: System design and detailed

design. In system design a structural framework for the entire system is created. It is done in such a way that related part come under particular groups. Thus after the system design, a network of different groups is obtained. It is the high-level strategy for solving the problem and building a solution. It includes the decision about the organization of the system into subsystems, the allocation of subsystems to hardware and software components, and major conceptual and policy decisions that form the framework for the detailed design. System design is the first stage in which the basic approach to solving problem is selected. During system design, the overall style and structure are decided. In detailed design, each group is studied in detail and the internal operations are decided. Based on this, the data structures and the programming language to be used are decided. Apart from detailed design, the system design can be grouped into physical design and structural design. The physical design maps out the details of the physical system and plans the system implementation and specifies the hardware and software requirements. Structured design is an attempt to minimize the complexity and make a problem manageable by subdividing into smaller segments, which is called modularization or decomposition. In this way structuring minimizes intuitive reasoning and promotes maintainable provable systems. The structured design partitions a program into small, independent modules. They are arranged in a hierarchy that approximates a model of the business are and is organized in a top-down manner. Logical design proceeds in a top-down manner. General features, such as reports and inputs are identified first. Then each is studied individually and in more detail. Hence the structured design is an attempt to minimize the complexity and make a problem.

Department of Computer Science and Engineering.

3

College of Engineering, Cherthala

Mini Project 2011-’12 Online Voting System s 1. Packet sending & Receiving management 1.3.2.3.We are inputting normal data to this module and this module will generate packets from it.3.Packet creation management. 1. Cherthala .3 PACKET SENDING & RECEIVING MANAGEMENT This module is responsible for the packet transportation between the applications. These packets are responsible for the communication between the applications 1.1 ROUTER CONNECTION MANAGEMENT This module establishes a connection to the router using sockets.1 CLIENT This module has three segments named Router connection management . 1.3.1.1.1.2 PACKET CREATION MANAGEMENT This module generates the packets which will flow between the PAFATM applications . Department of Computer Science and Engineering.3 MODULES The various modules described in this project are: . 4 College of Engineering. This module is multithreaded since it needs to handle the connection establishment Independently from other activities.2 SPECIFICATION The following are the specifications that are used to develop the proposed system: 1.

2 ROUTER This modules has management .packet filtering Management .packet buffering & scheduling management.4 PACKET BUFFERING & SCHEDULING MANAGEMENT This module manages the buffer by implementing leaky bucket algorithm and virtual scheduling algorithm.3 PACKET FILTERING MANAGEMENT This module manages the blocking of files from clients of a particular IP address or from a network itself. 1.3.2. This module is multithreaded since it needs to handle the connection establishment independently from other activities. Department of Computer Science and Engineering.2. 1.1 CLIENT CONNECTION MANAGEMENT This module accepts a connection to the clients using server socket. 1. 5 College of Engineering.3.3.3. packet four segments named client connection receiving & Forwarding management .2.2. Cherthala .3.2 PACKET RECEIVING & FORWARDING MANAGEMENT This module is responsible for the packet transportation between the applications with the help of connection management module. 1.Mini Project 2011-’12 Online Voting System s 1.

A use case diagram displays the relationship among actors and use cases. Use case diagrams are relatively easy UML diagram. Apart from the actors there are actions to be performed by these actors. They are helpful in exposing requirements and planning of the project. A use case is an external view of the system that represents some action the user might perform in order to complete a task. It reduces users need for training and operating the system. These actions are shown in oval. But as the project continues more might become visible.1 Use case Diagram Department of Computer Science and Engineering. the main two things are the actors and the actions. They are helpful in exposing requirements and planning the projects. but as the project continues more might become visible. During the initial stage of a project most use cases should be defined. we all know. 6 College of Engineering. Cherthala . most use cases should be defined. Here the actors are the system administrator. During the initial stage of a project. The two main component of use case diagram are use cases and actors. the use case diagram for showing the project is that it measures the size of the software.2 DIAGRAM Fig 3. common user and a user staff.4. In use case diagram.4 1.1 CASE DIAGRAM PURPOSE Use case is a set of scenarios that describing an interaction between a user and a system.Mini Project 2011-’12 Online Voting System s 1.4. 1.

Cherthala . 7 College of Engineering.Mini Project 2011-’12 Online Voting System s System communication manager «uses» «uses» packet filtering «uses» User/Client «uses» delay control firewall is implemented Department of Computer Science and Engineering.

Lifelines represent either roles or object instances that participate in the sequence being modeled. The focus is less on events themselves and more on the order in which events occur. It demonstrates the behavior of an object in a use case by describing the actions they performed. The lifeline’s name is placed inside the box. Cherthala . They are explained as follows: When drawing a sequence diagram.Mini Project 2011-’12 Online Voting System s 1.3 DESCRIPTION . The diagram conveys this information along the horizontal and vertical dimensions: the vertical dimensions shows.5. lifeline notation elements are placed across the top of the diagram.5 1. Here in this there are some rules to draw the diagram.1 SEQUENCE DIAGRAM PURPOSE Sequence diagram tell the manner in which interaction takes place and the style in which it is executed. Department of Computer Science and Engineering. most sequence diagrams will communicate what information are sent between a system’s objects is information along the horizontal well as the order in which they occur. 1.4. top down. The object is represented in rectangle and existence of objects is shown by vertical lines. Lifelines are drawn as a box with a dashed line descending from the center of the bottom edge. and the horizontal dimension shows. the object instances that the instructions are sent to. nevertheless. The main purpose of a sequence diagram is to define event sequences that results in some desired outcome. They generally show the sequence in which the diagram demonstrates how objects are statically connected. left to right. 8 College of Engineering. the time sequence of instructions as they occur.

9 College of Engineering.Mini Project 2011-’12 Online Voting System s 1.2 DIAGRAM user select file manage packets resend rejected packets router packet buffering firewall implementation crt/snd/recv pckt packet regeneration send to router pckts send in queque implement firewall block packts from particular n/w. Department of Computer Science and Engineering.2 Sequence diagram 1. Cherthala .block packts with a spcfied destn IP Fig 3.3 DESCRIPTION The main purpose of a sequence diagram is to define event sequences that results in some desired outcome and diagrammatically describes the sequential flow of events.5.5.

The data flow diagram may be used to represent a system or software at any level of abstraction. For example.2. Cherthala . it is modified by a series of transformations. respectively. The classes in the diagram are necessary to understand the basics of the object through the entire system. also called a fundamental system model or a context model.6.6 1. In fact. The data flow diagram is also known as a data flow graph or a bubble chart. It describes each function in detail and each sub function is explained by more bubbles and arrows.6. As information moves through software. Therefore. 1. Each sub functions represented in level1 DFD is again expanded in level 2 DFD. the DFD provides a mechanism for functional modeling as well as information flow modeling. In the data flow diagram it gives an idea of what all procedures are being carried out within the system. a level 1 DFD might contain more bubbles with interconnecting arrows. 10 College of Engineering.1 LEVEL 0 DIAGRAMS: Department of Computer Science and Engineering.1 DATA FLOW DIAGRAMS PURPOSE The data flow diagram gives the entire flow of the project. Additional processes (bubbles) and information flow paths are represented as the level 0 DFD is partitioned to reveal more detail. A level 0 DFD. DFDs may be partitioned into levels that represent increasing information flow and functional detail. represents the entire software element as a single bubble with input and output data indicated by incoming and outgoing arrows.6. A data flow diagram is a graphical representation that depicts information flow and the transforms that are applied as data move from input to output.2 DIAGRAM 1. It gives the description of all states of an object as events occur. Each of the processes represented at level 1 is a sub function of the overall system depicted in the context model.Mini Project 2011-’12 Online Voting System s 1. It gives the clear picture of how the modules are being worked out.

3 Level 0 DFD 1.Mini Project 2011-’12 Online Voting System s Fig 3.2. Cherthala . 11 College of Engineering.2 LEVEL 1 DFD: Department of Computer Science and Engineering.6.

5 Level 2.Mini Project 2011-’12 Online Voting System s 1.6 Level 2. Department of Computer Science and Engineering.2 DFD: Fig 3.1 DFD for voter login LEVEL 2.1 DFD: loFig 3.2 DFD .6. Cherthala .2. 12 College of Engineering.3 LEVEL 2.

Cherthala .Mini Project 2011-’12 Online Voting System s Department of Computer Science and Engineering. 13 College of Engineering.

14 College of Engineering. Cherthala .Mini Project 2011-’12 Online Voting System s IMPLEMENTATION Department of Computer Science and Engineering.

testing and modification are erased. The primary goal of implementation is to write source code so its specification can be easily verified. The problems encountered are converting files. The implementation team should be provided with a welldefined set of software requirements. Obscurity.Mini Project 2011-’12 Online Voting System s 2. training users. cleverness and complexity are the indications of inadequate design and misdirected thinking. Apart from planning. an architectural design description. Department of Computer Science and Engineering. 15 College of Engineering. investigation of the current system and its constraints on implementation. It involves careful planning. Implementation phase of the software developed is concerned with translating design specification into source code. Implementation is used here to mean the processes of converting a new revised system design into an optional one. creating accurate files and verifying printouts for integrity. Cherthala . and so that debugging. There are two types of implementation: Implementation of a computer system replaces a manual system. Also each team member must understand the objectives of implementation. The more complex the system being implemented. Simplicity. Implementation of a new computer system to replace an existing one is an extremely tedious task. the more involved will be the system analysis and design effort is requested just for implementation. If these are not handled properly they can cause many a problem. clarity and elegance are the hallmarks of good programs. design of methods to achieve the change over an evolution of change over methods. major task of preparing the implementation are education and training of users. IMPLEMENTATION Implementation is the stage in the project where the theoretical design is turned into a working system and is giving confidence on new systems for the users that it will work efficiently and effectively. Conversation is one aspect of implementation.

and they don’t have to include all the machine –level code that actually runs on the computer . settings storage -. before . which makes it great for Internet Applications.2 TECHNOLOGIES USED Here we explain all the technologies used in this software system.2. it can run java programs.our Java program can be very small. because all the machine-level code to run our program is already on the target computer and doesn’t have to be downloaded.2. it wasn’t even called Java in those days it was Oak. and they are supported by Sun Microsystems.such as window and menu management. It is implemented as the Java virtual Machine (JVM).1 INTRODUCTION The first version of Java began in 1991 and was written in 18 months at Sun Microsystems. In fact. When JVM is installed on a computer. and it was used internally at sun. the JVM can strictly monitor what goes on.1 working model 2. 2.In this way .and is also the first IDE to fully support JDK 5.2.2. which is the application that actually runs the java program. The NetBeans platform and IDE are free for commercial and non-commercial use.1 WORKING MODEL Fig: 4.0 features. It provides the services common to creating desktop applications -.Mini Project 2011-’12 Online Voting System s 2. When it executes a program. Java had adopted a model that made it perfect for the Internet-the byte code model. Department of Computer Science and Engineering.1 NETBEANS IDE The NetBeans IDE is open source and is written in the Java programming language. 16 College of Engineering. Java programs. Cherthala . 2.don’t need to be self-sufficient.2 JAVA 2.

which could offer solutions to some of the problems encountered in modern programming they wanted the language to be reliable. java Department of Computer Science and Engineering.2 JAVA FEATURES The inventors of java wanted to design a language. compact and interactive. which interconnects different kinds of systems worldwide. First. This is the reason why java has become a popular language for programming on internet. Java ensures portability in two ways.Mini Project 2011-’12 Online Voting System s 2. processors and system resources will not force any changes in java programs. o Platform-Independent and Portable The most significant contribution java over other languages is its portability. Cherthala .2. Simple and Small  Multithreaded and Interactive  High Performance  Dynamic and Extensible o Compiled and Interpreted Usually a computer language is either compiled or interpreted. Sun Microsystems officially describes java with the following attributes.  Compiled and Interpreted  Platform-Independent and Portable  Object-Oriented  Robust and Secure  Distributed  Familiar. Byte-codes are not machine code that can be directly executed by the machine that is running the java program. portable and distributed but also simple. Changes and Upgrades in operating systems. Java programs can be easily moved from one computer system to another. anywhere at any time.2. Java combines both these approaches thus making java a two-stage system first java compiler translate source code in to byte code instructions. 17 College of Engineering.

It has the ability to share both data & Program. the sizes of the primitive data types are machining Independent. which contains data and functions to process data. It has strict compile time checking for data types. o Distributed Java is designed as a distributed language for creating application on network. o Object-Oriented Programming Unlike conventional procedure oriented programming approach which gives emphasis on algorithms OOP gives emphasis on data. Java architecture is also designed to reduce overheads during runtime. The object model in java is simple and easy to extend. Almost everything in Java is an Object. o Robust and Secure Java is a robust language .Mini Project 2011-’12 Online Voting System s compiler generates byte code instructions that can implemented on any machine. o Object-Oriented Java is a true Object-Oriented Language. Java comes with an extensive set of classes arranged in packages that we can use in our programs by inheritance. 18 College of Engineering. This means that we not wait for the application to finish one task before beginning another. Java also incorporates with the concept of exception handling. All program code and data reside within objects and classes.It provides many safe guards to ensure reliable code. o Multithreaded and interactive Multithreaded means handling multiple tasks simultaneously java supports multithreaded programs. Secondly. Another important approach of the OOP is that it provides bottom up approach. Here basic building block of a program is object. It is designed as garbage collected language. Cherthala . o High performance Java performance is impressive for an interpreted language mainly due to the use of intermediate byte code. Department of Computer Science and Engineering.

Mini Project 2011-’12 Online Voting System s Important features of OOPS are:  Emphasis on data rather than procedure  Programs are divided into modules known as objects  Functions that operate on data if an object is tied together  Objects can only communicate through functions  Functions can access data of its own class  New data and functions can be added whenever necessary 2. Standard Edition (JRE) and Java 2 Software Development Kit. The JRE does not contain tools and utilities such as compilers or debuggers for developing applets and application programs. Java virtual machine. Fig:4. Cherthala .4 J2SE API: The J2SE application programming interface (API) defines the prescribed manner by which an applet or application can make requests to and use the Department of Computer Science and Engineering.standard Edition v 1.2 Java 2 Platform. Standard Edition (SDK). 19 College of Engineering. The JRE provides the Java APIs. It is also the foundation for the technologies in the Java 2 Platform. and other components necessary to run applets and applications written in the Java programming language. Enterprise Edition (J2EE) for enterprise software development and deployment.2.3 J2SE There are two principal products in the J2SE platform family: Java 2 Runtime Environment.2.

The protocol need to run java-only implementation is known as Java Remote Method Protocol (JRMP) and in order to run in non-JVM. The Remote Method Invocation (RMI) works similar to remote procedure calls (RPC). and makes references to these objects which further waits for client to invoke methods through these objects. Cherthala . including Integrated Development Environments (IDE’s).2.Mini Project 2011-’12 Online Voting System s functionality available in the compiled J2SE class libraries. possibly on different hosts. a server and a client. they had to carefully map how Java classes and objects work in a single Java Virtual Machine1 (JVM) to a new model of how classes and objects would work in a distributed (multiple JVM) computing environment. A primary goal for the RMI designers was to allow programmers to develop distributed Java programs with the same syntax and semantics used for non-distributed programs. 2. in which the methods of remote Java objects can be invoked from other Java virtual machines. Clients on local and remote hosts can then look up remote objects and can pass message to each other. Generally RMI comprise of two separate programs. A server program creates some remote objects. and performance monitoring tools. performance and testing tools. 20 College of Engineering. When server and client communicate and pass their information such type of application is sometimes referred to as distributed object application. then CORBA is used.3 JAVA RMI Java Remote Method Invocation (Java RMI) enables the programmer to create distributed Java technology based applications. To do this. The client lookup for the server name in the registry is to establish the remote references.rmi package. Department of Computer Science and Engineering. The J2SE class libraries are also part of the J2SE platform. The Java RMI allows programmer to execute remote function which behave similar to local functions calls but the difference is that it exits somewhere else. The servers first need to bind its name to the registry because RMI servers on the same host bind remote object to names. Java Platform Tools: The J2SE platform works with an array of tools. All RMI functionalities are found in the java.

as well as some firewall penetration strategies.3 RMI architectural layers Department of Computer Science and Engineering. which lies just beneath the view of the developer. The next layer is the Remote Reference Layer. Fig:4. Cherthala . The first is the Stub and Skeleton layer.Mini Project 2011-’12 Online Voting System s RMI ARCHITECTURE LAYERS The RMI implementation is essentially built from three abstraction layers. The transport layer is based on TCP/IP connections between machines in a network. This layer understands how to interpret and manage references made from clients to the remote service objects. It provides basic connectivity. This layer intercepts method calls made by the client to the interface reference variable and redirects these calls to a remote RMI service. 21 College of Engineering.

Mini Project 2011-’12 Online Voting System s 2.1 SCREEN SHOTS ADMINISTRATOR Fig:4.5 ONLINE VOTING SYSTEM Department of Computer Science and Engineering. 22 College of Engineering. Cherthala .3.3 2.

Mini Project 2011-’12 Online Voting System s Fig:4.7 Admin Home Department of Computer Science and Engineering.6 Admin Login Fig:4. 23 College of Engineering. Cherthala .

Cherthala . 24 College of Engineering.8 Start poll Department of Computer Science and Engineering.Mini Project 2011-’12 Online Voting System s Fig:4.

9 Stop poll Fig:4.10 Candidate list Department of Computer Science and Engineering.Mini Project 2011-’12 Online Voting System s Fig:4. Cherthala . 25 College of Engineering.

13 Invalid phone number Fig:4.14 Invalid name Department of Computer Science and Engineering. Cherthala . 26 College of Engineering.12 Invalid registration Fig:4.Mini Project 2011-’12 Online Voting System s Fig:4.

Mini Project 2011-’12 Online Voting System s Fig:4. Cherthala .16 Voters list Fig:4.17 Voter registration Department of Computer Science and Engineering. 27 College of Engineering.

Cherthala .20 Result Department of Computer Science and Engineering.19 Remove voter Fig:4.Mini Project 2011-’12 Online Voting System s Fig:4. 28 College of Engineering.

Mini Project 2011-’12 Online Voting System s Fig:4. 29 College of Engineering. Cherthala .22 Change password 4.32 VOTER Department of Computer Science and Engineering.21 Recount Fig:4.

23 Main menu Fig:4. 30 College of Engineering.24 Login Department of Computer Science and Engineering.Mini Project 2011-’12 Online Voting System s Fig:4. Cherthala .

26 Vote casting Department of Computer Science and Engineering. Cherthala . 31 College of Engineering.Mini Project 2011-’12 Online Voting System s Fig:4.25 OTP Fig:4.

32 College of Engineering.Mini Project 2011-’12 Online Voting System s Department of Computer Science and Engineering. Cherthala .

33 College of Engineering.Mini Project 2011-’12 Online Voting System s Department of Computer Science and Engineering. Cherthala .