Rajat Final Training
Rajat Final Training
Rajat Final Training
On Java
Topic-Examination system
Submitted By:
Apoorva Rathore
Roll Number:1142017
Branch: Computer Science
Batch: B.Tech 3rd year
Section : CO3
DECLARATION
I, hereby declare that the report of the project entitled Examination system
has not been presented as a part of any other academic work to get my degree or
certificate except National Institute of Technology, Kurukshetra for the
fulfillment of the requirements for the degree of Bachelor of Technology with
Computer Engineering as major.
ACKNOWLEDGEMENT
The present report would not have been possible without the help I have
received from various quarters. I shall be failing in my duty if dont
acknowledge the help and guidance from these sources.
Last but not the least; I am thankful to all for their sincere efforts during my
training.
Apoorva Rathore
Roll no.1142017
7.Project Features.......................................................................................................................26
7.1Login page................................................................................................................ .........26
7.2Student page......................................................................................................................26
7.3Admin page...................................................................................................................... .27
7.4Faculty page.......................................................................................................................27
8.Database design.......................................................................................................................28
8.1Database dictionary.............................................................................................................28
8.2Database tables...................................................................................................................29-31
COMPANY PROFILE
Aptech computer education is a premier education institute with 30 years of
experience in IT training. Aptech computer education has parterned with
leading technology companies such as Microsoft, Red Hat, Java and Oracle to
offer courses that are globally recognised . The Institute offers seminars and job
fairs to encourage student interaction and prepare them for job interviews.
INTRODUCTION TO JAVA
CREATION OF JAVA
Java was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank and Mike
Sheridan at SUN Microsystems Incorporation in the year 1991.It took 18 months to develop
the 1st working version. This language was initially called OAK, but was renamed
JAVA in 1995, many more contributed to the design and evolution of the language.
JAVA OVERVIEW
Java is a powerful but lean object-oriented programming language. It has generated a lot of
excitement because it makes it possible to program for Internet by creating Applets. Programs
that can be embedded in web page. The context of an applet can be an animation with sound,
an interactive game or a ticker tape. With constantly updated stock prices. Applets can be just
little decorations to liven up web page, or they can be serious applications like Word
processor or Spreadsheet.
But Java is more than a programming language for writing Applets. It is being used more and
more for writing standalone applications as well. It is becoming so popular that many people
believe it will become standard language for both general purpose and Internet programming.
There are many buzzwords associated with Java, but because of its spectacular growth in
popularity, a new buzzword has appeared ubiquitous. Indeed, all indications are that it will
soon be everywhere.
Java builds on the strength of C++. It has taken the best features of C++ and discarded the
more problematic and error prone parts. To this lean core, it has added garbage collection
(automatic memory management), multithreading (the capacity for one program to do more
than one thing at a time), security capabilities. This result is that Java is simple, elegant, and
powerful and easy-to-use.
The Virtual Machine is what gives Java is cross platform capabilities. Rather being compiled
into machine language, which is different for each OSs and computer architecture, Java code
is compiled into Byte codes.
With other languages, the program code is compiled into a language that the computer can
understand. The problem is that other computers with different machine instruction set cannot
understand that language. Java code on the other hand is compiled into Byte-Code rather than
a machine language. These byte codes go to the JVM, which executes them directly or
translates them into the language that is understood by the machine running it.
In summary, these means that with the JDBC API extending Java, a programmer writing Java
code can access all the major RDBMS on any platform that supports the JVM.
JAVA IS OBJECT-ORIENTED
Object-Oriented Languages use the paradigm of classes. In simplest term, a class includes
both the data and the functions to operate on data. You can create an instance of a class, also
called an object, which will have all the data members and functionality of its class. Because
of this, you can think of a class as being like template, with each object being a specific
instance of a particular type of class.
The class paradigm allows one to encapsulate data so that specific data values are those using
the data cannot see the function implementation. Encapsulation makes it possible to make the
changes in code without breaking other programs that use that code.
If for example, the implementation of a function is changed, the change is invisible to any
programmer who invokes that function, and does not affect his/her program, except hopefully
to improve it.
Java includes inheritance, or the ability to derive new classes from existing classes. The
derived class, is also called as Sub-Class, inherits all the data in the functions of the existing
class
To code, edit, debug and test the java programs, one needs to have a java development
environment. At the minimum this will consists of a java compiler interpreter and applet
viewer where applets can be tested.
Suns java development kit (JDK) latest version is 2.2 can be freely downloaded from the
Internet. Java compiler is available on DOS, Win95, WINNT, Solaris and MAC etc
DEVELOPMENT OF JAVA:
The Internet helped catapult Java to the forefront of programming, and Java, in
turn, has had a profound effect on the Internet. The reason for this is quite
simple: Java expands the universe of objects that can move about freely in the
cyberspace. In a network, two very broad categories of objects are transmitted
between the server and our computer passive information and dynamic, active
programs.
Java was designed to be easy for the professional programmers to learn and use efficiently.
The object model of Java is simple and easy to extend, while simple types, such as integers
are kept as high-performance non-objects.
BSNL System is implemented using the Java language so as to make the programmers and
different users at different levels can make use of this system very affectively.
Java was designed to meet the real world requirements of creating interactive,Networked
programs. Java supports multithreaded programming, which allows us to write programs that
do many things simultaneously. A central issue for the Java designers was that of code
longevity and portability. Their goal was write once; run anywhere, anytime, forever .
Java enables the creation of the cross-platform programs by compiling into intermediate
representation called Java byte code. This code can be interpreted on any system that
provides a java virtual machine. Java is designed for the distributed environment of the
Internet, because it handles TCP/IP protocols. In fact, accessing a resource using a URL is
not much different from accessing a file. The original version of Java (OAK) included
features for intra-address-space messaging. Java programs carry with them substantial
amounts of the run-time type information that is used to verify and resolve accesses to objects
at run-time. This makes it possible to dynamically link code in a safe and expedient manner.
Problem for doing this is ODBC gives a c language API, which uses pointers extensively.
Since java does not have any pointes and is object-oriented sun Microsystems, inventor of
java developed to suit its needs.
After that you need to have a back-end database engine for which a JDBC driver is available.
When JDBC drivers are not available JDBC-ODBC bridge drivers are used to access the
database through ODBC. Back-end is not needed when JDBC driver is capable of storing and
retrieving the data itself, or if JDBC-ODBC Bridge and the ODBC driver can be used to store
and retrieve the information.
It is a java data base connectivity having database as a back-end of java as front end.
Database is a collectivity of related data. A data base management system (DBMS) controls
the storage or retrieval of data in the database. The main use of this JDBC is the database
connectivity to a java program.
Interfaces of JDBC include drivers, connection, and statement; prepare statement, callable
statement, Result Set, Result Set Meta data. Classes of JDBC are driver manages, driver
property information, date and time, and timestamp, type. The driver defined by the class
Jdbc odbc driver in package sun.jdbc.odbc. Class sun.jdbc.odbc.jdbc odbc driver represents
the jdbc to odbc bridge driver.
To use JDBC you need a basic knowledge of databases and SQL.A part from this you
need the jdk1.1 (Java Development Kit1.1 available javasofts website) or a version of Java
since jdk1.1 and above come bundled with JDBC software.
The JDBC drivers that we are aware of at this time fit into one of four categories:
The java soft bridge product provides JDBC access via ODBC drivers. Note that ODBC
binary code end in many cases database client code must be loaded on each client machine
that uses this driver. As a result, this kind of driver is most appropriate on a corporate
network where client installations are not major problem, or for application server code
written in java in a 3-tier architecture.
This kind of driver converts JDBC calls into calls on the client API for oracle Sybase,
Informix, DB2, or other DBMS. Note that, like the bridge driver, this style of driver requires
that some binary code be loaded on each client machine.
This driver translates JDBC calls into a DBMS independent net protocol, which is then
translated, to a DBMS protocol by a server. This net server middle-ware is able to connect its
all java clients to many different databases. The Specific protocol used depends on the
vendor. In general, this most flexible JDBC alternative. It is likely that all vendors of this
solution will provide products suitable for intranet use. In order for these products to also
support Internet access, they must handle the additional requirements for security, access
through firewalls, etc that the web imposes. Several vendors are adding JDBC drivers to their
existing database middleware products.
This kind of driver converts JDBC calls into the network protocol used by DBMS directory.
This allows a direct call from the client machine to the DBMS server that is practical solution
for intranet access. Since many of these protocols are proprietary, the database vendors
themselves will be the primary source. Several database vendors have these in progress.
Eventually, we expect that driver categories 3 and 4 will be the preferred way to access
databases from JDBC. Driver categories one and two are interim solutions where direct all
java drivers are not yet available. Category 4 is in some sense the ideal; however, there are
many cases where category 3 may be preferable: eg: -where a thin DBMS-independent client
is desired, or if a DBMS independent protocol is standardized and implemented directly by
many DBMS vendors.
DATABASE MODELS
JDBC and accessing the database through applets and JDBC API via an intermediate server
resulted server resulted in a new type of database model which is different from the client-
server model. Based on number of intermediate server through the request should go it is
named as single tire, two tire and multi tire architecture.
Single Tier
In a single tier the server and client are the same in the sense that a client program that needs
information (client) and the source of this type of architecture is also possible in java, in case
flat files are used to store the data. However this is useful only in case of small applications.
The advantage with this is the simplicity and portability of the application developed.
Server and
client
Database
In two tier architecture the database resides in one machine and client in different machine
they are connected through the network. In this type of architecture a database management
takes control of the database and provides access to clients in a network. This software
bundle is also called as the server. Software in different machines, requesting for information
are called as the clients.
Server
Client
In the three-tier architecture, any number servers can access the database that resides on
server which in turn serve clients in a network. For example, you want to access the database
using java applets, the applet running in some other machine, can send request only to the
server from which it is down loaded. For this reason we will need to have a intermediate
server which will accept the requests from applets and them to the actual database server.
This intermediate server acts as a two-way communication channel also. This is the
information or data from the database is passed on to the applet that is requesting it. This can
be extended to make n tiers of servers, each server carrying to specific type of request from
PROJECT OVERVIEW
The project is entitled as Examsuite, examination system in java. It is designed with the
specific goal of reducing the hectic job of assessing the answers given by candidates
manually. Responses given by the candidate will be checked instantly and automatically.
Hence it will reduce paper work. The result will be shown immediately to the participating
student, reducing anxiety. The system can be used by educational institutes to evaluate
students regularly. There are generally two types of users here .The first users are the students
which will login into the system as normal users. They have a particular id and password
allotted to them. They can take test on any of the subjects available in the database . The
second type of users are the admin .They also have a login id and password through which
they can login .They have the special privilege that they can either add new questions or
delete an existing question . Their task is to keep the portal updated as per the user
requirement.
Examsuite is designed for educational institutes like schools, universities and training
centres.
The system generates report as soon as the test is finished.
The type of question is only multiple choice.
Project Overview
Login.
Test.
Result.
LOGIN:
Each registered user is provided a unique login id and password by which he/she enters
the system. It makes the system secure and reliable. Administrators have a different login
id as they are granted more privilege.
TEST:
Test page is the most important page in the project. It consists of subject selection and utilities.
With subject selection, the user can select the subject of his choice for test. Utilities include skip
and come back to the question afterwards, change the answer multiple times etc.
RESULT:
On the basis of the attempted questions, the result is calculated immediately and is shown to the
user at the end of the test.
Technologies Used:
Software Requirements:
Apache.
MYSQL server.
Netbeans IDE.
PROBLEM STATEMENT
Problem statement is one of the basic and important phases of project phase. When the basic
problem is determined, it is documented and the symptomatic problem is analyzed, then the
current list of basic problem is completed. A system is simply a set of components that
interact to accomplish some purpose.
Examsuite is a software application which helps the students to learn and memorize learning
concepts .It saves the time of students by saving all the important questions in its database, so
that the student need not to go anywhere. Also this application provides an interface to users
to monitor their progress.
Requirement Analysis.
Requirement Specification.
Requirement Validation.
Requirement Analysis:
Requirement Analysis is a software engineering task that bridges the gap between system
level software allocation and software design. It provides the system engineer to specify
software function and performance, indicate softwares interface with the other system
elements and establish constraints that software must meet.
The basic aim of this stage is to obtain a clear picture of the needs and requirements of the
end-user and also the organization. Analysis involves interaction between the clients and the
analysis. Usually analysts research a problem by asking questions and reading existing
documents. The analysts have to uncover the real needs of the user even if they dont know
them clearly. During analysis it is essential that a complete and consistent set of
specifications emerge for the system. Here it is essential to resolve the contradictions that
could emerge from information got from various parties. This is essential to ensure that the
final specifications are consistent.
Problem recognition
Each Requirement analysis method has a unique point of view. However all analysis methods
are related by a set of operational principles. They are
The information domain of the problem must be represented and understood.
REQUIREMENTS SPECIFICATION
Specification Principles:
Diagrams and other notational forms should be restricted in number and consistent in use.
The software requirements specification is produced at the culmination of the analysis task.
The function and performance allocated to the software as a part of system engineering are
refined by establishing a complete information description, a detailed functional and
behavioral description, and indication of performance requirements and design constraints,
appropriate validation criteria and other data pertinent to requirements
SYSTEM DESIGN:
The system design is divided in to two portions : student section and admin section.
1.Admin
2.Student
A data flow diagram (DFD) is a graphical representation of the "flow of data through an
information system, modeling its process aspects. Often they are a preliminary step used to
create an overview of the system which can later be elaborated. DFDs can also be used for
the visualization of data processing (structured design).
A DFD shows what kind of information will be input to and output from the system, where
the data will come from and go to, and where the data will be stored. It does not show
information about the timing of processes, or
Information about whether processes will operate in sequence or in parallel.
Level 0
Add question
login
informat
Change password
admin
Update question
Delete question
Take test
student
View report
Register student
Entity Relationship Diagram
In software engineering, an entityrelationship model (ER model) is a data model for describing the
data or information aspects of a business domain or its process requirements. The main components of ER
models are entities (things) and the relationships that can exist among them.
Login Page:
Student Page:
AdminS Page:
Test Page:
DATABASE DESIGN
DATABASE DESIGN
Database Tables: The total number of database tables that were identified to build the system is 7. The major
part of the database is categorized as
1. Transactional components: The Transactional components are useful in recording the transactions made
by the system. Consignment bookings, material particulars, dealership requests and feedbacks etc.
2. Data Dictionary components: These components are used to store the major information like branch
details, employee details, deliveries, dispatches and receivers details etc.
3. General components: These components are used to store the general information like login information
etc.
DATA DICTIONARY
The logical characteristics of current systems data stores, including name, description, aliases, contents, and
organization. Identifies processes where the data are used and where immediate access to information needed.
Serves as the basis for identifying database requirements during system design.
Database Tables:
My_sub : contains the subject name and code of all the subjects present in the database.
ques :contains the list of all the questions along with their possible options, correct answer and subject id.
Result: the result of each test is stored here for future reference.
solnuser: the question id , test id ,answer submitted by the user and the correct answer are stored
subjectinfo: the subject and the corresponding test id is stored here.
Data Dictionary:
Admin Table :
Roll no Int 10
Login id Varchar 20
Password Varchar 20
My_sub Table :
Sub id Int 1
Sub_name Varchar 20
Ques Table:
Subid Int 1
Quesid Int 2
Result Table:
Field Name Data Type Size
Test_id Int 2
Correct_answer Int 2
Subject varchar 20
Soln_user table
Testid Int 2
Quesid Int 2
User table:
Roll_no Int 7
Password Varchar 20
Firstname Varchar 20
Lastname Varchar 20
Year Int 1
Gender Varchar 10
Ques table:
My_sub table:
Soln_user table:
User table:
Future Scope of the Project:
Software scope describes the data and control to be processed, function performances, constraints,
interfaces and reliability. This application can be easily implemented. Reusability is possible as and
when required by the system. We can add new features whenever required. There is flexibility in all
the modules.
References: