You are on page 1of 47

OBJECT ORIENTED ANALYSIS

AND DESIGN (SUBJECT CODE : 15SE203)

PROJECT ON

EXAMINATION SYSTEM

BY,
G. MANI KANDAN
REG NO: RA1511003040027
CSE - A
2ND YEAR

ACKNOWLEDGEMENT
I take this opportunity to express my sincere gratitude to
all those who helped me in various capacities in
understanding this project and devising the
documentation.

I am privileged to express my sense of gratitude to my


respected teacher Mr. Sabarinathan whose unparalleled
knowledge, moral fiber and judgement along with his
know-how, was an immense support in completing the
project.

I take this opportunity also to thank my friends and


contemporaries for their co-operation and compliance.

1
BONAFIDE CERTIFICATE

This is to certify that the Bonafide documentation done by


Name:G.ManiKandan Reg No: RA1511003040027 of
B.Tech degree in the Object Oriented Analysis and
Design (15SE203) in SRM University, Vadapalani
Campus, Chennai during the academic year 2015 - 2019.

Faculty in Charge Head Of The Department

INDEX

SL NO. TOPIC PAGE


NO.
1. ABSTRACT……………………………………………………………………………………. 4
2. INTRODUCTION……………………………………………………………………………… 5
2.1. PROPOSED SYSTEM……………………………………………………………….. 6
2.2. EXISTING SYSTEM…………………………………………………………………. 6
2.3. ADVANTAGES………………………………………………………………………... 7
3. SOFTWARE REQUIREMENT SPECIFICATIONS……………………………………….... 8
3.1. INTRODUCTION……………………………………………………………………... 8
3.2. GENERAL DESCRIPTION………………………………………………………….. 9

2
3.3. FUNCTIONALITY……………………………………………………………………. 11
4. SYSTEM ARCHITECTURE……………………………………………………………….... 12
5. MODULES……………………………………………………………………………………. 13
5.1. ADMIN MODULE……………………………………………………………………. 13
5.2. STAFF MODULE…………………………………………………………………….. 14
5.3. STUDENT MODULE………………………………………………………………... 15
6. UML DIAGRAMS…………………………………………………………………………….. 16
6.1. STATIC DIAGRAMS………………………………………………………………… 16
6.1.1. CLASS DIAGRAM…………………………………………………………... 16
6.1.2. USE CASE DIAGRAM……………………………………………………… 18
6.2. DYNAMIC DIAGRAMS……………………………………………………………… 20
6.2.1. INTERACTION DIAGRAM………………………………………………… 20
6.2.1.1. SEQUENCE DIAGRAM…………………………………………… 20
6.2.1.2. COLLABORATION DIAGRAM…………………………………….. 23
6.2.2. ACTIVITY DIAGRAM……………………………………………………….. 26
6.2.3. STATECHART DIAGRAM………………………………………………….. 28
6.2.4. IMPLEMENTATION DIAGRAM……………………………………………. 30
6.2.4.1. COMPONENT DIAGRAM…………………………………………. 30
6.2.4.2. DEPLOYMENT DIAGRAM………………………………………… 32
7. IMPLEMENTATION………………………………………………………………………….. 33
7.1. FRONT END TOOLS AND SOFTWARES………………………………………... 33
7.1.1. JAVA - PROGRAMMING LANGUAGE……………………………………. 33
7.1.2. SWING (JAVA)..............................................……………………………... 35
7.1.3. ECLIPSE NEON 3…………………………………………………………... 37
7.2. BACK END TOOLS AND SOFTWARES………………………………………….. 38
7.2.1. XAMPP…………………………………………….……………………….... 38
8. SAMPLE CODE…………………………………………………………………………….... 40
9. SCREENSHOTS…………………………………………………………………………….. 44
10. CONCLUSION……………………………………………………………………………...... 45
11. LIST OF FIGURES…………………………………………………………………………… 46
12. REFERENCES……………………………………………………………………………..... 47

