89
ABSTRACT Online Examination System is aimed at computerizing the activities involved in Examination. The primary activities in the exam include importing the question paper, generating the reports and taking the backup. This project includes the following Modules: 1. Administrator module This module deals with the Question paper importing, Student list importing, Student userid and password generation, Report generation, User blocking and Unblocking and taking the backup. 2. Student Module This module deals with the student logging into the system and taking the exam.

One Line Examination

Embed Size (px)

Citation preview

Page 1: One Line Examination

ABSTRACT

Online Examination System is aimed at computerizing the activities involved in

Examination. The primary activities in the exam include importing the question paper,

generating the reports and taking the backup.

This project includes the following Modules:

1. Administrator module

This module deals with the Question paper importing, Student list importing, Student

userid and password generation, Report generation, User blocking and Unblocking and

taking the backup.

2. Student Module

This module deals with the student logging into the system and taking the exam.

Page 2: One Line Examination

INDEX

1. INTRODUCTION

2. REQUIREMNETS

3. DESIGN

4. TESTING & TEST CASES

5 SCREEN SHOTS

6 JAVA EE 5 (J2EE 1.5), JSP, SERVLET, TOMCAT

7. BIBLIOGRAPHY

Page 3: One Line Examination

INTRODUCTION

This is the project work undertaken in context of partial fulfillment of Diploma in

Advance Computing. We have tried our best to make the Online Examination Software

system as simple as possible using structured, modular & with better user interface. This

project is used by two types of users:

i. Students.

ii. Administrator.

The student can login into the system with the userid given to him by the

administrator to take up the exam. He is provided with the question and choices through

which he can select the answers for each question. He is able to move back to the

previous question and can change the previously selected answers.

The administrator can import the question paper, import the student list and

generate the userid & password, generate the reports and take printouts. Administrator

can generate the marks report of the particular user. Administrator can generate the rules

& instructions for each exam.The administrator can also set the time for each

examination. Administrator is able to take the backup of the question paper and also the

details of the student

Page 4: One Line Examination

REQUIREMNETS

Modules

1. Student

2. Administrator

1. Student

1.1 Login

1.2 Post Login

1.3 Instruction

1.4 Examination

1.5 Completion

1.1 Login

1.1.1 In login page student have to use the login which was given before

exam and generated by administrator.

1.1.2 Unique id and password will be provided to each student

1.1.3 If user enters wrong password then a message will be generated

that password is wrong.

1.1.4 If student enters wrong userid then in such case a message will

displayed- userid is invalid.

Page 5: One Line Examination

1.1.5 If student login successfully then post login page will displayed

1.2 Post login

1.2.1 User information page will be displayed where Following

information will be displayed

A) Name of the student

B) Roll number of student

C) Course name

1.2.1 After info page there will be exam specific information/ instruction

page.

1.3 Instruction

1.3.1 In this scenario all instruction about the exam will be displayed to

user.

1.3.1 In admin instruction all the info given by the admin will be shown.

The information of admin saves in a file (instruction.info) and it

contain instruction about the exam like number of questions, time,

negative marking etc.

1.3.2 Admin info will be loaded from that file by the admin.

Page 6: One Line Examination

1.4 Examination

1.4.1 First region is header region where name of the exam and institute

name etc information will be displayed.

1.4.2 In right top corner region, there will be a timer which show the

remaining time of exam

1.4.3 Second region contain the question and options. Each question has

four choices. There are checkboxes for each choice,checking the

checkbox selects the answer for that question.

1.4.4 In third region there will be just like a status bar where the

information related to paper will be displayed like number of

questions , total answered questions, unread questions etc. Which

help user to find his/her status.

1.4.5 In fourth region, there will be rectangular boxes with question

number in them .User can click on question of his choice.

Rectanglar boxes are of three colors.

a. Black – black colour represent that question is still unread

b. Red – red colour represent that question is read but unanswered.

c. Green – green colour represent that question has been answered.

Page 7: One Line Examination

Example:

Question 3 is answered

Question 3 has been read yet not answered

Question 3rd is unread

1.4.6 user clicks on the next button to get the next question

1.4.7 user clicks on the submit button to save the answer and move to

the next question

1.4.8 A quit button is provided for the user to end his exam

1.5 completion

