Top Banner
CONTENTS 1. ORGANIZAION PROFILE 2. INTRODUCTION 2.1 FEASIBILITY STUDY 3. SYSTEM ANALYSIS 3.1 EXISTING SYSTEM 3.2 PROBLEM STATEMENT 3.3 PROPOSED SYSTEM 4. HARDWARE/SOFTWARE 5. INTRODUCTION TO SOFTWARE 6. INTRODUCTION TO SQL SERVER 7. SYSTEM DESIGN 7.1 DATA FLOW ANALYSIS 8. DATA FLOW DIAGRAMS 9. DATABASE TABLES 10. E-R DIAGRAM 11. UML DIAGRAMS 12. SYSTEM IMPLEMENTATION 13. TESTING 14. SCREENS 15. CONCLUSION 16. BIBLIOGRAPHY
123

Online Exam Documentation

Mar 12, 2015

Download

Documents

sony123abc
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Online Exam Documentation

CONTENTS

1. ORGANIZAION PROFILE

2. INTRODUCTION

2.1 FEASIBILITY STUDY

3. SYSTEM ANALYSIS

3.1 EXISTING SYSTEM

3.2 PROBLEM STATEMENT

3.3 PROPOSED SYSTEM

4. HARDWARE/SOFTWARE

5. INTRODUCTION TO SOFTWARE

6. INTRODUCTION TO SQL SERVER

7. SYSTEM DESIGN

7.1 DATA FLOW ANALYSIS

8. DATA FLOW DIAGRAMS

9. DATABASE TABLES

10. E-R DIAGRAM

11. UML DIAGRAMS

12. SYSTEM IMPLEMENTATION

13. TESTING

14. SCREENS

15. CONCLUSION

16. BIBLIOGRAPHY

Page 2: Online Exam Documentation

INTRODUCTION

2

Page 3: Online Exam Documentation

Introduction

Internet is the means for people to communicate, fulfil their needs and exchanging ideas. Applications on Internet is playing very vital role now a days. Internet made this world into a global ville. Now a days Internet is means to full-fill your desire at mouse click and roam around the world sitting in front of your computer.

This Website gives information about the Libraaa Computer Education, which provides certificate courses in computers. It has branches all over the city.

The main screen appears which consist information about how to follow through the application. Once the client selects his option from the homepage, he will be forwarded into the details. If the user wants to know about the history of institution he can click on ABOUT-US and the details of the courses available in this institution can click on COURSE DETAILS. If the user is the new person he can register his User-id by using student registration form. If the student already registered can write the examination. Information regarding the details of the student will be displayed in the browser and a client can fulfil the details and can register in the institute that the management will keep in touch with him. Details of the course will be displayed from the course information module.

FEASIBILITY STUDY

The following feasibility’s under are considered for the project in order to ensure that project is viable and does not have any major obstructions.

ECONOMICAL FEASIBIITY TECHNICAL FEASIBILITY BEHAVIOURAL FEASIBILITY

ECONOMICAL FEASIBILITY:

For the development of candidate system that we have to spend the computer resources like required software and hardware that supports the application in an effective and efficient manner, and money that to be paid for the developers. But by comparing the cost spent with the future benefits, the amount, which is spent, is negligible. Because once if we developed software for the automation then it can be used for several years until, they want certain amendments, which can be done with small modifications.

Hence, our candidate system is economically feasible.

3

Page 4: Online Exam Documentation

TECHNICAL FEASIBILITY:

TECHNICAL FEASIBILITY centers on existing computer system. Financial considerations to accommodate technical enhancement is very less when compared to future benefits. To develop the present candidate system needs little technical enhancement.

Hence, our candidate system is technically feasible.

BEHAVIOURAL FEASIBILITY:

Hence the people are inherently resistant to change their daily activities. Our candidate system is developed in such a way that it is user friendly, easy to learn, how to work with the system and also not much resistant to the package from the end users also.

Candidate system is behaviourally feasible.

4

Page 5: Online Exam Documentation

SYSTEM ANALYSIS

5

Page 6: Online Exam Documentation

EXISTING SYSTEM

Institute offers various courses related to Information Technology and hardware. Students can join any course. All are certificate courses. Institute issues certificate to the student after completing the exams.

Certificate issued by the institute is valid which will help the student in future.

In the present system the student has to come institute and write the exam on the subject he wants. Certificates are issued in hand to the students.

Each test includes ten multiple-choice questions. Each question carries one mark.

To qualify the test student should obtain at least 60% of marks.

Every thing is being done manually in the current system. A few of the components are being processed automatically using computers.

Taking the test:A few numbers of students only can take the test on certain date and at certain time. They should write the test manually.

Examination pattern:All the students write the same questions. Each question has four choices and each question carries equal marks.

Paper evaluation and Result declaration:Evaluation is being done manually. Results will not be declared on the day of the test.

Issue of certificate: Certificates are issued by hand to the students. Certificate will be issued to the student only after completing all the required exams.

PROBLEM STATEMENT

In the present system the institute used to follow the traditional way of conducting Examination, which has been a problem for the management to take all the burdens. It wants to upgrade the mode of exam conducting.

Presently everything is done manually, which needs more man power.

It is very hard to conduct the Examinations manually. Fever number of students can take the exam on certain date and at a time. Discipline should be maintained while conducting the exams.

Evaluation of the student should be done manually. Questions for students should also differ among them. It has been a big problem for the management to handle the above-mentioned issues manually.

6

Page 7: Online Exam Documentation

PROPOSED SYSTEM

This project is a web-based application. It is specially developed to make it available globally on the Internet.

As Computer is the machine that does the work of nearly 20 persons in fraction of seconds, the proposed system is supposed to develop using computers.

The proposed system was to maintain the database that register for exams and providing facility for Frequently Asked Questions (FAQs). Evaluating the student who gave exam. The modules of the project are:Student Registration:The on-line registration of the student who wants to join the institute should be joined. Filling up applications should be made on-line. The information regarding the student will be stored in the database. This information will be used for the further processing. Then student can attend exams on-line on the subject of his interest.Student On-line Exams:The institute should conduct exams to evaluate the student. Marks evaluation should be done. The marks regarding the student and the subject he has undergone should be updated in the database at the server of the head office. The questions for one client should not repeat the order for other client.Student information:This module should present the information regarding the student and the exam he attempted. As the organization has so many branches, it requires the information of the student. Facility for on-line evaluation of the student is provided.FAQ (Frequently Asked Questions):The organization conducts exams for the students monthly. The student wants to know the details of the questions asked in the exams. Provision should be given to the student to see the questions that were asked in the exams. Frequent updating of the questions in the database should be provided. The questions will be stored in the database of the server and should be available for the student to view the questions. Provision should be given to give the answers for the questions of the clients in the related subjects the student wants to join. This should also provide the facility of giving information of the frequently asked questions in any software and should be updated frequently.

7

Page 8: Online Exam Documentation

HARDWARE/SOFTWARE

8

Page 9: Online Exam Documentation

HARDWARE/SOFTWARE SPECIFICATION

This project is web-based application. When we talk about hardware and software, we have to mention requirements on both the client and the server part.

Jdk1.2, Java Web Server, running on any platform with Odbc Drivers installed.

Jdbc Drivers installed.

Efficient enough to deal with multiple threads of processing.

Internet connection with 33.6 Kbps Modem.

Functional Java enabled Browser.

Pentium-II 350 MHz, 6.4 Gb Hdd, 12Mb RAM (Server)

Any PC with windows compatibility, 16Mb RAM (Client)

Front-end:JAVA is chosen as the front-end to develop our application. It is easy and efficient to create web-based applications using Java and its portability advantage makes it an ideal choice for the application.

Back-end:SQL Server is chosen as the back-end database due to its robustness, scalability and reliability.

Upon consideration of user requirements, hardware independence and easier web enabling of software the choice falls on Java.Java is the new paradigm for writing computer dependent software systems. That is the investments mode in the software systems would not be wasted as needs grow and the same software can. Work on any kind of computer hardware in future.

Remote accessibility is achieved by employing a custom built Java Server software in the system.The software can with minor modifications work straight away in an Internet kind of environment also.

9

Page 10: Online Exam Documentation

INTRODUCTION TO SOFTWARE

10

Page 11: Online Exam Documentation

JAVA

Different projects can be run on different platforms like Visual Basic, Delphi, C++, Developer 2000,etc., But Java provides some additional features, which are as follows

The Creation of JAVA:Java was conceived by James Gosling, Patrick Noughton, Chris Wrath, Ed Frank and Sheridan at Sun Micro systems, Inc in 1991, it took 18 months to develop the first working version. This language was initially called “Oak but renamed JAVA” in 1995. After the initial implementation of Oak in the fall of 1992 Java was announced as a programming language.

In the spring of 1995, many more people contributed to the design and the evolution of the language. Bill joy Aurthur Van Haff, Jonathan Payne, Frank Vellin, and Lindhlon were key contributes to the maturing of original prototype.

The original impetus for java was not Internet; the primary motivation was the need for a platform independent language that could be used create software that could be embedded in various consumer electronics devices such as micra wave ovens and remote controls. Mean while, in 1993 the development of Browser called MOSAIC led to the widespread use of WWW (World Wide Web). It is realized by chance that Java was well suited for the web because it was secure and most importantly architectural neutral. In the sept’94 a browser called Hot java was developed later original compiler in C was replaced by Java on May’23rd 1995 Java was formally released .The Java Developed Kit (JDK 2.0) was released on January 23rd 1996.Java is freely distributed on the internet.

Java Overview:TO be object oriented, java is loosely based on c++ syntax, but however differ from C++ in many ways. The structure of Java compiler into “Byte Code” compiles java programs, which are secure and portable .The key that allows Java to solve both the security and the portability problems is that the output of a java compiler is not executable code, it is Byte code. Byte code is the set of instructions to be executed by the Java Run Time systems, which is called the Java Virtual Machine (JVM). The JVM is an interpreter for Byte Code. Translating java program into Byte code helps makes it much easier to run a program in a wide variety of environments. The reason is only JVM needs to be implemented for each platform.

When a program is interpreted, it generally runs substantially slower that it would run if compiled to executable code. The use of Byte code enables the Run time system to execute programs much faster than you might expect. The JIT compile is part of JVM it compiles Byte code into executable code in real time on a piece-by-piece, demand basis. It is important to understand that it is not possible to compile an entire java program into executable code all at once, because Java platforms various runtime checks that can be done only at run time.

SIGNIFICANCE OF JAVA TO INTERNET:Java has performed effect on Internet. The reason is java expands the universe of objects that can move about freely in cyber space. In a network two very broad

11

Page 12: Online Exam Documentation

categories of objects are transmitted between server5 and personal computers. They are passive information and dynamic active Programs.

SECURITY:Java provides a feature called a firewall, which acts like an interface between the network application and your computer. Java achieves this protection by confining a java program into java execution environment and not allowing it to access other parts of the computer.

BYTE CODE:The output of a java compiler is not executable code rather it is byte code, which is highly optimised set of instruction designed to be executed by java runtime system that is called Java Virtual Machine. JVM is an interpreter for byte code translating a java program into byte code makes it much easier to run program in a wide variety of environments.

OBJECT ORIENTED:Java manages to strike a balance between the pursuits “EVERYTHING IS AN OBJECT” paradigm. The object model in java is simple and easy to extend, while simple types such as integers are kept as high performance on objects.

ROBUST:The ability to create robust programs was given higher priority in design of java to gain reliability. Java restricts u in key areas to force u to find your mistakes early in program developments. As java is strictly typed language it checks your code at compile time. However it also checks your code at runtime. Infact very hard to reproduce runtime situations are simply impossible to create in java.

MULTITHREADED:Java was designed to meet the real world requirements of creating interactive network programs. To accomplish this java supports multithreaded programs, which allow u to write programs that do many things at once. The java runtime comes with an elegant, yet sophisticated solution for multipurpose synchronization. ARCHITECTURE NEUTRAL:The java designer made several hard decisions in the java language and runtime in an attempt to alter the situation like there is no guarantee that if u write a program today it will run tomorrow even on the same machine the goal was “WRITE ONCE: RUN ANY WHERE, ANY TIME FOR EVER”. TO AGREAT EXTEND, THIS GOAL WAS ACCOMPLISHED.

DISTRIBUTED:Java was designed for distributed environment of the Internet because it handles the TCP/IP protocols. The original version of java included features for IntraAddress Space Messaging. This allowed objects onto remote method invocation bringing an up-parallel level of abstraction of client of C/s programming

12

Page 13: Online Exam Documentation

DYNAMIC:Java programs carry with them substantial amount of runtime type information that is used to verify and resolve access to objects at runtime. This makes it possible to dynamically link code in a safe and expedient manner.

HTML

HTML (Hypertext Mark up Language) is a mark up language that consists of tags embedded in the text of the document. The browser reading the document interprets these marks up tags to help format the document for subsequent display to a reader. The browser thus displays the document with regard to feature that the viewer selects either explicitly or implicitly.

Factors affecting the layout and representation include:

The mark up tags used.

The physical page width.

The fonts used to display the text.

The color depth of the display.

The browser ignores extra spaces and new lines between words and mark tags when reading the document.

The mark up language is made up of many tags such as: HTML tags: The top most container of a HTML document is the <HTML>…</HTML>tag.

HEAD tag: The <HEAD>…</HEAD>tag contains elements that provide information to users and search engines as well as containing other data that is not considered to be document content.

BODY tag: The <BODY>…</BODY>tag contains the content of document.

Attributes: Background=”URL” location of a background color.

Text=”color” sets the document text color.

Link=”color” sets the link color.

Vlink=”color” sets the visited link color.

Alink=”color” sets the active link color.

13

Page 14: Online Exam Documentation

Form tag: The <FORM>…..</FORM>tag creates a form that holds controls for user input.

Attributes:

Type: “text/password/submit/reset/button”

Name: “data” assigns a control name.

Value: “data” sets the initial value of the control.

Size: “data” sets the initial size of the control.

JAVA SCRIPT

Java script is Net scapes cross-platform, object-based scripting language for client and server applications. There are two types of Java script.

Navigator Java Script, also called client-side JavaScript. Livelier JavaScript also called server-side JavaScript.

Netscape Navigator 2.0(and later versions) can interpret JavaScript statements embedded in an HTML page. When Navigator requests such a page, the server sends the full content of the document, including HTML and JavaScript statements, over the network to the client. The Navigator then displays the HTML and executes the JavaScript, producing the results that the user sees.

Client-side JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, from inputs, and page navigation. For example, you can write a JavaScript function to verify that users enter valid information into a form requesting a telephone number or zipcode. Without any network transmission, the HTML page with embedded JavaScript can check the entered data and alert the user with a dialog box if the input is valid.

SERVLETS

Servlets provide a Java TM-based solution to address the problems currently associated with doing Server-side Programming, including inextensible scripting solutions, platform-specific APIs and incomplete interfaces. Servlets are objects that conform to a specific interface that can be plugged into a Java-based server. Servlets are to the server-side what applets are to the client-side, object byte codes that can be dynamically loaded off the net. They differ from applets in that they are faceless objects (without graphics or GUI components). They serve as

14

Page 15: Online Exam Documentation

platform independent, dynamically loaded, pluggable helper bytecode objects on the server side that can be used to dynamically extend server-side functionality.

Advantages Of Servlets:

They are faster and cleaner than CGI scripts. They use standard API (the servlet API). They provide all the advantages of Java (run on to variety of servers without

needing to be rewritten)

The Attractiveness Of Servlets:

There are many features of Servlets that make them easy and attractive to use Servlets are:

Easily configured using the GUI-based Administrative Tool. Loaded and invoked from a local disk or remotely across the network. Linked together, or chained, so that one Servlet can call another Servlet or

several servlets in sequence. Secure-even when downloading across the network, the Servlet security model

and Servlet protects your system from unfriendly behaviour.

Advantages of the Servlet API:

One great advantages of the Servlet API is protocol independence. It assumes nothing about:

The protocol being used to transmit on the net.

How it is loaded.

The server environment it will be running in.

It’s extensible-you can inherit all your functionality from the base classes made available to you.

It’s simple, small and easy to use.

The SQL is a non-protocol language; it is used to access the Relational database including Oracle. We have used Oracle for the creation for the creation of tables, views and imposing constraints on various attributes of the tables. This helped in validating the data and sorting correct and meaningful data. This feature helps in maintaining the integrity of the data at the backend itself .

15

Page 16: Online Exam Documentation

JDBC

JDBC TM is a java TM API for executing SQL statements. It consists of a set of classes and interfaces written in the Java Programming language that makes it easy to understand SQL statements to virtually any relational database. In other Words, with the JDBC API it isn’t necessary to write the one program to access a Sybase database, another program to access Oracle database and so on. One can write a single program using JDBC API, and the program will be able to send SQL statements to the appropriate database. And, with a program written in java programming language one doesn’t have to worry about writing different programs to run on different platforms. The combination of JDBC and java lets a programmer ‘write it once and run it any where’.

JDBC and ODBC

At this point, Microsoft’s ODBC (Open Data Base Connectivity) API is probably the most widely used interface for accessing Relational Databases. It offers the ability to connect to almost all the databases in almost all the platforms. So why not just use ODBC from Java?