1. ABSTRACT

Online Examination System is a web portal which is implemented in java


platform. This project is useful for students to practice different mock
examinations from this site. In present generation most of the examinations
like GRE, Toefl, CAT, MAT…etc are conducted through online system. This
system will help students to get practiced to online examination method by
taking mock tests from this web site. Online examination portal is
implemented in two modules exam admin module and student examination
module. Admin module will add different courses under different branches

3
so students can easily know about test details. Student examination
module students should register with application and select interested
courses and participate in online test.

2. INTRODUCTION
Conducting a paperless examination is made available by using the
concept of web based online examination, which includes automated
processing system for all the works which was previously done by using
human work power. This online examination system will able to work as
two way road just by single system. Through this web application, it can be
possible to conduct examination through internet or to a particular
geographical region using the concept of LAN or through intranet for
particular organization.

It can be possible to conduct either objective type examination of subjective


type examination through this web based application. In case of objective
type examination, question checking process will be carried out directly by
the system and in case of subjective type of examination, each candidate’s
answers will be sended to the examiner which will be reviewed by them
and assign marks based on their answers. The other security features
which are available are: – keeping each candidate's invisible to others,

4
providing different questions for each system at same time, disabling
answer option after time limit and passing the session to next questions. It
marks displaying section will be configured by the admin as per the
requirement. Candidates will able to get their results either after completing
their examination or through email.

2.1 PROPOSED SYSTEM


The concept of CMS and graphical tools has been fully integrated with this
new web based online examination system. Here the examiner will of two
different types one for the checking objective type questions and other for
descriptive type questions. Browser configuration and setting will enable
the system to identify its type and disable the function of minimization and
using other devices. There will be dual timer, one for the questions and
other for different sections. Upon each specified time limit questions will be
change and on completion of each module, servlet will be forwarded to
another module.

2.2 EXISTING SYSTEM


Under the existing system data redundancy and consistency was not
introduced and entering same data under different tables were not always

5
be possible. Even when updation requires, need additional work load thus
increasing database workload. One to one and one to many relationship
were not introduced and checking process of child tables before entering
data in master tables mechanism were not implemented. Presenting
graphical based questions to the appearing candidates were not possible
and thus questions were only be displayed using simple texts.

2.3 ADVANTAGES

• Security and confidentiality

• Accessibility and flexibility

• Cost saving

•Time management

• Statistical analysis

6
3. SOFTWARE REQUIREMENT
SPECIFICATIONS
3.1 INTRODUCTION
3.1.1 PURPOSE

This Web Application provides facility to online examination worldwide.It


saves time as it allows number of students/candidates to give the exam at
same time and display the results at the end of the test,so there is no need
to wait for the result. It is evaluated and generated by the server.
Administrator has privileges to create, modify and delete the test papers
and its particular questions.User can register, login and give the test with
his specific id, and can see the results as well.Others can view sample
papers to learn the structure of online exams. It eliminates the use of items
like pen, paper, etc.

3.1.2 SCOPE

● This app can be used in educational institutions as well as in


corporate world.
● Can be used anywhere any time as it is a web based application(user
location doesn’t matter).
● No restriction that examiner has to be present when the candidate
takes the test.
● No manual work of preparing and storing the result information.

7
● Less time consumption, as the result is calculated immediately after
the test and displayed to the student/candidate.
● For students/candidates, it saves time of going too far away centers
to give exams.

3.2 GENERAL DESCRIPTION


3.2.1 PRODUCT PERSPECTIVE

3.2.1.1 Product Functions

The functions are divided according to the user types such as:-
Administrator:-The function of the administrator is to add/edit exams in the
test module.Candidate:-The function of the student is to update his/her
profile and give various exams.

3.2.1.2 User Characteristics

This app requires the user to have characteristics such as the user should
be able to communicate and write in English and should have previous
experience of giving an online exam. If not, the candidate should be
instructed about the basics usage of the app by authorized personnel.

3.2.1.3 Assumptions and Dependencies