1.5.1 After completion of time or when user clicks on quit button

browser will be closed and a thank you message will be displayed

1.5.2 Once given the exam he is not able to login again using that id and

password as that id will be blocked after that.

3

3

3

Page 8: One Line Examination

2. Administrator

2.1 Examination Section

2.2 Report Scenario

2.3 backup scenario

2.4 settings scenario

2.1 Examination

2.1.1 Import student list

2.2.1.1 the student list format should be in the CSV format (Comma

separated values).

2.2.1.2 The .csv file contains three columns they are student name,rollno

and the course name.the roll no is unique for each student.

2.2.1.3 Once uploaded the student list will be saved in database.

2.1.2 Import Question paper

2.1.2.1 the questionpaper should be in the CSV format (Comma separated

values).

2.1.2.2 Once uploaded paper will be save in database. After that when exam

or test will start they will be loaded automatically.

2.1.2.3 Each question will have unique id.

Page 9: One Line Examination

2.1.3 Gwenerate the rules

2.1.3.1 Admin can set the time duration of the exam,set the

marks/question,set the neagative marking for each question ,set the

exam name .

2.1.3.2 All the rules related to exam are saved in the file

(admininstuction.iif).

2.1.3.3 These rules will be shown to user, before the start up of the exam

2.1.4 Userid and password Generation

2.1.3.1 Userid and password for different students are generated by

administrator

2.1.3.2Userid will be based on course name like if he is generating login

for ‘dac’ course then userid will have “DAC” as initial after that

there may be a number from a range selected by user like may be

between 1 to 1000 or 1000 to 2000.

Example: ‘DAC2003’

Page 10: One Line Examination

2.1.3.3 Password also randomized from selected range and after selecting

the number it will be converted into hex code and that will be

password for that particular userid.

Example: like the number range is 50000 to 100000 . and selected

number is 63577. Then in such case password will be ‘E445’ as

this code is hex code of selected number.

2.1.3.4 By default status of each user is blocked.

2.1.4 unblock all users

2.1.4.1 admin can unblock the users before the exam starts

2.2 Report

2.2.1 Question Paper print

2.2.2 Complete mark sheet of particular course

2.2.3 Mark sheet of individual student.

2.2.4 Userid and password list

2.2.5 Show instructions

2.2.1—Question paper print out

Question paper of particular course can be printed.

Question paper can also be printed with answers.

2.2.2—Complete mark sheet

Page 11: One Line Examination

Mark sheet of all students of particular course can be get.

Mark sheet will be generated after the finishing of the exam so

that there is no need of students to wait for the results long time.

This sheet will contain roll number, name of the student, their

marks, percentage and status like whether he /she failed, passed or

absent.

2.2.3 – Mark sheet of individual student by taking the roll number of the

student

Mark sheet of individual student can also be printed.

This will be printed only on need basis.

This option is provided to administrator because if there is some

mistake in marks of any student. Or we can say that if somebody

claims to show his answers.

This mark sheet will contain all the questions, answers given by

student and actual answers.

2.2.4 userid and password list

These userid’s and passwords generated by administrator

2.2.5 displays the instruction generated by the admin for the particular

exam

2.3 backup

Page 12: One Line Examination

2.3.1 In this scenario backup of the question paper is taken and the student list and

also the answers by the student and stored in the master table and the

generated userid and password are blocked

DESIGN

Class Design

The classes used in this project are as follows…

public class AdminLogin implements Serializable

private String userid;

private String password;

get-set methods

public class businessLogic<studentDetails> implements

businessLogicInterface

public String checkUser(HttpServletRequest req)

this function is used to validate the user/student.

public String readInstrutions(HttpServletRequest req)

this function reads the instruction from the file which are shown to the user at the

login page.

public String loadQuestionPaper(HttpServletRequest req)

this function reads the question paper returned from the database.

Page 13: One Line Examination

private void saveInstructionsIntoTheMap(HttpServletRequest

req,String instructions)

this function calls the read instruction fuction.

public String saveMyAnswer(HttpServletRequest req)

this function converts the answer string into the array of answers.

private int[] getMyRollAndAnswer(String userAnswer)

this function stores the student roll number and his answers into an array.

private int getIntoInteger(String userAnswer)

this function converts answerstring variable into integer.

public String ReadInstruction(HttpServletRequest req)

private Map<Integer, String> saveInstructionInMap(String instructions)

this function reads the instruction from the file and stores them into the map where

key is the instruction number and value is the instruction.

public String AdminLogin(HttpServletRequest req)

this function is used to validate the administrator.

public String loadPaper(HttpServletRequest req)

this function reads the question paper to store into the database.

public String UnBlockAllUsers(HttpServletRequest req)

the is function is used to unblock all the users before taking the exam.

public String BlockAllUsers(HttpServletRequest req)

Page 14: One Line Examination

this fuction is used to block all users.

public String loadStudent(HttpServletRequest req)

public String GenerateIdAndPasswords(HttpServletRequest req)

this function is used to generate userid and password.

public String saveRules(HttpServletRequest req)

public String printResultSheet(HttpServletRequest req)

this function is used to print result sheet.

public String loadMarkSheetWithQuestionPaper(HttpServletRequest req)

this function is used to print the question with answers.

public class checkCSVfile

methods:--

public static Boolean checkCSV(String filepurpose)

this function is used to check whether the file is in csv format or not.

public class Configure implements Serializable

private String instituteName;

private int hour;

private int minute;

private int marksPerQuestion;

private double negativePerQuestion;

private String instructions;

methods:--

Page 15: One Line Examination

get-set methods

public Configure(String instituteName, int hour, int minute, int marksPerQuestion,

double negativePerQuestion, String instructions)

public class dbutility

public static Connection get()throwsIllegalArgumentException

this function is used to get the database connection.

public class ImportingFiles

public static Question[] importQuestionPaper(String fileName)

this function is used to read the questions from the database and store it into the

question array.

public static studentDetails[] importStudentTable(String filename)

this function is used to read the student details from the database and store it into the

student array.

public class InstructionWriting

public static void writeInstructions(Configure config) throws

IllegalArgumentException

public class LoginClass

private int roll;

private String userid;

private String password;

get-set methods

Page 16: One Line Examination

public class LowerLayer implements LowerInterface

public String checkUSer(LoginClass obj) throws SQLException

private String checkTheOtherOptions(Connection con, ResultSet rs,String password)

private void UpdateStatusOfUser(int roll, Connection con)

public Map<Integer, String> getAllDetailsOfUser

(String userid)

public Configure getRules() throws IllegalArgumentException

public Map<Integer, Question> LoadQuestions() throws IllegalArgumentException

public void getMyResult(int[] ans) throws IllegalArgumentException

private void ConvertToMapAndSave(int[] ans)

private void findResultAndSave(int[] ans) throws llegalArgumentException

private void saveToDataBase(int roll, double result)

Page 17: One Line Examination

public String checkAdmin(AdminLogin obj) throws IllegalArgumentException,

FileNotFoundException

public void loadPaperFromFile(String filename)throws IllegalArgumentException,

SQLException

private void doBlockAndUnBlock(String U)

public void unBlockAll() throws IllegalArgumentException {

public void BlockAll() throws IllegalArgumentException {

public void loadStudentsFromFile(String fileName)

throws IllegalArgumentException, SQLException

public void generateIdAndPassword() throws

IllegalArgumentException,SQLException

private LoginClass[] generateIDsAndPasswords(int totalStudents,String courseName,

List roll)

private boolean checkValue(String userid, LoginClass[] obj)

public void saveAllRules(Configure config) throws IllegalArgumentException

public Map getResults() throws IllegalArgumentException, SQLException

public int[] getMarkSheet(int roll) throws IllegalArgumentException

public class Question implements Serializable

private int questionId;

private String ques;

Page 18: One Line Examination

private String option1;

private String option2;

private String option3;

private String option4;

int answer;

SET -GET METHODS

public class ReadAdminInstruction

public Configure readInstructions(String filename) throws IllegalArgumentException

public class ReadInstructions

public Configure getRules() throws IllegalArgumentException

public class studentDetails implements Serializable

private int rollNumber;

private String name;

private String courseName;

private String studentAnswer;

private double marksOfStudent;

public studentDetails(int rollNumber, String name, String courseName, String

studentAnswer, double MarksOfStudent)

SET-GET METHODS..

public class studentread

public static studentDetails[] importmycsv(String filename)

public class Utility

public static void log(String string)

Page 19: One Line Examination

public static int getInteger(String value)

public class writeToFile

public static changepassword(string p)

Class Diagram

Page 20: One Line Examination

E-R Diagaram

Student Admin

Exam

enrolls

takes

conducts

rollno name

courseName

password

userid

examid

questionpaper

studentmap

password

userid

Page 21: One Line Examination

Interface Design.

There are only two major interfaces used in the project they are

1) businesslogic layer interface is present between the business logic layer and the

presentation layer

<<interface>>

BusinessLogicInterface

String checkUser(HttpServletRequest req); String readInstrutions(HttpServletRequest req); String loadQuestionPaper(HttpServletRequest req); String saveMyAnswer(HttpServletRequest req); String ReadInstruction(HttpServletRequest req); String AdminLogin(HttpServletRequest req); String loadPaper(HttpServletRequest req); String UnBlockAllUsers(HttpServletRequest req); String BlockAllUsers(HttpServletRequest req); String loadStudent(HttpServletRequest req); String GenerateIdAndPasswords(HttpServletRequest req); String saveRules(HttpServletRequest req); String printResultSheet(HttpServletRequest req); String loadMarkSheetWithQuestionPaper(HttpServletRequest

req);

Page 22: One Line Examination

2) The Lower layer interface is present between the storage class and the businesslogic

class

<<interface>>

LowerLayerInterface

String checkUSer(LoginClass obj) throws SQLException ;Map<Integer, String> getAllDetailsOfUser(String userid);Configure getRules() throws IllegalArgumentException;Map<Integer, Question> LoadQuestions()throws IllegalArgumentException ;void getMyResult(int[] ans) throws IllegalArgumentException;String checkAdmin(AdminLogin obj) throws IllegalArgumentException, FileNotFoundException ;void loadPaperFromFile(String fileName)throws IllegalArgumentException, SQLException ;void unBlockAll() throws IllegalArgumentException;void BlockAll() throws IllegalArgumentException;void loadStudentsFromFile(String fileName)throws IllegalArgumentException, SQLException;void generateIdAndPassword() throws IllegalArgumentException, SQLException;void saveAllRules(Configure config) throws IllegalArgumentException;Map getResults() throws IllegalArgumentException, SQLException;int[] getMarkSheet(int roll)throws IllegalArgumentException, SQLException;

Page 23: One Line Examination

UI Screens:

Admin Login Page:

Page 24: One Line Examination

Admin Post Login Page:

Page 25: One Line Examination

Exam Section Page:

Page 26: One Line Examination

Instruction Page;

Page 27: One Line Examination

Load Question Paper Page:

Page 28: One Line Examination

Back Up Page:

Page 29: One Line Examination
Page 30: One Line Examination

Change Password Page:

Page 31: One Line Examination

Restore Page:

Page 32: One Line Examination
Page 33: One Line Examination

Report Section Page:

Page 34: One Line Examination
Page 35: One Line Examination
Page 36: One Line Examination
Page 37: One Line Examination

Student Module Pages:

Student Login page:

Page 38: One Line Examination

Student Details Page:

Page 39: One Line Examination

Student Instruction Page:

Page 40: One Line Examination

Student Examination Start Page:

Page 41: One Line Examination

Student Examination Page:

Page 42: One Line Examination

Post Exam Page:

Page 43: One Line Examination

Database table

Login table

Userid password Rollno status

varchar varchar number varchar

FK

Userid –the Id generated by the administrator

Password- the pwd of the user generated by the administrator

Rollno –the rollno of the student it is the foreign key

Status- tells wheteher user is Blocked,

Not LoggedIn

Student table

Rollno Name Paperset Marks

Number varchar Varchar Number

PK

RollNO: Roll No. of the student used to uniquely identify the student and is made as

primary key of the Student table.

Name:It holds the Student Name.

Marks:Marks field hold the marks of the student.

Page 44: One Line Examination

Question Table

Qid Question CH1 CH2 CH3 CH4 Ans

Number Varchar Varchar Varchar Varchar Varchar Number

PK

Qid:Qid Field is made as Primary key of the Question table.

Question: Question field contains the Questions of the test.

CH1:This filed contains the first Option for the corresponding Question