The answer is that u can use ODBC but this is best done with the help of JDBC in the form of JDBC-ODBC Bridge.

16

Page 17: Online Exam Documentation

Why do we need JDBC?

There are several answers to this question:

1. ODBC is not appropriate for direct use for Java because it uses a C interface. Calls from Java to native C code have a number of drawbacks in the security, implementation, robustness and automatic portability for applications.

2. A literal translation of the ODBC CAPI into Java API would not be desirable. For example Java has no pointers, but ODBC makes copious use of them, including the error prone generic pointer “void”. You can think of JDBC as ODBC translated into an Object-oriented interface that is natural for Java Programmers.

3. ODBC is hard to learn .It mixes simple and advanced features together, and it has complex options even for simple queries.

4. A java API like JDBC is needed in order to enable an “all Java” solution. When ODBC is used the ODBC driver manager and drivers must be manually installed on every client machine.

When the JDBC driver is written completely in Java, however, JDBC code is automatically installable, portable and secure on all Java platforms from network computers to mainframes.

17

Page 18: Online Exam Documentation

18

Page 19: Online Exam Documentation

INTRODUCTION TO SQL SERVER

19

Page 20: Online Exam Documentation

SQL Server Enterprise manager is the application that will provide the easiest access to control the objects on all the SQL Servers for which we are responsible.SQL Server enterprise manager is designed to allow us to administer any number of servers from a single location.

The tools that are used in SQL server are:Enterprise manager, Query analyser and Service Manager.

Enterprise Manager:To launch SQL server enterprise manager, choose programs-Microsoft SQL Server-Enterprise Manager from the windows start menu. This will open an instance of Microsoft Management Console (MMC), with the SQL Server Enterprise Manager loaded as the console root.

Query Analyzer:This tool is launch by choosing Programs-Microsoft SQL Server-Query Analyzer from start menu.

Other Query Analyzer Features:Query Analyzer is a pretty flexible tool. Some of the other actions you can do from this interface include:

Saving queries to text files and reloading them later Viewing results in either a grid or plain text Checking the syntax of the query without executing it. Showing the execution plan for a query.

Databases:A Database is a place to store data. In Database term we refer four levels of organization by four special terms.

The field holds an individual fact. The record holds all facts about an entity. The table holds all facts about a group of similar entities. The database holds all facts about all the entities in a connected

whole.Microsoft SQL Server in particular stores many things in the database other than data. Here we are using Relational databases.

20

Page 21: Online Exam Documentation

Relational Databases:A Relational Database is one that stores your data in multiple places called tables, while also keeping track of how these tables are related to one another. Sometimes you will see the terms RDBMS which stands for Relational Database Management system used for a relational database.

A RDBMS can be defined as a database management system where all the data visible to the user is organized strictly as tables of data values, and where all database operations work on these tables.

For any RDBMS to be accepted as a full-fledged RDBMS, it has to follow the twelve CODD rules.

THE TWELVE RULES ARE AS FOLLOWS:1. The information rule: This rule simply requires all information to

be represented as data values in the rows and Columns of tables. This is the basis of relational model.

2. The guaranteed access rule: Every data value in a relational database should be logically accessible by specifying a combination of the table name, the primary key value and the column name.

3. Systematic treatment of NULL values: DBMS must support Null to represent missing or inapplicable information. They must be distinct from zero or spaces.

4. Active on-line catalog based on the relational model: The system catalog is collections of tables that the DBMS maintains for it sunder own use. These tables hold the decryption of the structure of the database. These tables are created owned and maintained by the DBMS. The users can access them in the same manner as ordinary tables, depending on the users privileges. System tables are read-only.

5. The comprehensive data sub-language rule: This rule states that the system must support at least one language that performs all the following functions:

Data definition View definition Data manipulation operation Security and integrity constraints Transaction management operations.

6. The view updation rule: all views that are theoretically updateable must be the system.

7. High-level insert, update and delete: This rule that rows should be treated as sets in insert, delete and updates operations.

21

Page 22: Online Exam Documentation

8. Physical data independence: Application program must remain unimpaired when any changes are made in storage representation or access method.

9. Logical data independence: Users and user programs should be independent of the logical structure of the database.

10.Integrity independence: Integrity constraints must be stroble in the system catalog.

11.Distribution independence: Database must allow manipulation of distributes data located on other computer systems.

12.Non-subversion rule: The rule states that different levels of the language cannot subvert or bypass the integrity rules and constraints. For example, assume there is application program that takes care of the integrity of data in a database. Another user can write another program, say in the language that could by pass the integrity constraints imposed by the application program. Such an integrity violation is unacceptable in RDBMS. Therefore, integrity constraints should be specified at the dbms level, and not through application programs only.

DDL and DML:

DDL (Data definition Language) is concerned with creating new objects in the database, while DML (Data Manipulation Language) is concerned with using existing objects.

22

Page 23: Online Exam Documentation

SYSTEM DESIGN

23

Page 24: Online Exam Documentation

DATA FLOW ANALYSIS

Data flow analysis is a tool essential for documenting an existing system and determining the information requirements using the structured analysis method.

Data flow analysis identifies the process, which make up the system, data used by each process, what data are stored and what data enters and leaves the system.

Dataflow diagrams are used for documenting the finding in the data flow analysis. They show relation between process and data.

The transformation of data from input to output, through process, may be described and independently of the physical components associated with the system.

1: Dataflow

2: Process 3: Source/Sink

4: Data source

DATAFLOW: It is a packet of data, which moves in the specific direction from an origin to destination

PROCESS: Where the actual process carries on.

SOURCE/SINK: External sources or destination of data.

DATA STORE: Here data are stored of reference by a process in the system.

24

Page 25: Online Exam Documentation

DATA FLOW DIAGRAMS

25

Page 26: Online Exam Documentation

CONTEXT LEVEL DIAGRAM

LEVEL 1 DFD

26

Streg

Student

Online Exams &FAQs

StudentRegisters Marks

into information

Marks

details

Writes exam

Select subject

to write exam

registrationA

fter

Registration Student

Student

Student Registration1.1

Login 1.2

Exam Module 1.3

Marks 1.4

Registersinto details

Page 27: Online Exam Documentation

LEVEL 2 DFD

27

Student

Get theDetailsof client1.1.1

Validate Client1.1.2

Login

Streg

ExistD

oes not

AcceptLogin,pwd1.1.3

AcceptThe course 1.1.41.1.3

Save theDetails &

IssueRegistration

1.1.5

The course 1.1.41.1.3

Login

Streg

Course coursecourseStreg

Exist

Gives theinformation

CheckThe details

Selects a

course

Registered

Course

Page 28: Online Exam Documentation

LEVEL 2 DFD

28

Login

Course

CourseCode

StudentAcceptThe Login, pwd1.2.1

Get the Course1.2.3

Get subjects1.2.4

ExamE : CHOICE1N1DEtudent

Validate Authentication1.2.2

Student

Streg

Invalidpassword

Valid

password

Logs in Validation

Course

Subject

Show

s theselected course

Show

s the related subjectS

ubmit

Get

Page 29: Online Exam Documentation

LEVEL 2 DFD

29

Get the Questions1.3.2

Login

Get the subject1.3.1

Get the Choices1.3.3

Choices

Questions

Selectssubject

Logs in

Questions

Choices

PrepareQuestionPaper1.3.4

StudentE : CHOICE1N1DEtudent

Prepares

questionpaper

Page 30: Online Exam Documentation

LEVEL 2 DFD

30

Student N

o

StudentGet the

stno1.4.1

Get theExam details1.4.3

1.3.3

PrepareReport1.4.4

StudentE : CHOICE1N1DEtudent

Get theSubject code

1.4.2

Exams

Gives thedetails

Validate The student

Subject code

ExamDetails

Exam

Details

Marks

report

Page 31: Online Exam Documentation

DATABASE TABLES

31

Page 32: Online Exam Documentation

TABLE: STREG

This table contains the information about the student and his details.

COLUMN NAME DATA TYPE CONSTRAINTSStnoStnameStlnameAdd1Add2CcEmailPhno1Phno2LoginPwd

Integer (4)Varchar (50)Varchar (50)Varchar (50)Varchar (50)Integer (4)Varchar (50)Numeric (9)Numeric (9)Varchar (50)Char (10)

Primary keyNot null

Not null

References coursecode (cc)Not nullNot nullNot nullNot nullNot null

32

Page 33: Online Exam Documentation

TABLE: COURSE

This table contains the details of the courses and the subjects, which institute offers.

COLUMN NAME DATA TYPE CONSTRAINTSCcodeCoursenameCc

Integer (4)Varchar (50)Integer (4)

Primary key

References coursecode (cc)

TABLE: COURSE CODE

COLUMN NAME DATA TYPE CONSTRAINTSCcCname