The users have sufficient knowledge of computers.The computer should


have Internet connection and Internet server capabilities.The users know
the English language, as the user interface will be provided in English. The
product can access the student database.

8
3.2.2 HARDWARE INTERFACES
Screen resolution of at least 800X600 is required for proper and complete
viewing of screens. Higher resolution will be accepted.

3.2.2.3 REQUIREMENTS

Pentium Processor (or above), 1.1GHz Speed, 1GB RAM, Standard


Keyboard and Mouse.

3.2.3 SOFTWARE INTERFACES


Windows OS, Eclipse IDE, and JDK Latest Version.

3.2.3 COMMUNICATIONS INTERFACES

The HTTP protocol will be used to facilitate communications between the


client and server.

3.3 FUNCTIONALITY

3.3.1 Log on Capabilities

The system shall provide the users with logon capabilities.

3.3.2 Mobile Devices

Supported on mobile devices such as cell phones.

3.3.3 Reliability

The system has to be very reliable due to the importance of data and the
damages incorrect or incomplete data can do.

3.3.4 Availability

9
The system is available 100% for the user and is used 24 hrs a day and
365 days a year.The system shall be operational 24 hours a day and 7
days a week.

4. SYSTEM ARCHITECTURE

10
5. MODULES

5.1 ADMIN MODULE

In this module, the actor is the administrator. To this module, only one
personnel is allowed to access. In this module, there is a direct access to
all the information related to all the other modules like student module, staff
module. The authorized personnel has the rights to create a student i.e., to
add a student, to modify a student i.e., change the details of a particular
student, to delete a student, to search details for a particular student and to
view all the students also.

All the above actions are applicable to the staff also. The following are the
methods present in this module :

● AddStudent()
● ModifyStudent()
● DeleteStudent()
● SearchStudent()
● ViewStudent()
● AddStaff()
● ModifyStaff()
● DeleteStaff()
● SearchStaff()
● ViewStaff()

11
5.2 STAFF MODULE

In this module, the actor(s) is the staff. This module can be operated by a
number of actors depending on the number of staffs. In this module, a staff
has to sign up to enter into the functionalities of the module. There a
number of actions in this modules. At first, the staff has to upload the
curriculum so that the student can refer to it for the studying purpose. Next,
the staff can set the question paper for the tests. And at last, the staff has
to enter the total marks for the student. The conditions to enter marks for
the student is that the student must be of the staff’s class and the student
have completed all the tests and examinations. Also, the staff can see the
marks of any student of any section and can view all the rank of the
student. The following are the methods in this module :

● AddCurriculum()
● SetQPaper()
● EnterMarks()
● ViewMarks()
● ViewRank()

12
5.3 STUDENT MODULE

In this module the actor(s) is the student. This module can be operated by
a number of actors depending upon the number of students. In this module,
the student has to sign up to enter into the functionalities of this module.
There are a number of actions taking place in this module. At first, the
student can get the curriculum uploaded by the staff. And next, the student
has to give the tests. In this module the there are 2 cycle tests and a final
examination. In order to attend the cycle test 2 the student has to complete
the cycle test 1. And in order to complete the final examination, the student
has to complete the cycle tests 1 & 2. The following are the methods in this
module :
● ViewCurriculum()
● GiveCT1()
● GiveCT2()
● GiveFinal()

13
6. UML DIAGRAMS
6.1 STATIC DIAGRAMS

6.1.1 CLASS DIAGRAM

FIG: 1

EXPLANATION

14
Examination is something which the student must write to move forward to
the next standard and hence it is directly associated. Student is also
directly associated to the result as it shows the performance of the student
in exams.

Student is directly dependent on a teacher as without a teacher a student


cannot be guided.

Examination is inherited from test series as it follows the same criteria also
it is dependent because a student cannot write final examinations without
completing the test series. Curriculum is associated with test series to form
the blueprint of the paper.

It is understood that study material is a part of the curriculum. A teacher is


dependent on a curriculum, as without a curriculum he/she wouldn’t know
what to teach.

Teacher is associated to a result, so that he/she can get to know the overall
performance of their students.

6.1.2 USE CASE DIAGRAM

15
FIG : 2

EXPLANATION

The actors are :


● Student
● Teacher
● Admin

16
The use cases are:
● Personal_Info
● School_Info
● Curriculum
● Study_Material
● Test_Series
● Examination
● Result
● Rank

The student can sign up with his personal information and school
information. After login, he can access his curriculum and study material for
study purpose. After which his/her tests followed by exam can be attended
and later get their result and rank.

The staff can set the curriculum and set the study material, test and
examination papers and can view the results of the student.

The admin can add the student, modify his/her details, delete the student
and the same can be done with the staff.

17
6.2 DYNAMIC DIAGRAMS

6.2.1 INTERACTION DIAGRAM

6.2.1.1 SEQUENCE DIAGRAM

FOR ADMINISTRATOR :

FIG : 3

18
FOR STUDENT:

FIG : 4

FOR VALIDITY :

FIG : 5

EXPLANATION

19
A sequence diagram is an interaction diagram that shows how objects
operate with one another and in what order. It is a construct of a message
sequence chart.
A sequence diagram shows object interactions arranged in time sequence.
It depicts the objects and classes involved in the scenario and the
sequence of messages exchanged between the objects needed to carry
out the functionality of the scenario. Sequence diagrams are typically
associated with use case realizations in the Logical View of the system
under development. Sequence diagrams are sometimes called event
diagrams or event scenarios.
The sequence diagram describes the sequence of steps to show :
a. The Admin login and registering for Add Student Details.

b. The verification done by the interface and sending acknowledgement


for registration.

c. Searching the database with login and displaying it for maintenance.

20
6.2.1.2 COLLABORATION DIAGRAM

FOR ADMINISTRATOR :

FIG : 6

21
FOR STUDENT:

FIG : 7

FOR VALIDITY :

FIG : 8

22
EXPLANATION

The second interaction diagram is collaboration diagram. It shows the


object organization as shown below. Here in collaboration diagram the
method call sequence is indicated by some numbering technique as
shown below. The number indicates how the methods are called one after
another. We have taken the same order management system to describe
the collaboration diagram.

The method calls are similar to that of a sequence diagram. But the
difference is that the sequence diagram does not describe the object
organization whereas the collaboration diagram shows the object
organization.

Now to choose between these two diagrams the main emphasis is given
on the type of requirement. If the time sequence is important then
sequence diagram is used and if organization is required then
collaboration diagram is used.

The collaboration diagram is to show how the Student registers and the
authorities maintains the details of the registered students in the
Information system. Here the sequence is numbered according to the flow
of execution.

23
6.2.2 ACTIVITY DIAGRAM

FIG : 9

24
EXPLANATION

Activity diagram is another important diagram in UML to describe dynamic


aspects of the system.

Activity diagram is basically a flowchart to represent the flow from one


activity to another activity. The activity can be described as an operation of
the system.

So the control flow is drawn from one operation to another. This flow can
be sequential, branched or concurrent. Activity diagrams deals with all type
of flow control by using different elements like fork, join etc.

In the given diagram, the student’s activity starts with logging in the page,
if the student is not registered, he has to do the same. After which, he
uploads his school and personal information which sets up his profile.
Then, the student goes through the pdf and video tutorials according to the
curriculum in order to attend the test. On passing the test, the student
gives the final exam and on failing which leads back to the study material.
On passing the final exam, the student has completed the course and on
failing which will restart the course.

25
6.2.3 STATECHART DIAGRAM

FIG : 10

26
EXPLANATION

The name of the diagram itself clarifies the purpose of the diagram and
other details. It describes different states of a component in a system. The
states are specific to a component/object of a system.

A Statechart diagram describes a state machine. Now to clarify it state


machine can be defined as a machine which defines different states of an
object and these states are controlled by external or internal events.

Activity diagram explained in next chapter, is a special kind of a Statechart


diagram. As Statechart diagram defines states it is used to model lifetime
of an object.

In the diagram the initial state is always the active account. Now, when the
student isn't using the account for around 8 months, then the account is
terminated. If it's not the case, then if the registered student is abandoned
when he leaves the course in between or is indiscipline in eligibility, which
will lead to re-register of the course. If the student’s account is properly
active then the next step is the test or exam. If he fails the exam he takes
the re-exam. After failing an exam, and not attending the re-exam and
giving up a substantial time lapse, will lead to cancellation of the account.

27
6.2.4 IMPLEMENTATION DIAGRAM

6.2.4.1 COMPONENT DIAGRAM

FIG : 11

28
EXPLANATION

Component diagrams are different in terms of nature and behaviour.


Component diagrams are used to model physical aspects of a system.

Now the question is what are these physical aspects? Physical aspects
are the elements like executables, libraries, files, documents etc which
resides in a node.

So component diagrams are used to visualize the organization and


relationships among components in a system. These diagrams are also
used to make executable systems.

So the purpose of the component diagram can be summarized as:

● Visualize the components of a system.


● Construct executables by using forward and reverse engineering.
● Describe the organization and relationships of the components.
The main component in this component diagram is Student Information
system. And register, User and Manage, Request details are the
components comes under the main component.

29
6.2.4.2 DEPLOYMENT DIAGRAM

FIG : 12

30
EXPLANATION
Deployment diagrams are used to visualize the topology of the physical
components of a system where the software components are deployed.

So deployment diagrams are used to describe the static deployment view


of a system. Deployment diagrams consist of nodes and their
relationships.

The name Deployment itself describes the purpose of the diagram.


Deployment diagrams are used for describing the hardware components
where software components are deployed. Component diagrams and
deployment diagrams are closely related.

Component diagrams are used to describe the components and


deployment diagrams shows how they are deployed in hardware.

The purpose of deployment diagrams can be described as:

● Visualize hardware topology of a system.


● Describe the hardware components used to deploy software
components.
● Describe runtime processing nodes.

31
7. IMPLEMENTATION

7.1 FRONT END TOOLS AND SOFTWARES

7.1.1 Java - Programming Language

Java is a general-purpose computer programming language that is


concurrent, class-based, object-oriented, and specifically designed to have
as few implementation dependencies as possible. It is intended to let
application developers "write once, run anywhere" (WORA), meaning that
compiled Java code can run on all platforms that support Java without the
need for recompilation.[16] Java applications are typically compiled to
bytecode that can run on any Java virtual machine (JVM) regardless of
computer architecture. As of 2016, Java is one of the most popular
programming languages in use, particularly for client-server web
applications, with a reported 9 million developers.Java was originally
developed by James Gosling at Sun Microsystems (which has since been
acquired by Oracle Corporation) and released in 1995 as a core
component of Sun Microsystems' Java platform. The language derives
much of its syntax from C and C++, but it has fewer low-level facilities than
either of them.

HISTORY

James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java
language project in June 1991.[22] Java was originally designed for
interactive television, but it was too advanced for the digital cable television
industry at the time. The language was initially called Oak after an oak tree
that stood outside Gosling's office. Later the project went by the name
Green and was finally renamed Java, from Java coffee.

Sun Microsystems released the first public implementation as Java 1.0 in

32
1995. It promised "Write Once, Run Anywhere" (WORA), providing no-cost
run-times on popular platforms. Fairly secure and featuring configurable
security, it allowed network- and file-access restrictions. Major web
browsers soon incorporated the ability to run Java applets within web
pages, and Java quickly became popular. The Java 1.0 compiler was re-
written in Java by Arthur van Hoff to comply strictly with the Java 1.0
language specification. With the advent of Java 2 (released initially as
J2SE 1.2 in December 1998 – 1999), new versions had multiple
configurations built for different types of platforms. J2EE included
technologies and APIs for enterprise applications typically run in server
environments, while J2ME featured APIs optimized for mobile applications.
The desktop version was renamed J2SE. In 2006, for marketing purposes,
Sun renamed new J2 versions as Java EE, Java ME, and Java SE,
respectively.