CH2:This filed contains the second Option for the corresponding Question

CH3:This filed contains the third Option for the corresponding Question

CH4:This filed contains the fourth Option for the corresponding Question

Ans: CH1:This filed contains the Answer for the corresponding Question

MasterData Table

ExamDate Module questionmap studentmap

date varchar Longblob longblob

Primary Key= ExamDate,Module

Module-it Uniquely identifies the module.

ExamDate-identifies the date of the exam.

questionmap-map containing the question paper.

Page 45: One Line Examination

Studentmap-Map containing the answer of all student.

DummyStudent table

Rollno Name Paperset Marks

Number varchar Varchar Number

PK

this table contains student information used for report generation.

Dummy Question Table

Qid Question CH1 CH2 CH3 CH4 Ans

Number Varchar Varchar Varchar Varchar Varchar Number

PK

this table contains question paper used for report generation.

trigger used

DELIMITER |

CREATE TRIGGER mastertrigger

AFTER INSERT

ON MASTER

OR EACH ROW

BEGIN

DELETE FROM logintable;

DELETE FROM studentdetails;

DELETE FROM questionpaper;

END;

Page 46: One Line Examination

TESTING

what is testing?

process used to help identify the correctness, completeness and quality of

developed computer software.

Find out difference between actual and expected behavior.

The process of exercising software to verify that it satisfies specified requirements

of end user and to detect errors

The process of revealing that an artifact fails to satisfy a set of requirements

Establishing confidence that a system does what it is supposed to do

Confirming that a system performs its intended functions correctly

Does not guarantee bug free product

No substitute for good programming

Can’t prevent/debug bugs, only detect

Offer advise on product quality and risks.

why testing?

Detect programming errors:- Even though we have best developers

developing the product still there may be flaws somewhere due to

misconception, due to lack of understanding in integrating modules of 2

great developers. Most of the time developers think that their code is

perfect, it cannot have bugs and that’s where the problem is. They think

that finding bugs in their code means that some one is proving them

inefficient. Hence we test code not to prove a developer inefficient but to

find bug in code not in developer.

Testing at earlier stage is much cheaper than testing at later stage.

If Client find bugs which were uncovered earlier then we loses credibility

and may lose business as well.

Page 47: One Line Examination

There are several functionality related that occur in real life scenarios

related only so while testing at customer site during beta testing we can

uncover these defects there and then.

To release a bug free product seems to be a dream yet to be fulfilled,

hence it is a real challenge to release a product that is bug-free.

TESTCASES

Caseid Scenario Input Expected

Output

Actual

output

Result Comments

1.1 Login

Scenario

Either

userid or

password

is blank

Error

message-

Fields are

mandatory,

Remains in

Login Page

yes

Userid is

Wrong

Error

message-

Invalid userid

yes

Password

is Wrong

Error

message-

password

Mismatch

yes

Both

userid

and

password

are

User Details

page will be

displayed

yes

Page 48: One Line Examination

correct

User

with

same

account

is already

logged

in.

Error

message-

“already in

use”

Remains in

Login Page

yes Account is

already in

use

1.2 Post login

Scenario

Click on

next

button

Instruction

page is

displayed

yes

1.3 Instruction

Scenario

Click on

back

User Details

page will be

displayed

yes

Click on

Next

Button

Startup page

will be

displayed

yes Startup page

will have

two buttons-

Back and

Start Test

1.3.1 Pre-

Examination

Startup

Scenario

Click on

Back

Button

Instruction

page is

displayed

yes User can

read

Instructions

Click on

Start Test

Button

Examination

page will be

displayed

yes When user

clicks on

start test

button, test

timer starts

1.4 Examination

Scenario

User

clicks on

Question

Corresponding

Question will

be displayed

yes Every

question

number is

Page 49: One Line Examination

Number the hyperlink

User

clicks on

submit

without

selecting

any

Option

Corresponding

Question

number will

be surrounded

with red color

box and next

question will

be displayed

yes Red color

box means,

Question has

been read

but not yet

answered

User

clicks on

submit

with

selecting

any

Option

Corresponding

Question

number will

be surrounded

with green

color box and

next question

will be

displayed

yes Green color

box means,

Question has

been

answered

1.5 Completion

Scenario

User

Clicks on

Quit