Integer (4)Varchar (50)

Primary keyNot null

33

Page 34: Online Exam Documentation

TABLE: EXAMS

This table contains Examination details. Examinatioin ID, date and marks obtained by the student are maintained here.

COLUMN NAME DATA TYPE CONSTRAINTSCcodeStnoExdateExidMarksob

Integer (4)Integer (4)Varchar (50)Char (10)Integer (4)

References course (ccode)References streg (stno)

Primary key

34

Page 35: Online Exam Documentation

TABLE: QUESTION1

This table contains questions, answers of the respective questions and marks for each question.

COLUMN NAME DATA TYPE CONSTRAINTSQnoCcodeQuestionAnswerMarkscc

Integer (4)Integer (4)Varchar (150)Varchar (50)Integer (4)Integer (4)

Primary keyPrimary key

TABLE: CHOICE1

This table contains the choices of the questions that are stored in the QUESTION1 table.

COLUMN NAME DATA TYPE CONSTRAINTSQuesnoCcodeChoice1Choice2Choice3Choice4cc

Integer (4)Integer (4)Varchar (30)Varchar (30)Varchar (30)Varchar (30)Integer (4)

Not null

35

Page 36: Online Exam Documentation

E-R DIAGRAM

36

Page 37: Online Exam Documentation

ENTITY - RELATIONSHIP DIAGRAM

37

Choice1

Writes

stno

Exams

exidstno

Course cc

Course code

ccode cc

cc

Contains

cc

Subjectcotains

ccode cc

Question1

qno ccode cc

ccode qno ccode cc

qno qno ccode cc

Joins

ccHas

ccode qno ccode cc

Choice

Streg

ccstno

Page 38: Online Exam Documentation

11.UML DIAGRAMS

Unified Modeling Language:

The Unified Modeling Language allows the software engineer to

express an analysis model using the modeling notation that is

governed by a set of syntactic semantic and pragmatic rules.

A UML system is represented using five different views that describe

the system from distinctly different perspective. Each view is

defined by a set of diagram, which is as follows.

User Model View

i. This view represents the system from the users

perspective.

ii. The analysis representation describes a usage

scenario from the end-users perspective.

Structural model view

i. In this model the data and functionality are

arrived from inside the system.

ii. This model view models the static structures.

Behavioral Model View

It represents the dynamic of behavioral as parts of the

system, depicting the interactions of collection between

various structural elements described in the user model

and structural model view.

Implementation Model View

In this the structural and behavioral as parts of the

system are represented as they are to be built.

Environmental Model View

38

Page 39: Online Exam Documentation

In this the structural and behavioral aspects of the

environment in which the system is to be implemented

are represented.

UML is specifically constructed through two different domains they

are:

UML Analysis modeling, this focuses on the user model and

structural model views of the system.

UML design modeling, which focuses on the behavioral

modeling, implementation modeling and environmental model

views.

Use case Diagrams represent the functionality of the system from a

user’s point of view. Use cases are used during requirements

elicitation and analysis to represent the functionality of the system.

Use cases focus on the behavior of the system from external point

of view.

Actors are external entities that interact with the system. Examples of actors include users like administrator, bank customer …etc., or another system like central database.

39

Page 40: Online Exam Documentation

Use case diagram for online exam:

client

Students Registation

login

Couse details

FAQs

Edraw Trial Version

Edraw Trial Version

Edraw Trial Version

Sequence diagram for Online exam Student Registration:40

Page 41: Online Exam Documentation

STUDENTS REG:

STUDENTS REG.FORM

entering student details

submitted

Edraw Trial Version

Edraw Trial Version

Edraw Trial Version

41

Page 42: Online Exam Documentation

Sequence diagram for Online exam login:

login Examination

userid,password

select

selecting the technologies

marks

userid,password

display the

marks

Edraw Trial Version

Edraw Trial Version

Edraw Trial Version

42

Page 43: Online Exam Documentation

SYSTEM IMPLEMENTATION

43

Page 44: Online Exam Documentation

USER MANUAL

Home Page:This page provides all the links to navigate the site. It provides the information of the organization. From here the user can go anywhere in the site back and forth. The main links provided in this page are “About Us”, ”Course Details”, “Student Registration”, ”Login”, “FAQS”, ”Exit”.

About Us:This page provides details of the organization and its activities in the field of Training and its future enhancements. Provision is given to update the site.

Course Details:This page displays the courses offered by the institute. The institute offers the courses in hardware and software. The page displays the fee structure and duration of the courses. The details of Hardware and Software courses are displayed in the page.

Student Registration:This page displays the registration form to the user to register the course. The user will be asked to select a course to join and write the exam. User login and password will be accepted from the user. This page generates the registration number and displays. An E-Mail and Address are compulsorily required from student. After registering the user becomes student. He can further navigate the site using his login and password to then write exams and see the marks.

Login:After registering the student he can write the exams by providing the login and password though this screen. User validation is done in this form. If the student is a valid user it provides the “Examination” and “Marks Details” options. To write the examination student can select an option that leads to respective page.

44

Page 45: Online Exam Documentation

Examination Details:This page displays the subjects of the course the student joined for. Student can select any one of the subject .On selecting the subject a page with ten questions will be displayed with four choices for each question. Each question carries one mark. Timer will be set for a period of time after which the page expires and displaying the details of the examination. The student has to obtain at least 60% of marks to qualify the examination.

FAQs:This page provides the student the questions that were previously asked in the examination. To know the answer of the question the student can click on the question.

45

Page 46: Online Exam Documentation

TESTING

No system design or program is perfect. Communication between user and designer is not always clear. The time is short. The result is errors. Hence it is our duty to check the individual system separately and have to integrate to see whether the system is working perfectly up to the expectations of the user.

System testing makes a logical assumption that if all parts of the systems are correct. The goal will be successfully achieved.

TYPES OF TESTING

UNIT TESTING:Unit testing focuses verification effort on the smallest unit of the software design. Using the detailed design description as a guide, I tested the important paths to uncover the errors with in the boundary of the module.

INTEGRATION TESTING:I had done the integration testing in non-incremental approach, that means I had combined all the modules at the same time rather integrated it in the top down approach.

SYSTEM TESTING:Complete set of application program is tested as a whole. All the events are first tested with test data and after that I tested with the live data. After each event was ascertained that it is working correctly. It is integrated with the system and the system as a whole is put to test.

46

Page 47: Online Exam Documentation

SCREENS

47

Page 48: Online Exam Documentation

48

Page 49: Online Exam Documentation

49

Page 50: Online Exam Documentation

50

Page 51: Online Exam Documentation

51

Page 52: Online Exam Documentation

52

Page 53: Online Exam Documentation

53

Page 54: Online Exam Documentation

54

Page 55: Online Exam Documentation

55

Page 56: Online Exam Documentation

56

Page 57: Online Exam Documentation

57

Page 58: Online Exam Documentation

58

Page 59: Online Exam Documentation

59

Page 60: Online Exam Documentation

60

Page 61: Online Exam Documentation

61

Page 62: Online Exam Documentation

62

Page 63: Online Exam Documentation

63

Page 64: Online Exam Documentation

64

Page 65: Online Exam Documentation

65

Page 66: Online Exam Documentation

66

Page 67: Online Exam Documentation

67

Page 68: Online Exam Documentation

CONCLUSION

The development and implementation of this module of the proposed website has been carried out successfully. Advancing features to the present system is added, considering the present system the design has been developed. It is very simple and comfortable to the end-users at all levels. The system was tested, validated and found to be a working prototype. The system is flexible and the modules can be integrated and modified easily. The coding was done with proper documentation so that the enhancements can easily be augmented.

APPLICATION AREAS:This software has been developed for “ASPRA TECHNOLOGIES LTD”.

The system is very user friendly and it basically follows step methodology for performing all the complex tasks. The user just has to follow all the instructions on screen.

The system is fully scalable and can adapt to any other organization with similar requirements with little or no modifications. This system contains a fair amount of general components, to manage most of the commonly performed routine tasks.

68

Page 69: Online Exam Documentation

REFERENCES

BOOKS:

* The Complete Reference- Java Patrick Naughton & Herbert Schildt

The ABCs of Java Script

Lee Purcell & Mary Jane Mars

* Servlet Programming

Jason Hunter, O’reilly Publications

* SQL Server 2000

Gunderloy, Jorden

* System Analysis and Design

Elias M. Award

69

Page 70: Online Exam Documentation

CODING

70

Page 71: Online Exam Documentation

FILENAME: blank

<html><head><title>ONLINE</title></head><body bgcolor=zxcb></html>

FILENAME: close

<html><head><script Language=JavaScript>function fun(form){form.parent.close();window.close();}</script></head><form name=raj ><body onLoad="fun(this)"></html>

FILENAME: Com

<html><head><body bgcolor=maroon ><font color=yellow size=2 ><h1><center>ABOUT

US</center></h1></font><br><br><br>

<font color= blue size=1 ><h3><u>ABOUT CMTES</u></h3></font><font color= white ><h4><i>CMTES is a 17 years old organisation set up for the purpose of

impartingquality computer education at affordable fee.Equipped with the state-of-art facilities , CMTES derives its strength from well

qualified ,exprienced and fully dedicated faculty members.with its

administrative office at Secundrabad , CMTES has its Centres all over India.<br></i></h4></font><br<br><font color= blue size=1 ><h3><u>SISI-CMTES tie-up</u></h3></font>

71

Page 72: Online Exam Documentation

<font color= white ><br><br><h4><b></i>The SISI (Govt Of India) has entered into a strategic alliance with

CMTESto set up SISI-CMTES COMPUTER EDUCATION centres

throught the stateof Andhra Pradesh and Goa with the objective to impart quality

computer education at affordable fee.<br></i></b></h4></font><br><br><font color= blue size=1 ><h3><u>International Universities tie-up</u></h3></font><font color= white ><br><br><h4><b><i>CMTES is an authorised representative of La Trobe University,Australia & Swinburne University ,Australia. With this twinning

programIndian students can do part of their Mastr Degree course at CMTES and then tranferred to Australia.<br></i></b></h4></font><br><br><font color= blue size=1 ><h4><u>Software Developement </u></h1></font><font color= white ><br><br><h4><b><i>The students can also avail of the ON THE JOB TRAINING and

LIVE PROJECT facilities at the STPI Reg.Software Developement divisionof CMTES Informatics Limited, subject to conditions.

<br></i></b></h4></font><br><br><font color= blue size=1 ><h3><u>Advantages </u></h3></font><font color= white ><br><br>

<h4><b><i>Avail of the excellent training facilities and diplomas awrded by

the SISI to build a succesful and rewarding career.<br></i></b></h4></font><br><br></html>

72

Page 73: Online Exam Documentation

FILENAME: course

<html><head><body bgcolor=maroon ><font color=yellow size=2 ><h1><center>COURSE

DETAILS</center></h1></font><br><br><br>

<font color= blue size=1 ><h3><u>Advanced Diploma in Information Technology (ADIT)/Post Graduated Diploma in Computer Application

(PGDCA)</u></h3></font><font color= white ><h4><i>Sem I : Computer concepts, Ms-Dos,Ms-Windows,Ms-

Office<br>

Sem II : Unix/Linux & 'C' with Data Structures ,OOPS with C++<br>

Sem III : Networking Concepts, Windows NT,Oracle/Ms-SQL Server,Developer,Visual Basic<br>

Sem IV: DHTML,JAVA(with EJB,XML)/VC++,IIS,ASP,Introduction to e-commerce,Project<br>

Fee:25,000/- <br>Durtion : 12/24 Months<br></i></h4></font><br<br><font color= blue size=1 ><h3><u>Diploma in Advanced Computer Technology

(DACT)</u></h3></font><font color= white ><br><br><h4><b></i>Sem I : Unix/Linux & 'C' with Data Structures ,OOPS with C+

+<br>

Sem II : Networking Concepts, Windows NT,Oracle/Ms-SQL Server,Developer,Visual Basic<br>

Sem III: DHTML,JAVA(with EJB,XML)/VC++<br>

Fee:15,000/- <br>Durtion : 8/12 Months<br></i></b></h4></font><br><br>

73

Page 74: Online Exam Documentation

<font color= blue size=1 ><h3><u> Diploma in Computer Application (DCA)</u></h3></font><font color= white ><br><br><h4><b><i>

Sem I : Computer concepts, Ms-Dos,Windows 2000 Pro,& Ms-Office<br<br>

Sem II : Introduction to Internet , HTML & e-commerce<br>

Fee:5,000/- <brDurtion : 4/6 Months<br></i></b></h4></font><br><br><font color= blue size=1 ><h4><u>Diploma in JAVA Programming (DJP)</u></h1></font><font color= white ><br><br><h4><b><i>

Sem I : Core JAVA <br>

Sem II : Advanced JAVA<br>

Fee: 4,500/-<br>Duration : 3 months<br></i></b></h4></font><br><br><font color= blue size=1 ><h3><u>Diploma in Client Server Technology (DCST)</u></h3></font><font color= white ><br><br>

<h4><b><i>Introduction to Client Server Technology , Windows NT<br> Oracle with Developer, Visual Basic,ASP<br>

Fee : 7,500/-<br>Duration : 4/6 Months<br></i></b></h4></font><br><br><font color= blue size=1 ><h3><u>Diloma in Electronics & Communication Engg.

(DECE)</u></h3></font><font color= white ><br><br>

74

Page 75: Online Exam Documentation

<h4><b><i>Sem I : Diploma in Electronics & Hardware Engg. (DEHE)<br>Sem II : Diploma in Network Administration and Peripherals

(DAP)<br>Sem III : Diploma in Communication Engg.(DCE)<br>Sem IV : On the Job Training<br>

Duration : 24 Months<br></i></b></h4></font><br><br><font color= blue size=1 ><h3><u>Postgraduate Diploma in Electronics & Communication Engg.

(PGDECE)</u> </h3></font><font color= white ><br><br>

<h4><b><i>Duration : 12 Months<br></b></i></h4></font></html>

FILENAME: faq

<html><title>FAQ</title><head><center><br><h1><b>FAQ</h1></center></head><br><body bgcolor=gold text=black link=gray alink=red ,vlink=cyan><font face="BrushScript MT" size=6><a href="c:\°\raj\java.html">JAVA<br><a href="c:\°\raj\oracle.html">ORACLE<br><a href="c:\°\raj\vb.html">VB<br></font></body></html>

FILENAME: frame

<html><head><title>ONLINE</title></head><body bgcolor=bgbg link=yellow alink=cyan vlink=magenta><font face="Brush Script MT" size=4><b>Online Examination<hr><br><br><a href="c:\°\raj\Com.html" target=frame2>About

Us<br><br><br><a href="c:\°\raj\Course.html" target=frame2>Couse

Details<br><br><br><a href="c:\°\raj\streg.html" target=frame2>Student

Regisration<br><br><br>

75

Page 76: Online Exam Documentation

<a href="c:\°\raj\login.html" target=frame2>Login<br><br><br><a href="c:\°\raj\faq.html" target=frame2>FAQ<br><br><br><a href="c:\°\raj\close.html" target=frame2>EXIT<br></font></body></html>

FILENAME: java

<html><title>Introduction on Java</title><head><center><b>Java</center></head><body bgcolor=silver text=yellow link=gray

alink=red ,vlink=cyan><font face="BrushScript MT" size=6><a href ="#intjava">What is Java?</a><br><a href ="#latestjava">Latest Information Java</a><br><a href ="#applets">What are applets?</a><br><a href="#threads">What is multithreading?</a><br><a href="#internet">How java is strongly associated with the

Internet?</a><br

<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=intjava><b>What is Java?</b><br><i>Java is a Programming Lanaguage developed by <b>Sun

MicroSystems Inc.,USA</b>. Efficient for creating Internet and Distributed Architecture</i>

<a href ="c:\°\raj\java.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=latestjava><b>Latest Release of Java</b><br><i>Sun Microsystems Inc., has released Java 3.1 ver. which is

user-friendly and GUI applicated Software and Platform Independent with collabaration of Forte and named as <b>Forte for Java.</b></i>

<a href ="c:\°\raj\java.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=applets><b>What are applets?</b><br><i>Applets are small java programs that are primerily used in

Internet

76

Page 77: Online Exam Documentation

computing.They can be transported over the Internet from one computer

to another and run using the <b>Applet viewer</b>or any web browser that

supports Java.</i><a href ="c:\°\raj\java.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=threads><b>Multithreading</b><br><i>Multithreading is a conceptual programming paradism where a

program is divided into two or more subprograms,which can be

implemented at the same time in parallel.</i><a href ="c:\°\raj\java.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=internet><b>Java and Internet</b><br><i>Java is strongly associated with the internet because of the fact

that the first application program written in java was Hotjava,a web

browser to run applets on Internet.Internet users can use java to create applet

programs run them locally using a "Java enabled browser"such as

HotJava.</i> <a href ="c:\°\raj\java.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></face></body></html>

77

Page 78: Online Exam Documentation

FILENAME: login

<html><head><title> LOGIN </title></head><body bgcolor=maroon text=white><b><u><center>STUDENT LOGIN:<center></u><br><i><center>Enter your IDName and Password<center><br><form method=post

action=http://localhost:8080/servlet/login><br><b>Login name: <input type = text name=login

value=""><br><br><tr><td><b>Password:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input

type = password name=pwd value=""><br><br><input type = submit name=submit value=OK color=white><br></form></body></html>

FILENAME: ONLINE

<html><frameset cols="25%,* " border=0><frame src="frame.html" name=frame1 ><frame src="blank.html" name=frame2 ></frame></frame></frameset></html>

FILENAME: oracle

<html><title>Introduction to Oracle</title><head><center><b>Oracle</center></head><body bgcolor=silver text=yellow link=gray

alink=red ,vlink=cyan><font face="BrushScript MT" size=6><a href ="#oracle">What is Oracle?</a><br><a href ="#relationaldb">What is a realational database?</a><br><a href ="#Sql">What is Sql?</a><br><a href="#packages">What are Packages?</a><br><a href="#views">What are Views?</a><br>

78

Page 79: Online Exam Documentation

<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=oracle><b>What is Oracle?</b><br><i>In the beginning ,Oracle was just a relational database

company.At thetime ,relational databases were a new way of thinking about how

data shouldbe structured and stored.The key to this type of database is in

understadingthe relatioinships within data,then structuring the information base

to reflect those relationships.</i><a href ="c:\°\raj\oracle.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=relationaldb><b>What is a relational database?</b><br><i>A relational database is an information system that presents

information as rows contained in a collection of tables,from where one or more

columnsare retrieved.</i><a href ="c:\°\raj\oracle.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=Sql><b>What is Sql?</b><br><i>SQL is a non-procedural language unlike C or Cobol,which

enables the user to interface with the Relational Database.</i><a href ="c:\°\raj\oracle.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=packages><b>What are Packages?</b><br><i>The Packages are PL/SQL constructs that allow related objects

to be stored together.A package has two parts-the specification and the

body.</i><a href ="c:\°\raj\oracle.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>

79

Page 80: Online Exam Documentation

<a name=views><b>What are Views?</b><br><i>A view is a database object that allows you to create a

customized sliceof a table of a collection of tables.Unlike a table contains no

data,just a SQLQuery.</i><a href ="c:\°\raj\oracle.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></face></body></html>

FILENAME: STREG

<HTML><BODY bgcolor =maroon text=white><CENTER><TABLE BORDER=0 >

<form method=post action="http://localhost:8080/servlet/OnlineExamSer">

<b><u><center>STUDENT REGISTRATION FORM :<center><br>

<TR><TD><b>Student Name:</td><td><input type=text name=stname value=""> *</td></TR>

<TR><TD><b>Last Name:</td><td><input type=text name=stlname value=""> </td></TR>

<TR><TD><b>Address1:</td><td><input type=text name=add1 value=""> *</td> </TR>

<TR><TD><b>Address2:</td><td><input type=text name=add2 value=""></td></TR>

<TR><TD><b>CourseCode:</td><td><select name=cc > <option value=1>adit</option><option value=2>dehe</option><option value=3>dnap</option></select> *</td></TR><TR><TD><b>Email:</td><td><input type=text

name=email value=""> *</td></TR> <TR><TD><b>PhoneNo1:</td><td><input type=text

name=phno1 value=""> *</td></TR> <TR><TD><b>PhoneNo2:</td><td><input type=text

name=phno2 value=""></td></TR><TR><TD><b>Login:</td><td><input type=text

name=login value=""> *</td></TR>

80

Page 81: Online Exam Documentation

<TR><TD><b>Password :</td><td><input type=password name=pwd value=""> *</td></TR><br><br>

<tr><td><td><input type=submit></td></tr>

</TABLE><br><br><i><center>Note: '*' Marked items are must be

filled.<center> </BODY></HTML>

FILENAME: vb

<html><title>Introduction on VB</title><head><center><b>Visual Basic</center></head><body bgcolor=silver text=yellow link=gray

alink=red ,vlink=cyan><font face="BrushScript MT" size=6><a href ="#parts">What are the parts of a vb project?</a><br><a href ="#forms">What are Forms?</a><br><a href ="#modules">What are modules?</a><br><a href="#globalitem">What are Global items?</a><br>

<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=parts><b>What are the parts of a vb project?</b><br><i>Visual basic projects usually contain just three types of items:global items,forms and modules. </i><a href ="c:\°\raj\vb.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=forms><b>What are Forms?</b><br><i>Forms are the templates you base windows on.Besides standard

forms,visual basic also supports multiple document interface forms.</i><a href ="c:\°\raj\vb.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=modules><b>What are Modules?</b><br>

81

Page 82: Online Exam Documentation

<i>Modules are collections of code and data that function something like

objects in object-oriented programming, but without defining OOP characteristics like inheritence,polymorphism,and so on.</i><a href ="c:\°\raj\vb.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name=globalitem><b>What are Global items?</b><br><i>Global items are accessible to all modules and forms in a

project, andyou declare them in with the Public keyword.</i><a href ="c:\°\raj\vb.html"><br>Back</a><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></font></body></html>

FILENAME: Course.java

import java.io.*;import java.sql.*;import javax.servlet.*;import javax.servlet.http.*;public class Course extends HttpServlet{ExamSerSql ob=new ExamSerSql();ResultSet rs;public void doGet(HttpServletRequest req,HttpServletResponse

res)throws ServletException,IOException{String login = "",pwd = "";Cookie c[]=req.getCookies();for(int i = 0;i<c.length;i++){

if(c[i].getName().equalsIgnoreCase("login"))login = c[i].getValue();

else if(c[i].getName().equalsIgnoreCase("pwd"))pwd = c[i].getValue();

}res.setContentType("text/html");PrintWriter out=res.getWriter();out.println("<html><head>");

82

Page 83: Online Exam Documentation

out.println("<title></title></head>");out.println("<body bgcolor=Maroon text=white ><center>");out.println("<u><b>Select one subject from the

following:<b><u>");out.println("<font face=Brush ScriptMT size=4>");try{rs=ob.getSubjectCode(login,pwd);out.println("<form method=get

action=http://localhost:8080/servlet/ExamSer>");while(rs.next()){

out.println("<input type=radio name=subject value="+rs.getInt(1)+">"+rs.getString(2));

}out.println("<br><br><input type=submit name=submit

value=submit></form></font></body></html>");

}catch(Exception e){e.printStackTrace();}}

}

FILENAME: ExamSer.java