PERFORMANCE

Programs written in Java have a reputation for being slower and requiring
more memory than those written in C++. However, Java programs'
execution speed improved significantly with the introduction of just-in-time
compilation in 1997/1998 for Java 1.1, the addition of language features
supporting better code analysis (such as inner classes, the StringBuilder
class, optional assertions, etc.), and optimizations in the Java virtual
machine, such as HotSpot becoming the default for Sun's JVM in 2000.
With Java 1.5, the performance was improved with the addition of the
java.util.concurrent package, including Lock free implementations of the
Concurrent Maps and other multi-core collections, and it was improved
further Java 1.6.

33
FIG : 13

7.1.2 JAVA SWING

Swing is a GUI widget toolkit for Java. It is part of Oracle's Java


Foundation Classes (JFC) – an API for providing a graphical user interface
(GUI) for Java programs.

Swing was developed to provide a more sophisticated set of GUI


components than the earlier Abstract Window Toolkit (AWT). Swing
provides a native look and feel that emulates the look and feel of several
platforms, and also supports a pluggable look and feel that allows

34
applications to have a look and feel unrelated to the underlying platform. It
has more powerful and flexible components than AWT. In addition to
familiar components such as buttons, checkboxes and labels, Swing
provides several advanced components such as tabbed panel, scroll
panes, trees, tables, and lists.

Unlike AWT components, Swing components are not implemented by


platform-specific code. Instead, they are written entirely in Java and
therefore are platform-independent. The term "lightweight" is used to
describe such an element.

Though Swing is intended to be replaced by JavaFX, it will remain part of


the Java SE specification for the foreseeable future.

35
FIG : 14

7.1.3 ECLIPSE NEON 3 - IDE

Eclipse is an integrated development environment (IDE) used in computer


programming, and is the most widely used Java IDE. It contains a base
workspace and an extensible plug-in system for customizing the
environment. Eclipse is written mostly in Java and its primary use is for
developing Java applications, but it may also be used to develop
applications in other programming languages via plug-ins, including Ada,
ABAP, C, C++, COBOL, D, Fortran, Haskell, JavaScript, Julia, Lasso, Lua,
NATURAL, Perl, PHP, Prolog, Python, R, Ruby (including Ruby on Rails
framework), Rust, Scala, Clojure, Groovy, Scheme, and Erlang. It can also
be used to develop documents with LaTeX (via a TeXlipse plugin) and
packages for the software Mathematica. Development environments
include the Eclipse Java development tools (JDT) for Java and Scala,
Eclipse CDT for C/C++, and Eclipse PDT for PHP, among others.

The initial codebase originated from IBM VisualAge.The Eclipse software

36
development kit (SDK), which includes the Java development tools, is
meant for Java developers. Users can extend its abilities by installing plug-
ins written for the Eclipse Platform, such as development toolkits for other
programming languages, and can write and contribute their own plug-in
modules. Since Equinox, plug-ins can be plugged-stopped dynamically and
are termed (OSGI) bundles.

Eclipse software development kit (SDK) is free and open-source software,


released under the terms of the Eclipse Public License, although it is
incompatible with the GNU General Public License.[10] It was one of the
first IDEs to run under GNU Classpath and it runs without problems under
IcedTea.

FIG : 15

7.2 BACK END TOOLS AND SOFTWARES

7.2.1 XAMPP

XAMPP is a free and open source cross-platform web server solution stack
package developed by Apache Friends, consisting mainly of the Apache
HTTP Server, MariaDB database, and interpreters for scripts written in the
PHP and Perl programming languages.XAMPP stands for Cross-Platform
(X), Apache (A), MariaDB (M), PHP (P) and Perl (P). It is a simple,
lightweight Apache distribution that makes it extremely easy for developers
to create a local web server for testing and deployment purposes.
Everything needed to set up a web server – server application (Apache),