button

before

timer

expiries

As simple

Message will

be displayed

yes Summary

page will

have total

number of

questions

answered

and

unanswered.

If timer

expiries

before

As simple

Message will

be displayed

yes

Page 50: One Line Examination

ADMIN TESTCASES

Caseid Scenario Input Expected

Output

Actu

al

outp

ut

Result Comments

2.1 Login

Scenario

Either userid

or password

is blank

Error message-

Fields are

mandatory,

Remains in

Login Page

yes

Userid is

Wrong

Error message-

Invalid userid

yes

Password is

Wrong

Error message-

password

Mismatch

yes

Both userid

and password

are correct

but file is

missing.

58766 error

code will be

displayed

yes 58766

error code

means the

file where

userid and

password

are saved

is missing.

Both userid

and password

are correct

Post Login page

will be

displayed

yes

2.2 Administrator

Post Login

Page will be

displayed that

yes By Default

Instruction

Page 51: One Line Examination

Scenario contains four

buttons Exam

Section,Report

Section,Backup,

Help,Logout.

will be

displayed

for the

Admin.

2.2.1 Exam Section

Scenario

Import

Student

List--

When admin

clicks on

Import

Student List,

Admin can

Import

student list

file through

Dialog box

only in CSV

format.

Load Student

button will

Enable

yes I

When clicks

on Load

Student

Button and If

file is not in

csv format.

Message will

display-please

load only csv

format file

yes

When clicks

on Load

Student

Button and If

file is in csv

Message will

display-Its not a

proper file.

yes

Page 52: One Line Examination

format but

not in

required

format.

When clicks

on Load

Student

Button and If

file is in csv

format and

also in

required

format.

Message will

display- student

list loaded

successfully and

Load Button

will disabled

yes All Record

of file will

be saved in

database.

Import

Exam Papers

When admin

clicks on

Import paper,

Admin can

Import test

paper file

through

Dialog box.

Load Paper

button will

Enable

yes

When clicks

on Load

Paper Button

and If file is

not in csv

format.

Message will

display-please

load only csv

format file

yes

When clicks

on Load

Message will

display-Its not a

yes

Page 53: One Line Examination

Paper Button

and If file is

in csv format

but not in

required

format.

proper file.

When clicks

on Load

paper Button

and If file is

in csv format

and also in

required

format.

Message will

display-Paper

loaded

successfully and

Load paper

button will

disabled

yes All

question

will be

saved in

database.

When clicks

on Generate

Instructions

button.

Rule Section

will display.

yes Rule

Section

will have

Time,Mark

s, Negative

marks and

Instruction

field.

When clicks

on SaveRules

button and if

value entered

in each fields

are not

according to

condition

Particular

message will

display

according to

field.

yes

When clicks Message will yes

Page 54: One Line Examination

on SaveRules

button and if

value entered

in each fields

are according

to condition

display-Rules

generated

successfully.

When clicks

on Clear

button.

Text area for

instruction will

be cleared.

yes

when clicks

on Cancel

button

Exam Section

page will

display.

yes

When clicks

on Generate

Now button

and student

list is not

imported

Message will

display-Please

import student

list first.

yes

when clicks

on Generate

Now button

and if

logintable is

not empty

Message will

display-Already

userid and

password

generated first

do backup.

yes

when clicks

on Generate

Now button

and if

logintable is

empty

Message will

display-userid

and password

generated.

yes Userid

with dac

prefix and

password

will be

generated

and saved

Page 55: One Line Examination

in

logintable.

when clicks

on UnBlock

All button

and student

list is not

imported.

Message will

display-please

import student

list first.

yes

when clicks

on UnBlock

All button

and student

list is already

imported.

Message will

display-students

unblocked

successfully.

yes All

students

will be

unblocked

and they

can login

now.

2.2.2 Report

Section

Scenario

When clicks

on

ResultSheet

button

Result sheet

will display

with Print

Report and Exit

button

yes Admin can

take print

out of

result sheet

When clicks

on Question

Paper button

Question sheet

will display

with Print

Report and Exit

button.

yes Admin can

take print

out of

question

sheet

When clicks

on userid and

password list

button

Userid and

password sheet

will display

with Print

Report and Exit

button.

yes Admin can

take print

out of

userid and