import java.util.*;import java.sql.*;import java.io.*;import javax.servlet.*;import javax.servlet.http.*;public class ExamSer extends HttpServlet{PrintWriter out;ServletContext s;Servlet ser;RandomSql rs=new RandomSql();ExamSerSql ob=new ExamSerSql();int code;int[] qno = new int[50];String st="";int arr[]=new int[10];

public void doGet(HttpServletRequest req,HttpServletResponse res)

throws ServletException,IOException{

83

Page 84: Online Exam Documentation

res.setContentType("text/html");PrintWriter out=res.getWriter();int cc = 0;Cookie c1[] = req.getCookies();for(int i = 0;i<c1.length;i++)

if(c1[i].getName().equals("cc"))cc = Integer.parseInt(c1[i].getValue());

int ccode = Integer.parseInt(req.getParameter("subject"));Cookie c = new Cookie("ccode",String.valueOf(ccode));res.addCookie(c);String str[][] = rs.random(ccode,cc);String QueryString = "";int k=0;out.println("<script language=JavaScript>");out.println("var str = '',st1='';function gourl(form)");out.println("{");out.println("for(i=0;i<40;i++)");out.println("{");out.println("if(form.elements[i].checked == true)");out.println("str =

str+form.elements[i].name+'='+form.elements[i].value+'&'");out.println("}");out.println("st1=form.elements[41].value;");out.println("str=str+'st1=+'+st1;");out.println("window.navigate('http://localhost:8080/servlet/

Marks?'+str);");out.println("}");out.println("function fun1(form)");out.println("{");out.println("window.setInterval('window.status=new

Date();',1000);");out.println("window.setInterval('gourl(exam);',25000);");out.println("}");out.println("</script>");

out.println("<html><head>");out.println("<title>QUESTIONS</title></head>");out.println("<form name = 'exam' method=get

action=http://localhost:8080/servlet/Marks>");out.println("<body bgcolor=pink text=blue

onLoad='fun1(exam)'><center>");

out.println("<b><u>QUESTIONS</u></b></center><br>");out.println("<font color=blue>NOTE :- Choose the

one correct answer from the following.");

84

Page 85: Online Exam Documentation

out.println("Each carries one mark.<br>To pass the test you should obtain 6 or more marks.<br></font>");

out.println("<br><br>");for(int i = 0;i<15;i++){

int r = (int)(Math.random()*20);int x=Integer.parseInt(str[i][1]);if(r == x && k<=10){

for(int j=0;j<arr.length;j++){if(arr[j]==x) break;if(j==(arr.length)-1){k++;arr[k-1]=x;out.print(k+"). ");

int m=1;code = Integer.parseInt(str[i][0]);qno[m] =k;//Integer.parseInt(str[i][1]);out.println(str[i][2]+"<br>");String str1,str2,str3,str4;str1=str[i][3];str2=str[i][4];str3=str[i][5];str4=str[i][6];

out.println("<input type=radio name =ch"+qno[m]+" value="+str1+">"+str1+"&nbsp&nbsp&nbsp<br>");

out.println("<input type=radio name =ch"+qno[m]+" value="+str2+">"+str2+"&nbsp&nbsp&nbsp<br>");

out.println("<input type=radio name =ch"+qno[m]+" value="+str3+">"+str3+"&nbsp&nbsp&nbsp<br>");

out.println("<input type=radio name =ch"+qno[m]+" value="+str4+">"+str4+"&nbsp&nbsp&nbsp<br>");

}

}

}

if(k==10) break;if(i>=14 && k<10)

i=0;

85

Page 86: Online Exam Documentation

}for(int i=0;i<10;i++){

st=st+String.valueOf(arr[i])+"+";}System.out.println(st);out.println("<input type=submit name=submit value=submit>");out.println("<input type=hidden name=st value="+st+">");st="+"+st;c = new Cookie("st",st.trim());res.addCookie(c);out.println("</form></body></html>");out.flush();out.flush();}}

FILENAME: ExamSerSql.java

import java.util.*;import java.sql.*;import java.io.*;import javax.servlet.*;import javax.servlet.http.*;public class ExamSerSql extends HttpServlet{public Statement marks(){try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection con =

DriverManager.getConnection("jdbc:odbc:online","sa","");Statement st = con.createStatement();return st;

}catch(Exception e){e.printStackTrace();return st;}} Connection con; PreparedStatement st; ResultSet rs;public ResultSet getSubjectCode(String login,String pwd) throws

Exception{ Connection con; PreparedStatement st;

86

Page 87: Online Exam Documentation

ResultSet rs; try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");con=

DriverManager.getConnection("jdbc:odbc:online","sa","");String st1="select ccode,coursename from course

where cc = (select cc from streg where login = '"+login+"' and pwd = '"+pwd+"')";

st = con.prepareStatement(st1);rs=st.executeQuery();return rs;

}catch(Exception e){e.printStackTrace();return null;}

}

public Hashtable result1(int ccode){

Hashtable hs = new Hashtable();try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection con =

DriverManager.getConnection("jdbc:odbc:online","sa","");Statement st = con.createStatement();ResultSet rs = st.executeQuery("select qno,answer from

question1 where ccode="+ccode);while(rs.next()){

hs.put(new Integer(rs.getInt(1)),rs.getString(2));}}catch(Exception e){e.printStackTrace();}return hs;

}

public int getExamid() throws Exception{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection con =

DriverManager.getConnection("jdbc:odbc:online","sa","");Statement st1=con.createStatement();ResultSet rs1=st1.executeQuery("select max(exid)+1 from

exams");if(rs1.next())

return rs1.getInt(1);

87

Page 88: Online Exam Documentation

elsereturn 1;

}}

FILENAME: login.java

import java.io.*;import java.sql.*;import javax.servlet.*;import javax.servlet.http.*;public class login extends HttpServlet{

loginsql ob=new loginsql();public void doPost(HttpServletRequest req,HttpServletResponse

res)throws ServletException,IOException

{

res.setContentType("text/html");PrintWriter out=res.getWriter();String st1=req.getParameter("login");String st2=req.getParameter("pwd");int stno;try{ResultSet rs1=ob.resultset(st1,st2);if(rs1.next()){

Cookie c1 = new Cookie("login",st1);Cookie c2 = new Cookie("pwd",st2);res.addCookie(c1);res.addCookie(c2);out.println("<html><head>");out.println("<body bgcolor=maroon link=orange

alink=white vlink=cyan><center>");out.println("<b><font color=white> YOU ARE VALID

USER<BR>");out.println("<form method=post

action=http://localhost:8080/servlet/Course><br>");stno=rs1.getInt("stno");int cc = rs1.getInt("cc");Cookie c4 = new Cookie("cc",String.valueOf(cc));

88

Page 89: Online Exam Documentation

Cookie c3=new Cookie("stno",String.valueOf(stno));res.addCookie(c3);res.addCookie(c4);out.println("<font face=serif size=4 >");

out.println("<img src='C:/°/raj/flag.gif' width=150 height=150></img><br><br><br>");

out.println("<a href=http://localhost:8080/servlet/Course>Examination&nbsp</a>");

out.println("<a href=http://localhost:8080/servlet/MarksSer>MarksDetails</a><br><br>");

out.println("</font></body>"); out.println("</html>");} else {

out.println("<html>");out.println("<body bgcolor=maroon text=white>"); out.println("<center><h2>YOU ARE NOT A VALID

USER</h2></center>");out.println("</body>");

} out.println("</html>");}catch(NullPointerException e){e.printStackTrace();}catch(Exception e){e.printStackTrace();}}

}

FILENAME: loginsql.java

import java.sql.*;public class loginsql{

Connection con;PreparedStatement st;ResultSet rs;public ResultSet resultset(String log,String pw){

try{

89

Page 90: Online Exam Documentation

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");con=

DriverManager.getConnection("jdbc:odbc:online","sa","");st = con.prepareStatement("select * from streg

where login=? and pwd=?");st.setString(1,log);st.setString(2,pw);rs=st.executeQuery();return rs;

}catch(Exception e){e.printStackTrace();return null;}}

}

FILENAME: Marks.java

import java.io.*;import java.sql.*;import java.util.*;import javax.servlet.*;import javax.servlet.http.*;public class Marks extends HttpServlet{ExamSerSql ob=new ExamSerSql();public void doGet(HttpServletRequest req,HttpServletResponse

res)throws ServletException,IOException{res.setContentType("text/html");PrintWriter out=res.getWriter();int m1=0,m2=0;Hashtable hs1=new Hashtable();

try{System.out.println("raj");int code=0;String stcook = "";Cookie[] c=req.getCookies();for(int i = 0;i<c.length;i++){

if(c[i].getName().equals("ccode"))code=Integer.parseInt(c[i].getValue());

90

Page 91: Online Exam Documentation

if(c[i].getName().equals("st"))stcook = c[i].getValue();

}System.out.println("St in cookie : "+stcook);System.out.println("code in cookie : "+code);int sno=Integer.parseInt(c[2].getValue());int marks=0;int arr[]=new int[10];int p=0,q=0,r=0,s=0,k=0;String sr=req.getQueryString();System.out.println("sr :"+sr);String sr1="";try{ for(;s<stcook.length()-1;k++) {

r=stcook.indexOf("+",p); s=stcook.indexOf("+",r+1); sr1=stcook.substring(r+1,s); arr[k]=Integer.parseInt(sr1); p=s; }}catch(Exception e){e.printStackTrace();}

for(int y=0;y<10;y++) System.out.println(arr[y]); int a=0,b=0,x=0,j=0;String st=req.getQueryString();String st1="";System.out.println("raj");try{for(int i=1;j<st.lastIndexOf("&");i++){

x=st.indexOf("=",a);j=st.indexOf("&",x);st1=st.substring(x+1,j);if(st1.equals("submit"))

break;hs1.put(new Integer(i),st1);System.out.println("st1 is : "+st1);a=j+1;

}}catch(Exception e){e.printStackTrace();}

91

Page 92: Online Exam Documentation

String tr=req.getQueryString();String tr1="";int ay[]=new int[10];int a1=0,b1=0,c1=0,d1=0;

c1=tr.indexOf("=",a1);tr1=tr.substring(a1+2,c1);System.out.println(c1+","+d1);System.out.println(tr1);ay[Integer.parseInt(tr1)-1]=Integer.parseInt(tr1);

try{for(c1=tr.indexOf("&",a1) ;c1<tr.lastIndexOf("&");c1=tr.indexOf(

"&",a1)){

d1=tr.indexOf("=",c1);tr1=tr.substring(c1+3,d1);System.out.println(c1+","+d1);System.out.println(tr1);if(tr1.equals("bmit"))break;ay[Integer.parseInt(tr1)-1]=Integer.parseInt(tr1);a1=d1;

}}catch(Exception e){e.printStackTrace();}for(int i=0;i<ay.length;i++){

if(ay[i]==0){arr[i]=100;m1++;}

}for(int i=0;i<arr.length;i++)

System.out.println(arr[i]);for(int i=0;i<ay.length;i++) System.out.println(ay[i]);

Hashtable hs=new Hashtable();hs=ob.result1(code);

92

Page 93: Online Exam Documentation

Enumeration en = hs.keys(); Enumeration en1 = hs1.keys(); Integer temp=new Integer(0);

while(en.hasMoreElements() && en1.hasMoreElements()){

for(int i=arr.length-1;i>=0;i--){

en = hs.keys();while(en.hasMoreElements()){ Integer gar=new Integer(100);

temp=(Integer)en.nextElement();Integer y=new Integer(arr[i]);if( y.equals(temp) && !(y.equals(gar))){

System.out.println(arr[i]+"\t"+temp);String stx = (String)hs.get(temp);

Integer z=(Integer)en1.nextElement();String stj = (String)hs1.get(z);System.out.println(stx+" "+stj);if(stx.equals(stj))

marks++;}

}}

}System.out.println("Marks\t"+marks);Statement ps=ob.marks();java.util.Date da=new java.util.Date();String st4=String.valueOf(da.getDate());String st2=String.valueOf(da.getMonth()+1);String st3=String.valueOf(da.getYear()+1900);String st5=st4+"/"+st2+"/"+st3;System.out.println(st5);int eid = ob.getExamid();String result="";if(marks>=6)

result="PASSED";else

result="FAILED";

out.println("<html><head><title>");out.println("marks</title></head>");out.println("<body bgcolor=maroon text=white>");

93

Page 94: Online Exam Documentation

out.println("<h1><b><center>EXAMINATION DETAILS</center></b></h1>");

out.println("<font face=Brush Script MT size=6><table align=center ><tr><td>");

out.println("<b>EXAM ID:<td>"+eid);out.println ("<br><tr><td>"); out.println("<b>NUMBER OF QUESTIONS ATTEMPTED:

<td>"+(10-m1));out.println("<br><tr><td>"); out.println("<b>DATE OF EXAMINATION : <td>"+st5); out.println("<br><tr><td>"); out.println("<b>MARKS OBTAINED :<td> "+marks); out.println("<br><tr><td>"); out.println("<b>RESULT :<td> "+result); out.println("</table></font></body></html>");

ps.executeUpdate("insert into exams values("+code+","+sno+",' "+st5+" ',"+eid+ ","+marks+")");

}catch(Exception e){e.printStackTrace();}

}}

FILENAME: MarksSer.java

import java.sql.*;import java.io.*;import javax.servlet.*;import javax.servlet.http.*;public class MarksSer extends HttpServlet{public void init(ServletConfig sc){System.out.println("Init method of MarksSer");}public void service(HttpServletRequest req,HttpServletResponse

res) throws ServletException,IOException{

94

Page 95: Online Exam Documentation

System.out.println("Service method of MarksSer");PrintWriter pw=res.getWriter();Cookie c[] = req.getCookies();int stno =0;for(int i = 0;i<c.length;i++){

if(c[i].getName().equals("stno"))stno = Integer.parseInt(c[i].getValue());

}

MarksSerSql ob=new MarksSerSql(); try{

ResultSet rs=ob.marks(stno);pw.println("<html><head><title>");pw.println("MARKS</title></head>");pw.println("<body bgcolor=yellow text=blue>");pw.println("<h1><i><center>MARKS

DETAILS</center></i></h1><br><br><br>");pw.println("<font face=bookman size=4>");pw.println("<table border =3 align =center>");pw.println("<tr><td><b>Exam

Id</td><td><b>St.Name</td><td><b>Exam Date</td><td><b>Marks Obt.</td><td><b>Subject Name</td></tr>");

while(rs.next()){

pw.println("<tr><td><b>"+rs.getInt(1)+"</td>");pw.println("<td><b>"+rs.getString(2)+"</td>");pw.println("<td><b>"+rs.getString(3)+"</td>");pw.println("<td><b>"+rs.getInt(4)+"</td>");

pw.println("<td><b>"+rs.getString(5)+"</td></tr>");}pw.println("</table></font></body></html>");

}catch(Exception e){e.printStackTrace();}

}

}

95

Page 96: Online Exam Documentation

FILENAME: MarksSerSql.java

import java.util.*;import java.sql.*;import java.io.*;public class MarksSerSql { Connection con; PreparedStatement st; ResultSet rs;public ResultSet marks(int stno){ try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");con=

DriverManager.getConnection("jdbc:odbc:online","sa","");st = con.prepareStatement("select distinct

ex.exid,s.stname,ex.exdate,ex.marksob ,co.coursename from exams ex,question1 qu,streg s,course co where ex.ccode = qu.ccode and s.stno = ex.stno and co.ccode=ex.ccode and ex.stno="+stno);

rs=st.executeQuery();return rs;

}catch(Exception e){e.printStackTrace();return null;}

}}

FILENAME: OnlineExamSer.java

import java.io.*;import javax.servlet.*;import javax.servlet.http.*;public class OnlineExamSer extends HttpServlet{OnlineExamSql ob=new OnlineExamSql();int stno;public void doPost(HttpServletRequest req,HttpServletResponse

res)throws ServletException,IOException

96

Page 97: Online Exam Documentation

{res.setContentType("text/html");PrintWriter out=res.getWriter();

try{String stname=req.getParameter("stname");String stlname=req.getParameter("stlname");String add1=req.getParameter("add1");String add2=req.getParameter("add2");int cc=Integer.parseInt(req.getParameter("cc"));String email=req.getParameter("email");int

phno1=Integer.parseInt(req.getParameter("phno1"));int

phno2=Integer.parseInt(req.getParameter("phno2"));String login=req.getParameter("login");String pwd=req.getParameter("pwd");boolean flag = ob.checkLogin(login);if(flag == true){stno = ob.getRegno();

ob.setData(stno,stname,stlname,add1,add2,cc,email,phno1,phno2,login,pwd);

out.println("<html>");out.println ("<body bgcolor=maroon

text=white>"); out.println("<h1><b><center>YOU ARE

REGISTRERED..</center><b><h1>");}else{out.println("<h1><b><center>YOU ARE NOT

REGISTRERED..</center><b><h1>");out.println("</font></body>");}

}catch(NumberFormatException e){

e.printStackTrace();}catch(Exception e){}

}

97

Page 98: Online Exam Documentation

}

FILENAME: OnlineExamSql.java

import java.sql.*;public class OnlineExamSql{

Connection con;PreparedStatement st;public OnlineExamSql(){

try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");con=

DriverManager.getConnection("jdbc:odbc:online","sa","");st = con.prepareStatement("insert into streg

values(?,?,?,?,?,?,?,?,?,?,?)");}catch(Exception e){}

}

public void setData(int stno,String stname,String stlname,String add1,String add2,int cc

,String email,int phno1,int phno2,String login,String pwd){

try{

st.setInt(1,stno);st.setString(2,stname);st.setString(3,stlname);st.setString(4,add1);st.setString(5,add2);st.setInt(6,cc);st.setString(7,email);st.setInt(8,phno1);st.setInt(9,phno2);st.setString(10,login);st.setString(11,pwd);st.executeUpdate();con.commit();

98

Page 99: Online Exam Documentation

}catch(Exception e){}}

public boolean checkLogin(String login) throws Exception{

PreparedStatement ps1 = con.prepareStatement("select login from streg where login =?");

ps1.setString(1,login);ResultSet rs1 = ps1.executeQuery();if(rs1.next())

return false;else

return true;}public int getRegno() throws Exception{

Statement st1=con.createStatement();ResultSet rs1=st1.executeQuery("select max(stno)+1

from streg");if(rs1.next())

return rs1.getInt(1);else

return 1;}

}

99

Page 100: Online Exam Documentation

FILENAME: RandomSql.java

import java.util.*;import java.sql.*;import java.io.*;import javax.servlet.*;import javax.servlet.http.*;

public class RandomSql extends HttpServlet{Connection con;PreparedStatement st;ResultSet rs;public String[][] random(int code,int cc) {String[] str[] = new String[50][7];

try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");con=

DriverManager.getConnection("jdbc:odbc:online","sa","");String st1="select

co.ccode,qu.qno,qu.question,ch.choice1,ch.choice2,ch.choice3,ch.choice4 from course co,question1 qu,choice1 ch where co.ccode = qu.ccode and ch.quesno = qu.qno and ch.ccode = co.ccode and co.ccode="+code+" and co.cc = "+cc;

st = con.prepareStatement(st1);rs=st.executeQuery();int index = 0;while(rs.next()){

str[index][0] = String.valueOf(rs.getInt(1));str[index][1] = String.valueOf(rs.getInt(2));str[index][2] = rs.getString(3);str[index][3] = rs.getString(4);str[index][4] = rs.getString(5);str[index][5] = rs.getString(6);str[index][6] = rs.getString(7);

index++;}}catch(Exception e){e.printStackTrace();}

return str;}}

100

Page 101: Online Exam Documentation

101