37
database (MariaDB), and scripting language (PHP) – is included in an
extractable file. XAMPP is also cross-platform, which means it works
equally well on Linux, Mac and Windows. Since most actual web server
deployments use the same components as XAMPP, it makes transitioning
from a local test server to a live server extremely easy as well.

FIG : 16

38
8. SAMPLE CODE
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class OnlineTest extends JFrame implements ActionListener{
JLabel l;
JRadioButton jb[]=new JRadioButton[5];
JButton b1,b2;
ButtonGroup bg;
int count=0,current=0,x=1,y=1,now=0;
int m[]=new int[10];
OnlineTest(String s)
{ super(s);
l=new JLabel();
add(l);
bg=new ButtonGroup();
for(int i=0;i<5;i++)
{ jb[i]=new JRadioButton();
add(jb[i]);
bg.add(jb[i]); }
b1=new JButton("Next");
b2=new JButton("Bookmark");
b1.addActionListener(this);
b2.addActionListener(this);
add(b1);add(b2);
set();
l.setBounds(30,40,450,20);
jb[0].setBounds(50,80,100,20);
jb[1].setBounds(50,110,100,20);
jb[2].setBounds(50,140,100,20);
jb[3].setBounds(50,170,100,20);
b1.setBounds(100,240,100,30);
b2.setBounds(270,240,100,30);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(null);

39
setLocation(250,100);
setVisible(true);
setSize(600,350);}
public void actionPerformed(ActionEvent e)
{ if(e.getSource()==b1) {
if(check())count=count+1;
current++;
set();
if(current==9){
b1.setEnabled(false);
b2.setText("Result");}}
if(e.getActionCommand().equals("Bookmark"))
{ JButton bk=new JButton("Bookmark"+x);
bk.setBounds(480,20+30*x,100,30);
add(bk);
bk.addActionListener(this);
m[x]=current;
x++;
current++;
set();
if(current==9)b2.setText("Result");
setVisible(false);
setVisible(true);}
for(int i=0,y=1;i<x;i++,y++){
if(e.getActionCommand().equals("Bookmark"+y)){
if(check())count=count+1;
now=current;
current=m[y];
set();
((JButton)e.getSource()).setEnabled(false);
current=now;}}
if(e.getActionCommand().equals("Result")){
if(check())count=count+1;
current++;
//System.out.println("correct ans="+count);
JOptionPane.showMessageDialog(this,"correct ans="+count);
System.exit(0);}}

40
void set(){ jb[4].setSelected(true);
if(current==0){
l.setText("Que1: Which one among these is not a datatype");
jb[0].setText("int");jb[1].setText("Float");jb[2].setText("boolean");jb[3].setText("char");
}
if(current==1){
l.setText("Que2: Which class is available to all the class automatically");
jb[0].setText("Swing");jb[1].setText("Applet");jb[2].setText("Object");jb[3].setText("Action
Event");}
if(current==2){
l.setText("Que3: Which package is directly available to our class without
importing it");
jb[0].setText("swing");jb[1].setText("applet");jb[2].setText("net");jb[3].setText("lang");
}
if(current==3) {l.setText("Que4: String class is defined in which package");

jb[0].setText("lang");jb[1].setText("Swing");jb[2].setText("Applet");jb[3].setText("awt");}
if(current==4){ l.setText("Que5: Which institute is best for java coaching");
jb[0].setText("Utek");jb[1].setText("Aptech");jb[2].setText("SSS
IT");jb[3].setText("jtek");}
if(current==5) {
l.setText("Que6: Which one among these is not a keyword");
jb[0].setText("class");jb[1].setText("int");jb[2].setText("get");jb[3].setText("if");}
if(current==6) {l.setText("Que7: Which one among these is not a class ");
jb[0].setText("Swing");jb[1].setText("Actionperformed");jb[2].setText("ActionEvent");jb[3].
setText("Button");}if(current==7){
l.setText("Que8: which one among these is not a function of Object
class");
jb[0].setText("toString");jb[1].setText("finalize");jb[2].setText("equals");jb[3].setText("getD
ocumentBase"); }if(current==8) {l.setText("Que9: which function is not present in Applet
class");
jb[0].setText("init");jb[1].setText("main");jb[2].setText("start");jb[3].setText("destroy");
}
if(current==9) {
l.setText("Que10: Which one among these is not a valid component");
jb[0].setText("JButton");jb[1].setText("JList");jb[2].setText("JButtonGroup");jb[3].setText("
JTextArea");} l.setBounds(30,40,450,20);
for(int i=0,j=0;i<=90;i+=30,j++)
jb[j].setBounds(50,80+i,200,20);}
boolean check(){if(current==0)

41
return(jb[1].isSelected());
if(current==1)
return(jb[2].isSelected());
if(current==2)
return(jb[3].isSelected());
if(current==3)
return(jb[0].isSelected());
if(current==4)
return(jb[2].isSelected());
if(current==5)
return(jb[2].isSelected());
if(current==6)
return(jb[1].isSelected());
if(current==7)
return(jb[3].isSelected());
if(current==8)
return(jb[1].isSelected());
if(current==9)
return(jb[2].isSelected());
return false;
}
public static void main(String s[])
{
new OnlineTest("Online Test Of Java");
}

42
9. SCREENSHOTS

FIG : 17

FIG : 18

43
10. CONCLUSION
The Online test System is developed using Java and sql fully meets the
objectives of the system for which it has been developed. The system has
reached a steady state where all bugs have been eliminated. The system is
operated at a high level of efficiency and all the teachers and user
associated with the system understands its advantage. The system solves
the problem. It was intended to solve as requirement specification.

11. LIST OF FIGURES

44
● FIG : 1 - CLASS DIAGRAM
● FIG : 2 - USE CASE DIAGRAM
● FIG : 3 - SEQUENCE DIAGRAM FOR ADMINISTRATOR
● FIG : 4 - SEQUENCE DIAGRAM FOR STUDENT
● FIG : 5 - SEQUENCE DIAGRAM FOR VALIDITY
● FIG : 6 - COLLABORATION DIAGRAM FOR ADMINISTRATOR
● FIG : 7 - COLLABORATION DIAGRAM FOR STUDENT
● FIG : 8 - COLLABORATION FOR VALIDITY
● FIG : 9 - ACTIVITY DIAGRAM
● FIG : 10 - STATECHART DIAGRAM
● FIG : 11 - COMPONENT DIAGRAM
● FIG : 12 - DEPLOYMENT DIAGRAM
● FIG : 13 - JAVA SE VERSION HISTORY
● FIG : 14 - FUNCTION OF A JDBC
● FIG : 15 - ECLIPSE IDE VERSION HISTORY
● FIG : 16 - SERVERS RUNNING IN AN XAMPP APPLICATION
● FIG :17 - DATABASE STRUCTURE IN MYSQL WORKBENCH 6.3 CE
● FIG : 18 - HOMEPAGE
● FIG : 19 - ADD STUDENT
● FIG : 20 - STUDENT ATTENDING TESTS AND EXAMS
● FIG : 21 - STAFF ENTERING MARKS FOR THE STUDENT
● FIG : 22 - RANK OF 12 A
● FIG : 23 - STUDENT DATABASE
● FIG : 24 - STAFF DATABASE

12.REFERENCES

THE COMPLETE REFERENCE, JAVA -HERBERT SCHILDT

45
JAVA SWING -CHAD DABRY

OBJECT ORIENTED ANALYSIS & DESIGN -GRADY BOOCH

JAVA VERSION DIAGRAM -www.google.com

ECLIPSE VERSION DIAGRAM -www.wikipedia.com

46

You might also like