password

sheet

Page 56: One Line Examination

when clicks

on show

Instructions

Whatever

Instructions

given by the

Admin will

display.

yes

when clicks

on mark

Sheet and roll

number given

in textbox is

not a valid

roll

Message will

display-Roll

Number not

found.

yes

when clicks

on mark

Sheet and roll

number given

in textbox is

a valid roll

Question paper

sheet with

correct answer

and answer

given by the

student will

display with

print report and

exit button

yes In case

student

complain

then

Admin can

take print

out of

question

paper sheet

with

answer

given by

student.

2.2.3 Backup

Section

Scenario

When clicks

on Block All

button

Message will

display-students

Blocked

successfully.

yes Now no

student can

login again

with given

userid and

password

Page 57: One Line Examination

Instruction

Generation-

Admin can

select the

instruction

file through

the dialog

box,

When Admin

clicks on

Generate

Instruction

button,

Instructions

file will be

imported.

yes Contains of

the

instruction

file will be

displayed

on the

instruction

page.

Get Test

Paper

Printout-

When Admin

clicks on

Print Paper

button,

printouts will

be generated

Printouts will be

generated.

yes Admin Can

take

printout

with and

without

answers

2.2.2 Result

Section

Scenario

Complete

Result sheet-

When Admin

clicks on

Result Sheet

button,

yes Admin can

take the

printouts of

result

sheet.

Page 58: One Line Examination

Students

result will be

displayed

Individual

Result Sheet-

When Admin

clicks on

Particular

Student

Result button,

Individual

Student result

will be

displayed

yes Admin can

take the

printouts of

Individual

student

result

sheet.

2.2.3 Settings

Scenario

Change

useid and

password-

When Admin

click on this

button Admin

can set new

Id and

Password.

yes

Set Institute

name(header

and footer)

Admin can

enter header

and footer

Header and

footer will be

changed to

specified text in

all the pages

yes

Page 59: One Line Examination

text into

corresponding

textbox and

clicks on set

button

2.2.4 Logout When admin

clicks on

Logout,he

will come out

of

Application

yes

DATA BASE

Database is similar to a data file in that it is a storage place for data like a data,

database not present information directly to a user. The user runs an application that accesses data

from the database and presents it to the user in an understandable format.

Database system is more powerful than data files. The data is more highly organized, in a

Page 60: One Line Examination

well designed database, there are no duplicate pieces of data that the user or application

has to be update at the same time. Related pieces of data are grouped together in a single

structure or record, and relationship can be defined pieces of data are grouped together in

a single structure or record & relationships can be defined between there structures &

record.

When working with data files an application must be coded to work with the specific structure of

each data file. In contrast each database contains a catalog that applications use to determine how

data is organized generic database application can use that catalog to present user with the data

from different database dynamically without being tied to a specific data format.

A database typically has two components the file holding the physical database and the database

management system (DBMS) software that application use to access data, The DBMS is

responsible for enforcing the database structure including-

Maintaining the relationship between data in the database.

Ensuring that data is stored correctly & that the rule defining data relationship is not

violated.

Recovering all data to point of unknown consistency in case of the system failures.

MySQL is currently the most popular open source database server in existence

JAVA EE 5, JSP, TOMCAT

JAVA EE 5

Java EE 5 is a strong, significant release, making it the most complete platform for

enterprise development.

JSP

Page 61: One Line Examination

A JSP page is a text document that contains two types of text: static data, which can be

expressed in any text-based format (such as HTML, SVG, WML, and XML), and JSP

elements, which construct dynamic content.

The recommended file extension for the source file of a JSP page is .jsp. The page can

be composed of a top file that includes other files that contain either a complete JSP page

or a fragment of a JSP pageThe JSP elements in a JSP page can be expressed in two

syntaxes, standard and XML, though any given file can use only one syntax. A JSP page

in XML syntax is an XML document and can be manipulated by tools and APIs for XML

documents

JavaServer Pages (JSP) technology allows you to easily create web content that has both

static and dynamic components. JSP technology makes available all the dynamic

capabilities of Java Servlet technology but provides a more natural approach to creating

static content.

The main features of JSP technology are as follows:-

A language for developing JSP pages, which are text-based documents that describe how

to process a request and construct a response.An expression language for accessing server-

