overview of the project.docx
TRANSCRIPT
A
PROJECT REPORT On
“ONLINE SKILL TEST”
Submitted in partial fulfillment of the requirements for the award of
BACHELOR OF COMPUTER APPLICATIONSession -2012-2015
SUBMITTED TO: SUBMITTED BY:
Mr. SANJAY KAUSHIK (H.O.D., BCA Deptt)
Kishan Institute of Information, TechnologyMeerut, Uttar Pradesh
(Affiliated to C.C.S. University)
1
SWATI CHAUDHARY - 9756152
SUNITA DEVI - 9756062
TARU GUPTA - 9756064
Mohit Kumar - 9756084
BCA – VI SEM
CERTIFICATE
This is to certify that this project titled “Online Skill Test “Carried out by
“Swati Chaudhary, Sunita Devi, Taru Gupta, Mohit Kumar, Student of
“BCA” Semester VI, Session 2012-2015 Kishan Institute of Information &
Technology, Meerut is hereby accepted and approved after paper evaluation
partial fulfillment of the requirement for the award of the degree of Bachelor Of
Computer Application from CSS University, Meerut
Mr. SANJAY KAUSHIK
H.O.D Dept. of Computer application
Kite Group, Meerut
2
ACKNOWLEDGEMENT
The project a part of the curriculum of BCA program is an assignment in that provided me an
exposure to real life project development in a government environment. I would like to add a few
deepest words from the people who help me in numerous way in completing the project, and
who gave the incessant support right from the scratch of the project
I thank Mr. Rahul Tyagi give me valuable inputs from this project.
I thank my project guide Mr. Sanjay Kaushik for the valuable guidance.
I express my Deepest Gratitude to Mr. Anubhav Arya project Co-Ordinater for His
Constant Encouragement and Support.
I also heartily thank my friends who were of immense support in development of his project. I
thank my batch mates for providing may the more support and wishes.
Last but not the least, I submit my thanks to my family who had provided constant help and
support completing project.
SWATI CHAUDHARY - 9756152
SUNITA DEVI - 9756062
TARU GUPTA - 9756064
Mohit Kumar - 9756084
BCA – VI SEM
3
PREFACE
Generation of high quality skilled manpower in computer software area assumed great
significance in the context of the changed global scenario. Information technology due to
undergoing rapid technological development has been the fastest growing sector of the Indian
industry. Computer has invaded our society and become integral part of our lives. Computer
programming is a demanding skill, much like creative, writing or playing a musical instrument.
The project, “Online Skill Test” presents a contemporary approach to
programming, stressing the importance of clarity, legibility, modularity and efficiency in
program design. The subject matter of this project has been presented in simple language and
lucid style. The use of an interactive programming suited for advanced processing of any
organization and can be better used in a better way in the context of the changed scenario, for our
payroll system in place of the existing one.
4
TABLE OF CONTENTS
Certificate Acknowledgement Preface Overview of the project Objectives of the project Hardware & Software requirements Components of Java SDLC Feasibility Data Designing
DFD
ER-Diagram
Data Base Tables
Table Structure Form Design Coding of the project Testing & Debugging Techniques Scope Conclusion Bibliography
5
Overview of the Project
Created an Online Test application
The online test application enables the end user to take on line test and
displays the test result immediately after the test completes. An end user taking the
test has to answer all test questions with in fixed time limit, failing which the test
stops automatically. An alert window cautions the end user, when the last two
minutes are left for the test to complete. End users willing to out the test in middle
all alerted to attempt all test questions. An end user taking the online test can check
the correct answers for every question after checking the test result. The result
window for the test result displays the total marks obtained, percentage of marks
and the correctness of every question attempts. The online test application uses a
time counter to calculate the time. A timer displays the time elapsed after the start
of the test. The online test application is developed in java language. Questions and
answers for the online test are stored in a separate java file.
In this fast moving world, time has become a priceless commodity. Innovative
software’s that help reduce hassle save time. They are easy to operate and are
driven by technology that find’s instant favor with people.
6
There should be some technology that makes us more reliable, fast and error free
in this fast growing world where time is very precious. So, we should try to make
software tools that provides the users to handle their workings easily.
In this point of view, we have a thought of software ONLINE TEST APPLICATION
that provides the end user more easy, accurate and reliable way through which
they give test organized by various organizations. Here, in this software an end
user can easily give the test on the internet without depending on where they are
located. They can attend the test at anytime, anywhere without reaching at the
location of organization’s test location.
So, obviously this software provides easier, fast and accurate conduction of the test
on the internet and in this modern time internet is very easily available at
anywhere and anytime in this world. And most importantly, it easily avails the end
user to connect to the remote placed organization’s test on the internet.
In this fast moving world The Online Test Application first displays the input
window prompting you to enter your name. The welcome window – welcomes you
to the online java test after you enter your name. The welcome window displays
the general guidelines for taking the Online Test. You start taking the Online Test
by clicking the start button on the welcome window. The Online java test starts by
displaying the test question with their possible answer options. The result window
7
displays the test score after the test completes. The answer window displays the
correct answer option for every test question.
Packages Used in Online Test Application
The Online Test Application uses three different java packages to build the Online
Test Application. We need to include a package in our program to use the classes
that are grouped in the package. The import statement in java includes a package in
the java program. Packages imported in Online Test Application are
Java.awt: provides the classes for creating a graphical user interface (GUI)
in java program. The awt package consists of classes for creating buttons,
labels, check boxes, text boxes, panels and frames.
Classes Used in Online Test Application
The Online Test Application uses a various java classes to build the test
application. The java classes consist of the method and variables used to
implement different functionalities of the applications. Functionalities
implemented by the java classes in the Online Test Applications are storing the test
questions. Preparing the test window layout, calculating test time limit and
displaying test result. Classes used in the Online Test Application are:
Question Series class
8
Online Test class
North window class
South window class
Centerwindow class
ActionHandler class
Timer class
Resultwindow class
ItemHandler class
QuestionSeries Class
The QuestionSeries class consist of stores the question, test answers, test
guidelines, time limits and correct answer choices for the Online Test in different
class variables. The class variables defined in the Question Series class:
Info: Stores the guidelines of the Online Test.
Question: stores the questions of Online Test.
answer: stores the different answer options for every question
of the Online Test.
9
choice: stores the number of correct options for every question
in the Online test.
tally: stores the total number of questions in the Online test.
testtitle: stores the text to be displayed in the title bar of the
Online Test window.
passMark: stores the passing mark for the Online Test.
timeLimit: stores the time limit for the test.
OnlineTest class
Online Test class consists of variables, methods and inner classes to implement
different functionalities of the Online Test Application. The Online Test class
declares inner classes for the designing the user interfaces of the test application,
for handling end user actions, to calculate time, to display test result and to track
end user’s answer choices. An inner class in java has its class definition within an
existing class. Inner classes in the Online Test classes are:
Northwindow class
Southwindow class
10
Centerwindow class
ActionHandler class
Timer class
Resultwindow
ItemHandler class
The Online Test class uses java swing components to design the user interface for
the Online Test Application. Swing component are written in java programming
language and so are truly platform independent. Swing components used in the
Online Test class for designing the user interface are:
JButton: triggers an action in the user interface when passed by the end user.
JTextArea: inputs the text contents in an area in the user interface window.
JCheckBox: selects an option from the user interface window.
JLabel:displays a text string message in the user interface window.
The methods used in the Online Test class are:
OnlineTest():designs the layout of the user interface window of the test
application.
main(): starts the execution of the test application .
11
OnlineTest Constructor
The OnlineT est constructor initializes an end user’s answer choices and adjusts
the screen size of the test application to window size of the end user’s computer. It
adds different panels for creating the user interface window of the test application.
The Online Test constructor uses the Border Layout Manager to design the user
interface window’s Layout.
main() Method
The main() method in Online Test class instantiates Online Test class and sets the
Online test title. The main () method includes the code to close the Online Test
Application when the close button on the title bar the user interface window is
pressed.
.
12
PROJECT OVERVIEW
Created an Online Test application
The online test application enables the end user to take on line test and
displays the test result immediately after the test completes. An end user taking the
test has to answer all test questions with in fixed time limit, failing which the test
stops automatically. An alert window cautions the end user, when the last two
minutes are left for the test to complete. End users willing to out the test in middle
all alerted to attempt all test questions. An end user taking the online test can check
the correct answers for every question after checking the test result. The result
window for the test result displays the total marks obtained, percentage of marks
and the correctness of every question attempts. The online test application uses a
time counter to calculate the time. A timer displays the time elapsed after the start
of the test. The online test application is developed in java language. Questions and
answers for the online test are stored in a separate java file.
The architecture of the application and the different methods used in the
application to perform different functionalities of the online test are described as
following:
13
INPUT WINDOW
WELCOME WINDOW
ONLINE TEST SERIESWINDOW
TIMEOUT WINDOW END OF TEST
CHECK TEST RESULT
CHECK CORRECT ANSWER
CHECK TEST RESULT
QUIT THE TEST
QUIT THE TEST
Architecture of the Online Test Application
The Online Test Application enables the end user to take an online java test. The
end user has to proceed with test step by step to take the Online Test .figure shows
the different steps in the architecture of the Online Test Application.
ARCHITECTURE OF THE ONLINE TEST APPLICATION
14
Bock Diagram
The Online Test Application first displays the input window prompting you to
enter your name. The welcome window – welcomes you to the online java test
after you enter your name. The welcome window displays the general guidelines
for taking the Online Test. You start taking the Online Test by clicking the start
button on the welcome window. The Online java test starts by displaying the test
question with their possible answer options. The result window displays the test
score after the test completes. The answer window displays the correct answer
option for every test question.
Packages Used in Online Test Application
The Online Test Application uses three different java packages to build the Online
Test Application. We need to include a package in our program to use the classes
that are grouped in the package. The import statement in java includes a package in
the java program. Packages imported in Online Test Application are
Java.awt: provides the classes for creating a graphical user interface (GUI)
in java program. The awt package consists of classes for creating buttons,
labels, check boxes, text boxes, panels and frames.
15
Javax.swing: provides classes for swing programming in java.
Javax.swing.event: provides classes for handling swing events.
Classes Used in Online Test Application
The Online Test Application uses a various java classes to build the test
application. The java classes consist of the method and variables used to
implement different functionalities of the applications. Functionalities
implemented by the java classes in the Online Test Applications are storing the test
questions. Preparing the test window layout, calculating test time limit and
displaying test result. Classes used in the Online Test Application are:
QuestionSeries class
OnlineTest class
Northwindow class
Southwindow class
Centerwindow class
ActionHandler class
Timer class
Resultwindow class
16
ItemHandler class
QuestionSeries Class
The QuestionSeries class consist of stores the question, test answers, test
guidelines, time limits and correct answer choices for the Online Test in different
class variables. The class variables defined in the Question Series class:
Info: Stores the guidelines of the Online Test.
Question: stores the questions of Online Test.
answer: stores the different answer options for every question
of the Online Test.
choice: stores the number of correct options for every question
in the Online test.
tally: stores the total number of questions in the Online test.
testtitle: stores the text to be displayed in the title bar of the
Online Test window.
passMark: stores the passing mark for the Online Test.
17
timeLimit: stores the time limit for the test.
18
OnlineTest class
Online Test class consists of variables, methods and inner classes to implement
different functionalities of the Online Test Application. The Online Test class
declares inner classes for the designing the user interface of the test application, for
handling end user actions, to calculate time, to display test result and to track end
user’s answer choices. An inner class in java has its class definition within an
existing class. Inner classes in the Online Test classes are:
Northwindow class
Southwindow class
Centerwindow class
ActionHandler class
Timer class
Resultwindow
ItemHandler class
The Online Test class uses java swing components to design the user interface for
the Online Test Application. Swing component are written in java programming
19
language and so are truly platform independent. Swing components used in the
Online Test class for designing the user interface are:
JButton: triggers an action in the user interface when passed by the end user.
JTextArea: inputs the text contents in an area in the user interface window.
JCheckBox: selects an option from the user interface window.
JLabel:displays a text string message in the user interface window.
The methods used in the Online Test class are:
OnlineTest():designs the layout of the user interface window of the test
application.
main(): starts the execution of the test application .
OnlineTest Constructor
The OnlineT est constructor initializes an end user’s answer choices and adjusts
the screen size of the test application to window size of the end user’s computer. It
adds different panels for creating the user interface window of the test application.
The Online Test constructor uses the Border Layout Manager to design the user
interface window’s Layout.
main() Method
20
The main() method in Online Test class instantiates Online Test class and sets the
Online test title. The main () method includes the
with the online test any further .
mark_ques() method
The mark_ques() method in the ActionHandler class is used after the end user
completes the online test. This method marks the correct answers for every
question with light red color. The mark_ques() method displays messages to
indicate the accuracy of the answers chosen.
calculateResult() method
The calculateResult() method in ActionHandler class calculate the final test score
and instantiates a new JFrame to display the test result.
This method displays messages depending upon the performance of the end user
taking online test.
21
Timer class
The Timer class calculates the time in online test application using threads. The
Timer class extends the thread class and implements runnable interface to use
threads. The timer class calculates time by incrementing the second and minute
variable. The second and minutes variables are incremented after every one
second. The constructor of the timer class starts a thread for calculating time and
the run () method calculates the time.
Timer Constructor
The timer () constructor starts a new thread every time a new online test starts .The
constructor calls the start () method of the thread class to start a new tread.
Run () method
The run () method of the Timer class consists of the code for calculating online test
time. The run () method test checks for the start of the online test with the Boolean
flag start test and then increments the time elapsed after every one second. The run
() method has to sleep () method of the thread class set to one second to increment
the second variable after every one second.
22
Resultwindow class
The Resultwindow class uses a JFrame to display the test result. The result window
displays individual result of every test question. The test score and test percentage
are also displays the result window. The Resultwindow() constructor consists of
the code for the result window of the online test application.
ItemHandler class
The itemHandler class keeps track of the number of the end user provides for each
question in the online test application. A dialog box warns the end user of incorrect
choices. If the end user implements the itemListener interface to override the
itemstatechanged() method of the itemListener interface.
itemStateChanged() method
The itemStateChanged() method of the Item Handler class consists of the code for
the tracking the number of answer options chosen. The itemStateChanged()
method checks the selection of answer buttons in the user interface window of the
online test application window for every test question. A warning message pop ups
requesting the end user to make a correct number of choices. If the number of
answer buttons chosen for a test question is more then correct number.
23
OBJECTIVE
The objective is develop an automated system for the reservation of Online Skill Test which will
keep record of all related details about railway.
The computerized reservation of railway intends to provide better environment for customer. The
package aims to provide faster service and satisfied user as well as management of the railways.
24
Hard Ware & Software
“ONLINE SKILL TEST”
PROJECT DESCRIPTION:
The project of online skill test consist of various online papers like (java,C,C# etc.) . Candidate should login first as a student or (if administrator then) admin. If candidate is a new user then first sign up so that you may become a registered candidate. Admin can create test paper and facilitate to modify an existing test paper. Student can give the exam for a particular subject by selecting particular subject. There is a proper time limit for the paper .After submission of answer result is displayed. Candidate can also check their previous results.
Technical Detail::
Operating System Specification: Windows XP
Language: Java
Front end: HTML
Back end: M/S Access
Editor: Notepad ,NetBeans 5.5
SOFTWARE REQUIREMENT:
TOMCAT 5.0+,
Ms-Access
JDK(1.5,1.6)
NETBEANS 5.5
HARDWARE REQUIREMENT:
PENTIUM
512 MB RAM,
1 GZ HDD ETC.
25
myProgram.java
myProgram.class
Compiler
Interpreter
My Program
00110011
SOFTWARE REQUIREMENTS
JAVA
Java technology is both a programming language and a platform. The Java
programming language is a high level language which is simple, architectural
neutral, object oriented, portable, distributed, high performance, interpreted,
multithreaded, robust, dynamic and secure.
Figure 2: Diagram showing execution of JAVA programs
26
A Java program which is a .java file which is platform independent is
compiled and stored as a .class file and hence can be interpreted at any remote
system also. Thus Java is a platform independent language and hence very
important for internet and other networks. Hence Java is known as “write once, run
anywhere language”.
The Java platform has two components:
The Java virtual machine (JVM)
The Java Application Programming Interface (Java API)
The Java virtual machine is implemented as software or hardware. It
is an abstract computer. Its specification defines certain features every Java virtual
machine must have. However it leaves many choices to the designers of each
implementation. Java virtual machine reads compiled byte codes which are
platform independent.
Its main job is to load class files and execute the byte codes they
contain. JVM also provides definitions for the Instruction set (CPU) and take care
of the register set, stack, and garbage collected heap. In the JVM, the majority of
type checking is done when the code is compiled. Every Sun approved
implementation of the JVM must be able to run any compliant class file.
27
JAVA SWING
Swing is a set of classes that provides more powerful and flexible components than
are possible with the AWT.
In addition to the familiar components, such as buttons, check boxes, and labels,
Swing supplies several exciting additions, including tabbed panes, scroll panes,
trees, and tables. Even familiar components such as buttons have more capabilities
in Swing. For
example, a button may have both an image and a text string associated with it.
Also, the image can be changed as the state of the button changes.
therefore, are Platform-independent. The term lightweight is used to describe such
elements.
28
CONCEPTUAL AND PHYSICAL DESIGN
The purpose of this document is to describe is to the external requirement for
ONLINE TEST APPLICATION. It also describes the interfaces for the requirement
for the system. Scope of the document is used by the developers and will be the
basis for validating the final delivered system. Responsibility of the developer:
1. Developing the system.
2. Testing the system
3. Conducting the user training for using the system.
4. Maintaining the system after installing.
29
PLANNING
ANALYSISOPERATION
TESTING SPECIFICATION
IMPLEMENTAIONN DESIGN
DEVELOPMENT
SYSTEM ANALYSIS
System Analysis is the application of the system approach to the study and solution
of the problems using computer based system. An activity encompasses most of
the tasks collectively called as “Computer System Engineering”.
Analysis is a detailed study of the various operation performed by a system and
their relationship within and outside of the system. This involves gathering
information and using structured tool for analysis such as DFD, decision tree etc.
During analysis data are collected on the available files decision points and
transactions handled by the present system. The fact finding and information
gathering for proposed system is the key part of the system analysis. Information is
gathered from the sources both, internal and external to the organization. The
external sources include vendors, supplier professional journals and other similar
systems. The primary internal sources include the system users, system
documentation, existing programs and reports.
30
FUTURE SCOPE
FUTURE SCOPE OF APPLICATION:
This application can be easily implemented under various situations. We can add new
features as and when we require. Reusability is possible as and when require in this application.
There is flexibility in all the modules.
SOFTWARE SCOPE:
Extensibility: This software is extendable in ways that its original developers may not expect.
The following principles enhances extensibility like hide data structure, avoid traversing multiple
links or methods, avoid case statements on object type and distinguish public and private
operations.
Reusability: Reusability is possible as and when require in this application. We can update it next
version. Reusable software reduces design, coding and testing cost by amortizing effort over
several designs. Reducing the amount of code also simplifies understanding, which increases the
likelihood that the code is correct. We follow up both types of reusability: Sharing of newly
written code within a project and reuse of previously written code on new projects.
Understandability: A method is understandable if someone other than the creator of the method
can understand the code (as well as the creator after a time lapse). We use the method, which
small and coherent helps to accomplish this.
31
Cost-effectiveness: Its cost is under the budget and make within given time period. It is desirable
to aim for a system with a minimum cost subject to the condition that it must satisfy the entire
requirement. Scope of this document is to put down the requirements, clearly identifying the
information needed by the user, the source of the information and outputs expected from the
system.
32
SYSTEM DESIGN
System design refers to the technical specification that will be applied in
implementing the candidate system. This involves input/output, file and processing
design.
System design is a solution, a “how to” approach to the creation of new system.
This important phase consists of the several steps. It provides the understanding
and procedural details necessary for implementing the system recommended in the
feasibility study. Emphasis is on translating the performance requirements into
design specifications.
Design goes through logical and physical stages of development. Logical design
reviews the present physical system; prepares the input and output specification;
makes edits, security and control specifications details the implementation plan and
prepares a logical design walk through. The physical design means out the details
of the physical system, plans the system implementations devises a test and
implementation plan and specifies any new H/W or S/W.
DEVELOPMENT ACTIVITIES
Several development activities are carried out during structured design. They are
database design, implementation planning, system test preparation and system test
specification and user documentation.
33
FEASIBILITY STUDY
A feasibility study is conducted to select the best system that meets performance
requirement. This entails an identification description, an evaluation of candidate
system and the selection of the best system for the job. The system required
performance is defined by a statement of constraints, the identification of specific
system objective and a description of outputs.
Feasibility study is a test of the system proposals according to its work
ability and to meet the user needs and the effective use of resources. It is carried
out to select the best system that meets the performance requirements, which
entails the identification, description and selection of the best system for the job.
The feasibility study is carried out to test if the proposed system is worth being
implemented. Given unlimited resources and infinite time, all the projects are
feasible. Unfortunately, such results and time are not possible in real life situations.
Hence, it becomes both necessary and product to evaluate the feasibility of the
project at the earliest possible time in order to avoid the unnecessary wastage of
time, effort and professional embarrassment over an ill- conceived system.
The key considerations in feasibility study analysis are:
34
Economic Feasibility
Technical Feasibility
Economic Feasibility:
The proposed system is economically feasible because cost involved in
purchasing the hardware and software are within approachable.
35
Components
A strategy for software testing may also be viewed in the context of the spiral. Unit testing
begins at the vortex of the spiral and, concentrates on each unit, component of the software as
implemented in source code. Testing progresses moving outward along the spiral to integration
testing, where the focus is on designed the construction of the software architecture. Taking
another turn outward on spiral, we encounter validation testing, where requirements established
as part of software requirements analysis are validated against the software that has been
constructed. Finally, we arrive at system testing, where the software and other system elements
are tested as a whole. To test computer software, we spiral out along stream lines that broaden
the scope of testing with each turn.
Considering the process from a procedural point of view, testing within the context of software
engineering is actually a series of four steps that are implemented sequentially. The steps are
shown in Figure. Initially, tests focus on each component individually, ensuring that it functions
properly as unit. Hence, the name unit testing. Unit testing makes heavy use of white-box testing
techniques, exercising specific paths in module’s control structure to ensure complete coverage
and maximum error detection.
36
FEASIBILITY STUDY:
Preliminary investigation examines project feasibility; the likelihood the system will be
useful to the organization. The main objective of the feasibility study is to test Technical,
Operational and Economical feasibility for adding new modules and debugging old running
system. All systems are feasible if they are given unlimited resources and infinite time.There are
aspects in the feasibility study portion of the preliminary investigation:
Operational feasibility
Technical feasibility
Economical feasibility
1. OPERATIONAL FEASIBILITY:
The application smart audit does not require additional manual involvement
or labor towards maintenance of the system. Cost for training is minimized due to the user
friendliness of the developed application.
Recurring expenditures on consumables and materials are minimized.
2. TECHNICAL FEASIBILITY:
Keeping in mind the existing system network, s/w
& H/w, already available the audit application generated in java provides an executable file that
requires tomcat that provides compatibility from windows98 without having to load
javasoftware. No additional hardware or software is required which makes smart audit
technically feasible.
3. ECONOMIC FEASIBILITY:
The system is economically feasible keeping in mind:
Lesser investment towards training.
37
One time investment towards development.
Minimizing recurring expenditure towards training, facilities offered and consumables.
The system as a whole is economically feasible over a period of time.
38
DATA FLOW DIAGRAM
Online skill test
User login DFD::>
npass
Admin process DFD::>
ntest
Creation and modification in test DFD::>39
logme Login
admin
home
adminCreation or modification of test
i
Initialinfo form
nquestions
ntest
Admin sign out DFD::>
DFD for student(not admin)::>40
Initialinfo formChanges in test info and test paper
te
adminfinals
adminfinalsSign out
Userlogout
Usertest
Result checking DFD::>
usertest
41
homeGo to test or check
previous result
report
test
reportSee result, move to test or home
home
test
Attemt test and submit answer DFD::>
usertest
42
testAttempt test paper and submit answer
(result)
Table structure
Form Used::>
FORMS REPORTS
1. login 1. Show result
2. admin 2. Show previous result
3. adminfinals 3. Show initial information
4. answer
5. confermation
6. done
7. error
8. home
9. index
10. initialinfo
11. inq
12. report
13. signup
14. student
43
15. test
16.test1
17.userlogout
DATABASES (Data Source Name::mydbs)
1. ntest
2. npass
3. nquestion
4. nuser
5. usertest
DATA BASES::>
npass data base ::>
44
nquestion data base::>
ntest data base::>
45
nuser data base::>
46
usertest data base::>
47
FORM DIAGRAM
SNAPSHOTS
Login form::>
Signup form::>
48
Registration confirmation form::>
49
home form::>
test1 form::>
50
Initialinfo form::>
51
52
test form::>
53
54
answer form::>
55
userlogout form::>
previous report form::>
56
login form::>
admin form::>
57
Initialinformation form::>
Inq form::>
58
59
adminfinals form::>
60
61
CODING
Coding has been designed making use of proper imperatives statements like if.
Then…else…end if case…of end case for. To…end for report… until while. Do…
end while. Coding is the improvement part of the software design because it
actually initiates the working of the software. It should be written in a language
that could be easy to debug whenever error occurs. This create the large quantity of
hard to follow documentation and each stage as designed to meet user requirement
in jsp it is easy to write a code for a particular form.
62
// To creat login page
<html> <head> <script type="text/javascript">function validate_required(field,alerttxt){ with (field) { if (value==null||value=="") { alert(alerttxt);return false; } else { return true; } }}function validate_form(thisform){ with (thisform) { if (validate_required(T1,"Enter user name")==false) {T1.focus();return false;} if (validate_required(T2,"Password")==false) {T2.focus();return false;} }}</script></head><body> <table width="100%" height="100%" ><tr><td width="20%" bgcolor="#800000"></td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr>
<td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td></tr></table>
63
<pre> <img src="image/loin.jpg"></pre><form method="POST" action="validate.lo" name="fr1" onsubmit="return validate_form(this)" >
<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" --> <table border="0" cellpadding="5" cellspacing="10"> <tr><td> User Name:</td> <td> <input type="text" name="T1" size="20"></td></tr>
<tr> <td> Password :</td><td> <input type="password" name="T2" size="20"></td></tr> <tr><td> <input type="submit" value=" OK " name="B1" > </td><td> <input type="reset" value="Reset" name="B2"></td></tr> <tr> <td colspan="2"> <font color="red">
</font> </td> </tr> </table> <div id="here" > </div><pre> If not a user yet then sign up here <a href="sinupform.jsp"><img src="image/signup.jpg"></a></pre>
</form></td><td width="20%" bgcolor="#800000">"</td></tr></table>
</body></html>// To create new user
64
<html>
<head><title>sinup form</title><script type="text/javascript">function validate_required(field,alerttxt){ with (field) { if (value==null||value=="") { alert(alerttxt);return false; } else { return true; } }}
function validate_form(thisform){ with (thisform) { if (validate_required(fname,"Enter first name")==false) {fname.focus();return false;} if (validate_required(lname,"Enter last name")==false) {lname.focus();return false;} if (validate_required(logid,"Enter log in id")==false) {logid.focus();return false;} if (validate_required(p1,"Enter enter the password")==false) {p1.focus();return false;} if (validate_required(p2,"Reenter password")==false) {p2.focus();return false;} if(p1.value!=p2.value) { alert("Password are not same") p1.focus();return false; } var str=logid.value; if(str.indexOf(";")==-1 && str.indexOf("@")==-1 && str.indexOf("~") ==-1 && str.indexOf("`")==-1 && str.indexOf("!")==-1 && str.indexOf("#")==-1 && str.indexOf("$")==-1 && str.indexOf("%")==-1 && str.indexOf("^")==-1 && str.indexOf("&")==-1 && str.indexOf("*")==-1 && str.indexOf("(")==-1 &&
65
str.indexOf(")")==-1 && str.indexOf("-")==-1 && str.indexOf("_")==-1 && str.indexOf("+")==-1 && str.indexOf("=")==-1 && str.indexOf(":")==-1 && str.indexOf("?")==-1 ) { return true; } else { alert("You can use only 0-9, a-z, A-Z and . character in the id") logid.focus();return false; } }}</script> <style type="text/css"> .hot { color: #B11E89 } </style></head>
<body> <table width="100%" height="100%" ><tr>
<td width="20%" bgcolor="#800000"></td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr><td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td></tr></table>
<form method="POST" action="userpro.jsp" name="fr1" onsubmit="return validate_form(this)"><pre>
For sin up you have to fill the following information if you have an account then <a href="logme.login">signin</a>
</pre> <table border="0" cellpadding="10" cellspacing="10" align=""> <tr> <td>First Name</td> <td>
66
<input type="text" name="fname" size="20" > </td> </tr>
<tr> <td>Last Name</td> <td> <input type="text" name="lname" size="20" > </td> </tr> <tr> <td>Choose a Log In ID</td>
<td> <input type="text" name="logid" size="20" > </td> </tr> <tr> <td colspan="2" class="hot"> </td> </tr> <tr>
<td>Choose a Password</td> <td> <input type="password" name="p1" size="20" > </td> </tr> <tr> <td>Re Enter the password</td> <td>
<input type="password" name="p2" size="20" > </td> </tr> <tr> <td><input type="submit" value=" OK " ></td> <td><input type="reset" value="RESET"></td> </tr> </table> </td>
67
</form>
</td><td width="20%" bgcolor="#800000">"</td></tr></table>
</body>
</html><html>
<head></head>
<body> <table width="100%" height="100%" ><tr><td width="20%" bgcolor="#800000"></td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr><td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td>
</tr></table>
<table width="100%"> <tr> <td align="center" width="100%"><font face="Viner Hand ITC" size="5" color="#0000FF"> Congratulation You Have successfully registered </font> </td> </tr> <tr> <td width="150%" align="right">
<a href=userlogout.jsp>sign-out</a> <br> </td> </tr> <tr> <td align="center" width="100%">
68
If you want to go to your account then click go otherwise sign-out </td> </tr>
<tr> <td align="center" width="100%"> <form method="post" action=home.jsp> <input type=submit value=" GO " > </form> </td> </tr> </table></td>
<td width="20%" bgcolor="#800000">"</td></tr></table>
</body>
</html>// To creat home page
l<html>
<head><meta http-equiv="Content-Language" content="en-us"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Welcome to On Line Test</title></head>
<body> <table width="100%" height="100%" ><tr><td width="20%" bgcolor="#800000"></td><td width="60%" bgcolor="#FFFF66" valign="top">
<table height="30px" width="100%"><tr><td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td>
69
</tr></table>
<table ><tr><td align="center" ><font color="#003366" face="Viner Hand ITC" size="6"> Welcome
</font> </td>
<td> saifee
</td>
</tr></table>
<table align="right"><tr><td><a href=userlogout.jsp> sign-out</a>
</td></tr></table>
<p></p><hr><p> </p>
<table cellpadding="5" cellspacing="5"><tr><td><a href=test1.jsp ><img src="image/gtest.jpg"></a></td><td>
<a href=report.jsp><img src="image/cpr.jpg"></a></td>
70
</tr></table></td><td width="20%" bgcolor="#800000">"</td></tr></table>
</body>
</html>// To create test page
<html> <head> </head> <body> <table width="100%" height="100%" ><tr><td width="20%" bgcolor="#800000">
</td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr><td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td></tr></table>
<table ><tr><td align="center" ><font color="#003366" face="Viner Hand ITC" size="6"> Welcome
</font> </td>
<td> saifee
71
</td>
</tr></table>
<table align="right"><tr><td><a href=userlogout.jsp> sign-out</a>
</td></tr></table>
<p></p><hr><p> </p> <table cellpadding="5" cellspacing="5"><tr><td><a href=home.jsp><img src="image/home.jpg"></a></td><td>
<a href=report.jsp><img src="image/cpr.jpg"></a></td>
</tr></table><br>Following is the list of test in which you can appear<br> <table border="0" cellpadding="0" cellspacing="0" > <tr> <th> Test number
</th> <th> Test Title </th> </tr>
72
<tr> <td>1</td> <td>java</td></tr><tr> <td>2</td> <td>c</td></tr><tr> <td>3</td> <td>network</td></tr>
</table> <br><pre> <form method="post" action=testpaperinfo.jsp> Select the test number in which u want to appear <select size="1" name="tn" > <option>1</option><option>2</option><option>3</option>
</select><input type="submit" value=" OK "></form></pre></td><td width="20%" bgcolor="#800000">"</td></tr></table>
</body></html>// to create test paper
<html> <head> <SCRIPT LANGUAGE="JavaScript"> <!--Hide from old browsers /*May be used if credited: http://www.hitmill.com*/ var gizmo; function stopClock() { clearTimeout(gizmo); } function yourClock()
73
{ var h,m,s; if(document.x.h.value=="" && document.x.m.value=="" && document.x.s.value=="") { h=0; m=6; s=0; } else { h=document.x.h.value; m=document.x.m.value; s=document.x.s.value; } var tim = " "; if(s!=0) { s= s-1; } if(s==0) { if(m !=0) { m=m-1; s=59; } } if(m==0) { if(h!=0) { h=h-1; m=59; } } tim += h + ":" + m + ":" + s; document.time.clock.value = tim; gizmo = setTimeout("yourClock()", 1000); if(s==0 && m==0 && h==0) { location.href = "anspro.jsp"; } document.x.h.value=h; document.x.m.value=m; document.x.s.value=s;
74
} Stop hiding --> </SCRIPT>
</head><body onLoad="yourClock()", onUnload="stopClock(); return true"><table width="100%" height="100%" >
<tr><td width="20%" bgcolor="#800000"></td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr><td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td></tr></table>
<table ><tr><td align="center" >
<font color="#003366" face="Viner Hand ITC" size="6"> Welcome </font>
</td> <td> saifee
</td>
</tr></table>
<table align="right"><tr><td><a href=userlogout.jsp> sign-out</a></td></tr></table>
<p></p>
75
<hr><p> </p> <form name="x">
<input type="hidden" name="h"> <input type="hidden" name="m"> <input type="hidden" name="s"> </form><table cellpadding="5" cellspacing="5"><tr></tr></table><table align="right"> <tr> <td>
<form name="time"> Time: <input type="text" name="clock" align="center" size="8"> </form> </td> </tr></table><br>HERE Questions<br><form method="post" action=anspro.jsp> <p>
</p> <table align="center" cellspacing="0" width="60%" cellpadding="0" border="1"> <tr><td colspan="2"><font size="6">Question number:1</font></td> </tr> <tr><td colspan="2"><font size="5"><pre>question1this is question 1buygdbuygdbuydbniubuidb ugubdk
</pre></font></td></tr> <tr><td width="5%"><input type=radio value="1" name=1></td><td width="95%"><pre>ans11hellow i m here
76
njddjhj </pre> </td></tr> <tr><td width="5%"><input type=radio value="2" name=1></td><td width="95%"><pre>ans12 </pre> </td></tr>
<tr><td width="5%"><input type=radio value="3" name=1></td><td width="95%"><pre>ans13 </pre> </td></tr> <tr><td width="5%"><input type=radio value="4" name=1></td><td width="95%"><pre>ans14 </pre> </td></tr> <tr><td></td></tr> </table> <p> </p> <table align="center" cellspacing="0" width="60%" cellpadding="0" border="1">
<tr><td colspan="2"><font size="6">Question number:2</font></td> </tr> <tr><td colspan="2"><font size="5"><pre>question2 </pre></font></td></tr> <tr><td width="5%"><input type=radio value="1" name=2></td><td width="95%"><pre>ans21 </pre> </td></tr> <tr><td width="5%"><input type=radio value="2" name=2></td><td width="95%"><pre>ans22yusdaiyfei9feig </pre> </td></tr> <tr><td width="5%"><input type=radio value="3" name=2></td><td width="95%"><pre>ans23 </pre> </td></tr>
<tr><td width="5%"><input type=radio value="4" name=2></td><td width="95%"><pre>ans24 </pre> </td></tr> <tr><td></td></tr> </table> <p> </p> <table align="center" cellspacing="0" width="60%" cellpadding="0" border="1"> <tr><td colspan="2"><font size="6">Question number:3</font></td> </tr>
<tr><td colspan="2"><font size="5"><pre>question3 </pre></font></td></tr> <tr><td width="5%"><input type=radio value="1" name=3></td><td width="95%"><pre>ans31 </pre> </td></tr> <tr><td width="5%"><input type=radio value="2" name=3></td><td width="95%"><pre>ans32 </pre> </td></tr>
77
<tr><td width="5%"><input type=radio value="3" name=3></td><td width="95%"><pre>ans33 </pre> </td></tr> <tr><td width="5%"><input type=radio value="4" name=3></td><td width="95%"><pre>ans34fqwehifsabusabug
</pre> </td></tr>
<tr><td></td></tr> </table> <p> </p> <table align="center" cellspacing="0" width="60%" cellpadding="0" border="1"> <tr><td colspan="2"><font size="6">Question number:4</font></td> </tr> <tr><td colspan="2"><font size="5"><pre>question4 </pre></font></td></tr> <tr><td width="5%"><input type=radio value="1" name=4></td><td width="95%"><pre>ans41 </pre> </td></tr>
<tr><td width="5%"><input type=radio value="2" name=4></td><td width="95%"><pre>ans42 </pre> </td></tr> <tr><td width="5%"><input type=radio value="3" name=4></td><td width="95%"><pre>ans43 </pre> </td></tr> <tr><td width="5%"><input type=radio value="4" name=4></td><td width="95%"><pre>ans44 </pre> </td></tr> <tr><td></td></tr> </table> <p>
</p> <table align="center" cellspacing="0" width="60%" cellpadding="0" border="1"> <tr><td colspan="2"><font size="6">Question number:5</font></td> </tr> <tr><td colspan="2"><font size="5"><pre>questin5 </pre></font></td></tr> <tr><td width="5%"><input type=radio value="1" name=5></td><td width="95%"><pre>ans51 </pre> </td></tr> <tr><td width="5%"><input type=radio value="2" name=5></td><td width="95%"><pre>ans52 </pre> </td></tr>
<tr><td width="5%"><input type=radio value="3" name=5></td><td width="95%"><pre>ans53 </pre> </td></tr> <tr><td width="5%"><input type=radio value="4" name=5></td><td width="95%"><pre>ans54 </pre> </td></tr>
78
<tr><td></td></tr> </table> <table width="100%"> <tr><td align="center"><input type="submit" value="submit the answers"></td></tr></table></form>
</td><td width="20%" bgcolor="#800000">"</td></tr></table>
</body></html>// To create admin page
<html> <head> <link href="nagendra.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body bgcolor="#FFDFF8"> <table width="100%" height="100%" >
<tr><td width="20%" bgcolor="#800000"></td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr><td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td></tr></table>
<table ><tr><td align="center" >
79
<font color="#003366" face="Viner Hand ITC" size="6"> Welcome </font>
</td> <td> admin
</td>
</tr></table>
<table align="right"><tr><td><a href=userlogout.jsp> sign-out</a></td></tr></table>
<p></p><hr><p> </p>
<pre><u><font size="4">Online test</font></u>
Do you want to create newif yes then check new test.Otherwise select the test number that you want to modify
</pre><form method="POST" action=admin2.jsp >
<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<pre> test no: <select size="1" name="D1">
<option>1</option>
<option>2</option><option>3</option><option>4</option><option>5</option>
80
</select>
<input type="checkbox" name="C1" value="ON">new test
<input type="submit" value=" ok "></pre>
</form>
<pre>
</pre></td><td width="20%" bgcolor="#800000">"</td></tr></table>
</body>
</html>// information of test paper
<html> <head> <link href="nagendra.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body bgcolor="#FFDFF8"> <table width="100%" height="100%" >
<tr><td width="20%" bgcolor="#800000"></td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr><td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td></tr></table>
81
<table ><tr><td align="center" >
<font color="#003366" face="Viner Hand ITC" size="6"> Welcome </font>
</td> <td> admin
</td>
<a href=userlogout.jsp> sign-out</a>
</td></tr></table>
<p></p><hr><p> </p> <table cellpadding="5" cellspacing="5"> <tr> <td bgcolor="#FFFF00"><a href="test1.jsp"><img src="image/home.jpg"></a>
</td><td bgcolor="#FFFF00"><a href="report.jsp"><img src="image/cpr.jpg"></a></td>
</tr> </table> <br> <table ><tr><th><font color="blue" size="5">HERE IS THE RESULT OF THIS PAPER</font></th></tr> <tr><td><pre>Total Question were 5 </pre></td></tr>
<tr><td><pre>You have attempted 5 </pre></td></tr> <tr><td><pre>Your Total Right answer 0</pre></td></tr> <tr><td><pre>You got -25% marks in this test</pre></td></tr>
82
</table> <p> </p> <font size="4" color="green">
Status: </font> FAIL <table align="center"> <tr> <td> <a href=test1.jsp>Click here For Other test paper </td> </tr> </table>
</td><td width="20%" bgcolor="#800000">"</td></tr></table>
</body> </html>
<html> <head> </head> <body> <table width="100%" height="100%" ><tr><td width="20%" bgcolor="#800000">
</td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr>
83
<td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td></tr></table>
<table ><tr><td align="center" ><font color="#003366" face="Viner Hand ITC" size="6"> Welcome
</font> </td>
<td> saifee
</td>
</tr></table>
<table align="right"><tr><td><a href=userlogout.jsp> sign-out</a>
</td></tr></table>
<p></p><hr><p> </p> <table cellpadding="5" cellspacing="5"><tr><td bgcolor="#FFFF00"><a href=home.jsp><img src="image/home.jpg"></a></td><td bgcolor="#FFFF00">
<a href=test1.jsp><img src="image/gtest.jpg"></a></td>
84
</tr></table> <table width="60%" align="center"> <tr> <td width="20%"> Date: </td> <td width="80%">
Thu May 05 12:35:39 IST 2011 </td> </tr> <tr> <td width="20%"> Test Number: </td> <td width="80%"> 1 </td>
</tr> <tr> <td width="20%"> Status: </td> <td width="80%"> FAIL </td> </tr> <tr>
<td width="20%"> Percentage </td> <td width="80%"> 0 </td> </tr> </table> <br> <br>
<table width="60%" align="center"> <tr>
85
<td width="20%"> Date: </td> <td width="80%"> Thu May 05 14:30:12 IST 2011 </td> </tr> <tr>
<td width="20%"> Test Number: </td> <td width="80%"> 1 </td> </tr> <tr> <td width="20%"> Status: </td>
<td width="80%"> FAIL </td> </tr> <tr> <td width="20%"> Percentage </td> <td width="80%"> -25 </td>
</tr> </table> <br> <br> </td><td width="20%" bgcolor="#800000">"</td></tr></table>
86
</body></html>// for admin
<html> <head> <link href="nagendra.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body bgcolor="#FFDFF8"> <table width="100%" height="100%" >
<tr><td width="20%" bgcolor="#800000"></td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr><td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td></tr></table>
<table ><tr><td align="center" >
<font color="#003366" face="Viner Hand ITC" size="6"> Welcome </font>
</td> <td> admin
</td>
</tr></table>
<table align="right"><tr><td><a href=userlogout.jsp> sign-out</a>
87
</td></tr></table>
<p></p><hr><p> </p>
<pre><u><font size="4">Online test</font></u>
Do you want to create newif yes then check new test.Otherwise select the test number that you want to modify
</pre><form method="POST" action=admin2.jsp >
<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<pre> test no: <select size="1" name="D1">
<option>1</option>
<option>2</option><option>3</option><option>4</option><option>5</option>
</select>
<input type="checkbox" name="C1" value="ON">new test
<input type="submit" value=" ok "></pre>
</form>
<pre>
</pre></td><td width="20%" bgcolor="#800000">"</td>
88
</tr></table>
</body>
</html><html> <head> <script type="text/javascript">function validate_required(field,alerttxt){ with (field) { if (value==null||value=="") { alert(alerttxt);return false; } else { return true; } }}function validate_form(thisform){ with (thisform) { if (validate_required(tn,"Enter Test Number")==false) {tn.focus();return false;} if (validate_required(tt,"Enter Test Title")==false) {tt.focus();return false;} if (validate_required(tq,"Enter Total Number of Question")==false) {tq.focus();return false;} if (validate_required(pm,"Enter Passing Marks")==false) {pm.focus();return false;} if (validate_required(time,"Enter Time for test")==false) {time.focus();return false;} if(isNaN(tq.value)==true) {tq.focus();alert("enter valid value");return false;} if(isNaN(time.value)==true) {time.focus();alert("enter valid value");return false;} if(isNaN(pm.value)==true) {pm.focus();alert("enter valid value");return false;} }}
89
</script></head><body> <table width="100%" height="100%" ><tr><td width="20%" bgcolor="#800000"></td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr><td height="100%">
<img src="image/l.jpg" align="middle" width="826" height="87"></td></tr></table>
<table ><tr><td align="center" ><font color="#003366" face="Viner Hand ITC" size="6"> Welcome
</font> </td>
<td>
admin
</td>
</tr></table>
<table align="right"><tr><td><a href=userlogout.jsp> sign-out</a></td>
</tr></table>
<p></p><hr><p>
90
</p> <form method="POST" name="fr1" onsubmit="return validate_form(this)" action=question.jsp><pre> <table> <tr> <td width="100%" align="center">
<i><font size="5" face="Eras Bold ITC" color="#008000"> HERE IS THE INFORMATION RELATED WITH THE TEST</font></i> </td> </tr> </table>
</pre><div style="position: absolute; width: 183px; height: 198px; z-index: 1; left: 119px; top: 90px" id="layer1" > </div> <table align="center" width="60%"><tr> <td> Test Number </td><td > <input type="text" name="tn" size="4" value=6 readonly></td></tr>
<tr> <td> Test Title </td><td> <input type="text" name="tt" size="30" tabindex="1" value=></td></tr><tr> <td> Total Question </td><td> <input type="text" name="tq" size="4" tabindex="2" value=><font color="red"> One Question will be of 4 marks </font></td></tr><tr> <td> Passing Marks </td><td> <input type="text" name="pm" size="4" tabindex="3" value=> </td></tr>
<tr> <td> Time </td><td> <input type="text" name="time" size="4" tabindex="4" value=>min</td></tr><tr> <td>Negative Marking </td><td> <select name="tm"><option>no</option><option>yes</option></select><font color="red">The negative marking will be 4/1</font></td></tr>
<tr> <td> <input type="submit" value=" Ok " tabindex="6"> </td><td> <input type="reset" value="Reset" tabindex="7"> </td></tr></table>
</form></td><td width="20%" bgcolor="#800000">"</td></tr></table>
91
</body></html>
<html> <head> <script type="text/javascript">function validate_required(field,alerttxt){ with (field) { if (value==null||value=="") { alert(alerttxt);return false; } else { return true; } }}function validate_form(thisform){ with (thisform) { if (validate_required(q,"Enter Question")==false) {q.focus();return false;} if (validate_required(ans1,"Enter Answer")==false) {ans1.focus();return false;} if (validate_required(ans2,"Enter Answer")==false) {ans2.focus();return false;} if (validate_required(ans3,"Enter Answer")==false) {ans3.focus();return false;} if (validate_required(ans4,"Enter Answer")==false) {ans4.focus();return false;} if (validate_required(ra,"Enter Right Ans")==false) {ra.focus();return false;} if(ra.value != 4 && ra.value!=1 && ra.value!=2 && ra.value!=3) { alert("Enter Right Answer from 1 to 4"); return false; } }}</script></head> <body bgcolor="#FFDFF8"> <table width="100%" height="100%" >
92
<tr><td width="20%" bgcolor="#800000">
</td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr><td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td></tr></table>
<table ><tr><td align="center" ><font color="#003366" face="Viner Hand ITC" size="6"> Welcome
</font> </td>
<td> admin
</td>
</tr></table>
<table align="right"><tr><td><a href=userlogout.jsp> sign-out</a>
</td></tr></table>
<p></p><hr><p> </p> <form method="POST" name="fr1" onsubmit="return validate_form(this)" action=store.jsp >
93
<table border="0" cellpadding="1" cellspacing="1" align="center" width="50%"> <th colspan="2"><h2>Welcome to test no 2</h2></th> <tr>
<td colspan="2" > Question Number: 1 </td> </tr> <tr> <td> Question : </td> <td> <textarea rows="2" name="q" cols="30" tabindex="1" >When the c was doveloped?</textarea>
</td> </tr> <tr> <td> Ans1 : </td> <td> <textarea rows="2" name="ans1" cols="20" tabindex="2">1982</textarea> </td>
</tr> <tr> <td> Ans2 : </td> <td> <textarea rows="2" name="ans2" cols="20" tabindex="3">1981</textarea> </td> </tr>
<tr> <td> Ans3 : </td> <td>
94
<textarea rows="2" name="ans3" cols="20" tabindex="4">1971</textarea> </td> </tr> <tr>
<td> Ans4 : </td> <td> <textarea rows="2" name="ans4" cols="20" tabindex="5">1972</textarea> </td> </tr> <tr> <td>
Right Answer : </td> <td> <input type="text" name="ra" size="20" tabindex="6" value=4> <font color="red">ONLY ENTER 1,2,3 or 4</font> </td> </tr> <tr> <td>
<input type="submit" value="Submit" name="B1" tabindex="7"> </td> <td> <input type="reset" value="Reset" name="B2" tabindex="8"> </td> </tr> </table> </form> </td>
95
<td width="20%" bgcolor="#800000">"</td></tr></table>
</body></html>
<html> <head> <script type="text/javascript">function validate_required(field,alerttxt){ with (field) { if (value==null||value=="") { alert(alerttxt);return false; } else { return true; } }}function validate_form(thisform){ with (thisform) { if (validate_required(q,"Enter Question")==false) {q.focus();return false;} if (validate_required(ans1,"Enter Answer")==false) {ans1.focus();return false;} if (validate_required(ans2,"Enter Answer")==false) {ans2.focus();return false;} if (validate_required(ans3,"Enter Answer")==false) {ans3.focus();return false;} if (validate_required(ans4,"Enter Answer")==false) {ans4.focus();return false;} if (validate_required(ra,"Enter Right Ans")==false)
96
{ra.focus();return false;} if(ra.value != 4 && ra.value!=1 && ra.value!=2 && ra.value!=3) { alert("Enter Right Answer from 1 to 4"); return false; } }}</script></head> <body bgcolor="#FFDFF8"> <table width="100%" height="100%" ><tr><td width="20%" bgcolor="#800000">
</td><td width="60%" bgcolor="#FFFF66" valign="top"><table height="30px" width="100%"><tr><td height="100%"><img src="image/l.jpg" align="middle" width="826" height="87"></td></tr></table>
<table ><tr><td align="center" ><font color="#003366" face="Viner Hand ITC" size="6"> Welcome
</font> </td>
<td> admin
</td>
</tr></table>
<table align="right"><tr><td><a href=userlogout.jsp> sign-out</a>
</td></tr></table>
97
<p></p><hr><p> </p> <form method="POST" name="fr1" onsubmit="return validate_form(this)" action=store.jsp > <table border="0" cellpadding="1" cellspacing="1" align="center" width="50%"> <th colspan="2"><h2>Welcome to test no 2</h2></th> <tr>
<td colspan="2" > Question Number: 3 </td> </tr> <tr> <td> Question : </td> <td> <textarea rows="2" name="q" cols="30" tabindex="1" >what will be the out ofthe following program#define max 10void main(){ int x=max++; printf("%d",x);}</textarea>
</td> </tr> <tr> <td> Ans1 : </td> <td> <textarea rows="2" name="ans1" cols="20" tabindex="2">10</textarea> </td>
</tr>
98
<tr> <td> Ans2 : </td> <td> <textarea rows="2" name="ans2" cols="20" tabindex="3">11</textarea> </td> </tr>
99
Conclusion::>
From a proper analysis of positive points and constraints on the component, it can
be safely concluded that the product is a highly efficient GUI based component.
This application is working properly and meeting to all user requirements. This
component can be easily plugged in many other systems.
100
Bibliography
Books:
1:Head First servlets and jsp
The Complete Reference Java(McGrawhill; HerbertSchildth- reprint 2008)
3: java BlackBook
4: HTML (Black book)
Web Sites:
www.apache.orgwww.wikipedia.com
www.mysql.com
101