side objects.Mechanisms for defining extensions to the JSP language

Java Servlet Technology

A servlet is a Java programming language class that is used to extend the capabilities of

servers that host applications accessed by means of a request-response programming

model. Although servlets can respond to any type of request, they are commonly used to

extend the applications hosted by web servers. For such applications, Java Servlet

technology defines HTTP-specific servlet classes.

Page 62: One Line Examination

Servlet Life Cycle

The life cycle of a servlet is controlled by the container in which the servlet has been

deployed. When a request is mapped to a servlet, the container performs the following

steps.

1. If an instance of the servlet does not exist, the web container

a. Loads the servlet class.

b. Creates an instance of the servlet class.

c. Initializes the servlet instance by calling the init method. Initialization is

covered in Initializing a Servlet.

2. Invokes the service method, passing request and response objects. Service methods

are discussed in Writing Service Methods.

If the container needs to remove the servlet, it finalizes the servlet by calling the servlet’s

destroy method.

Handling Servlet Life-Cycle Events

We can monitor and react to events in a servlet’s life cycle by defining listener objects

whose methods get invoked when life-cycle events occur. To use these listener objects

you must define and specify the listener class.

The javax.servlet and javax.servlet.http packages provide interfaces and classes

for writing servlets. All servlets must implement the Servlet interface, which defines

life-cycle methods. When implementing a generic service, we can use or extend the

GenericServlet class provided with the Java Servlet API. The HttpServlet class

provides methods, such as doGet and doPost, for handling HTTP-specific services.

Page 63: One Line Examination

Model–view–controller

Model–View–Controller (MVC) is a software architecture, currently considered an

architectural pattern used in software engineering. The pattern isolates "domain logic"

(the application logic for the user) from input and presentation (GUI), permitting

independent development, testing and maintenance of each.

The model is used to manage information and notify observers when that information

changes. The model is the domain-specific representation of the data upon which the

application operates. Domain logic adds meaning to raw data (for example, calculating

whether today is the user's birthday, or the totals, taxes, and shipping charges for

shopping cart items). When a model changes its state, it notifies its associated views so

they can be refreshed.

Many applications use a persistent storage mechanism such as a database to store data.

MVC does not specifically mention the data access layer because it is understood to be

underneath or encapsulated by the model. Models are not data access objects; however, in

very simple apps that have little domain logic there is no real distinction to be made.

Active Record is an accepted design pattern which merges domain logic and data access

code - a model which knows how to persist itself.

The view renders the model into a form suitable for interaction, typically a user interface

element. Multiple views can exist for a single model for different purposes. A viewport

typically has a one to one correspondence with a display surface and knows how to

render to it.

The controller receives input and initiates a response by making calls on model objects.

A controller accepts input from the user and instructs the model and viewport to perform

actions based on that input.

Page 64: One Line Examination

An MVC application may be a collection of model/view/controller triplets, each

responsible for a different UI element.

Java: Java Platform, Enterprise Edition (Java EE)

Simple Version implementing Java Servlets and JavaServer Pages from Java EE:

Model

The model is a collection of Java classes that form a software application intended

to store, and optionally separate, data. A single front end class that can

communicate with any user interface (for example: a console, a graphical user

interface, or a web application).

View

The view is represented by a JavaServer Page, with data being transported to the

page in the HttpServletRequest or HttpSession.

Controller

The Controller servlet communicates with the front end of the model and loads

the HttpServletRequest or HttpSession with appropriate data, before forwarding

the HttpServletRequest and Response to the JSP using a RequestDispatcher.

The Servlet is a Java class, and it communicates and interacts with the model but does not

need to generate HTML or XHTML output; the JSPs do not have to communicate with

the model because the Servlet provides them with the information—they can concentrate

on creating output.

TOMCAT:

Page 65: One Line Examination

Apache Tomcat (or Jakarta Tomcat or simply Tomcat) is an open source servlet

container developed by the Apache Software Foundation (ASF). Tomcat implements the

Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and

provides a "pure Java" HTTP web server environment for Java code to run.

Tomcat should not be confused with the Apache web server, which is a C implementation

of an HTTP web server; these two web servers are not bundled together. Apache Tomcat

includes tools for configuration and management, but can also be configured by editing

XML configuration files.