You are on page 1of 121

MCSP-044

ON LINE DEMAND EXAMINATION


By

Student’s Full Name


RAJBIR KAUR

Enrolment number
176594525

Under Guidence
Of

Counsellor’s Full Name

Mr.SAURABH VASHISTHA

Submitted to the School of Computer and Information


Sciences in partial fulfilment of the requirements
for the degree.

Masters
of
Computer Applications

Indira Gandhi National Open University

Maidan Garhi
New Delhi– 110068

1
PROFORMA OF PROJECT PROPOSAL
SCHOOL OF COMPUTER AND INFORMATION SCIENCES
IGNOU, MAIDAN GARHI, NEW DELHI – 110 068

PROFORMA FOR SUGGESTIONS OF MCS-044 PROJECT PROPOSAL

(Note: All entries of the proforma of suggestions should be filled in with


appropriate andcomplete information. Incomplete proforma of suggestions in
any respect will besummarily rejected.)

Enrolment No.: ………………………


Study Centre: ……………….……….
Regional Centre:……… RCCode:….
E-mail: ………….………..…………...
Telephone No.: ………………………

1. Name and Address of the student


………………………..…………………………………….
2. Title of the Project ……………..………..…………………………………………………….
3. Name and Address of the
Counsellor……..…………………………………………………….
Ph.D * M.Tech. * B.E */B.Tech. MCA * M.Sc.*

4. Educational Qualification of the Counsellor


(Attach bio-data also)
(*in Computer Science / IT only)

5. Working / Teaching experience of the Counsellor**


….………………………………………
6. Software used in the Project……………..
……………………………………………………...

Signature of the Student Signature of the Counsellor

………………………………. ………………………………..

2
CERTIFICATE OF ORIGINALITY

This is to certify that the project report entitled


____________________________________

submitted to Indira Gandhi National Open University in partial fulfilment of the


requirement
for the award of the degree of MASTER OF COMPUTER APPLICATIONS ( MCA) , is
an authentic and original work carried out by Mr. /
Ms.___________________________________
with enrolment no. _______________________under my guidance.
The matter embodied in this project is genuine work done by the student and has not
been
submitted whether to this University or to any other University / Institute for the fulfilment
of the
requirements of any course of study.

……………………… …………………………..

Signature of the student: Signature of the Guide :

……………………… …………………..….

Date :………………. Date : :……………………..

Name and address


Name ,designation and
Of The student:
Address of the Guide:
…………………………. ……………………………….

…………………………. …...……………………………..

………………………..… ………………………………….

…………………………… …………………………………….

Enrolment no:

………………

3
TABLES OF CONTENTS

Serial Topic Page

1 Introduction 1-4
 Background
 Objectives
 Limitation

2 System analysis 5-10


 SRS
 External interface
 Functional requirement
 Non-functional requirement
 Desin constraints

Module description 10-13


3  Basic module
 Integrity testing

4 Technologies 13-16
 Software requirement
 Hardware requirement
 Languages
 Backend

5 Graphical representation 16-18


 E-R diagrams
 DFD’S
 Data tables

6 Coding 19-24

7 Screen shots 25-32

8 Testing
 Introduction
 Software testing
 Test plan

9 Future scope

10 Conclusion

11 References

4
1. INTRODUCTION:-

“On Line Demand Examination” itself represent the


examination through the internet. This project will help the university/
Institution to evaluate the question have multiple option with one
correct answer.

This project contains two types of question viz.


subjective and objective. Students have to write the
descriptive answer for the subjective question will be randomly
generated. It would be evaluated automatically i.e. by this. This
project helps the management to conducting online examination and
save recourse.

The university/Institution can conduct the online examination and


announce the status or result in a few data. The examination
department is responsible for the marinating of question paper and it
would be completely secure.

5
2. OBJECTIVES:-

To provide an interface through which student can


appear for examination online for objective as well as
subjective type questions.

 To provide registration for students done by themselves.


 To not provide facility of copy and paste while attempting the
Subjective questions on the web page.
 When the student starts the exam the timer will start automatically
and show the student how much time is left.
 The questions will be display randomly from question bank.
 Objective answers will be checked automatically by the system from
the database
 For subjective answer manually checking by exam department will
take place.
 To provided user name and password facility and credentials should
be checked properly at the time of login for student ,expert, controller
and Exam Dept Admin.
 To provide an interface from where controller will create new Expert
and Admin for Exam Dept.
 The authority to modify the criteria is provided to the controller of
examination.

6
3 Limitation
1. In the case of any type of problem in student verification no
functionality is defined in the system to correct it or inter-
communication among users are also not available.

2. The Fees is taken manually as there is not any module for online
payment

3. The Total marks is get by the student only after some time of exam,
because in case of subjective paper, the exam dept will evaluate the
answer and declare the result. Student can see his result on internet
through his Login Id and PWD only after that.

7
2.SYSTEM
ANALYSIS

8
4 SYSTEM REQUIREMENTS
SYSTEM

A software requirements specification (SRS) is a detailed description of a software


system to be developed with its functional and non-functional requirements. ...
The software requirement specification document consistent of all
necessary requirements required for project development.

A software requirements specification is a description of a software system to be


developed. It is modeled after business requirements specification, also known as a
stakeholder requirements specification.

4.1 Introduction:-

The introduction of the Software Requirements Specification (SRS) provides an


overview of the entire SRS with purpose, scope, definitions, acronyms,
abbreviations, references and overview of the SRS. The aim of this document is
to gather and analyze and give an in-depth insight of the complete.

4.2 Purpose:-

This Web Application provides facility to online examination worldwide.It


saves time as it allowsnumber of students/candidates to give the exam
at same time and display the results at the end ofthe test,so there is no
need to wait for the result. It is evaluated and generated by the
server. Administrator has privileges to create, modify and delete the test
papers and its particularquestions.User can register, login and give
the test with hisspecific id, and can see the results aswell.Others can view
sample papers to learn the structure of online exams. Iteliminates the use
ofitems like pen, paper, etc.

9
4.3 Scope:-
Scope of this project is very broad compared to manually taken exams. They
are:-

 This app can be used in educational institutions as well as in corporate


world.
 Can be used anywhere any time as it is a web based application (user
location doesn’t matter).
 No restriction that examiner has to be present when the candidate takes
the test.
 No manual work of preparing and storing the result information.
 Less time consumption, as the result is calculated immediately after the
test and displayed to the student/candidate.
 For students/candidates, it saves time of going to far away centers to give
exams.

4.1 OVERALL DESCRIPTION :-

4.1.1 Product Perspective


OES is an on-line examination system. It is accessible via the Internet, 24 hours
a day, 7 days a week. The objective of this app is to reach and connect candidate and
examiner in remote communities and conduct exams in a virtual environment online.
This app will only allow the registered users to enter the test module. The various
stages in the app are as follows:-

 Login
 Result
 System Overview
 Test

Login :-

This window offers the user two choices for logging into the system according
to the preset privileges - Candidate login and Administrator login. The
candidate login will take the user to the user profile. The Administrator Login
will take the user to the administrator profile.

10
System Overview:

This window can only be accessed by the administrator. It allows the administrator to
add and edit exams.

Test:

This window contains all the exams candidate can give. All these exams are
organized according to the categories they fall in. The test window will be different
for students and corporate employees.

Result:

This window displays the result of exams the candidate has just appeared. This data
will be saved and displayed in the user profile. If the score is in top 10, the result will
also be displayed in the rankings area of result window.

4.1.2 Product Functions


The functions are divided according to the user types such as:-

 Administrator:-

The function of the administrator is to add/edit exams in the test module.

 Candidate:-

The function of the student is to update his/her profile and give various exams.

4.1.3 User Classes and Characteristics


The various users of this app are classified into two types:-

 Administrator
 Candidate
 Student
 Corporate Employees

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

11
2.1.4 Operating Environment :-.
This app is internet based so it will run in any operating system with internet access
through a web browser

4.2 Design Constraints :-

The candidate is allowed to give the exams any number of times, until specified

otherwise by the administrator while building the test. While giving the exam the

candidate is given only a set amount of time and the remaining time should be

displayed, after which the exam should close and display the result. The current

constraints on the project are related to the provision of hardware resources to

implement and test a high-performance cluster. At present, a network of four

Pentium- III workstations, with a 128 Mb RAM, serves as the cluster, with SGE

running on top of the Linux operating system. For better performance analysis, a

larger number of dedicated workstations would be beneficial.

For testing purposes, a simulating tool needs to be used which may have to be

specially designed if a generic one is not readily and freely available.

12
4.3 External Interface Requirements
1.1 User Interfaces

 Registration Screen:

Various fields available on this screen will be:

 Login Name
 Email Id
 Password
 Login Screen:

Fields available on this screen are:

 Login Name
 Password
 Entering Questions:

Various Fields are:

 Questions
 Options (4)
 Correct Answer

 Exam Details Screen:

Various Fields are:

 Exam Name
 No. Of Questions
 Time Limit
 Passing Marks

 Result Displaying Screen:

Various Fields are:

 No. Of Correct Questions


 No. Of Incorrect Questions
 Total Marks
 Result(Pass/Fail)

13
1.2 Hardware Interfaces
Screen resolution of at least 800X600 is required for proper and complete viewing of
screens. Higher resolution will be accepted.

1.3 Software Interfaces


-Any windows based operating system.

-MySql Server Database

-Php and javascript

1.4 Functional Requirements


This section gives a functional requirement that applicable to the On-Line Examination
system. There are three sub modules in this phase.

 Candidate module.
 Examiner module.
 Administrator module.
 Result rankings module
 Discussion Forum module

14
1.5 Behavior Requirement

Use Case Diagram

15
4.4 Non –functional requirements:-

Functionality

 The score of the response are automatically marked.


 The software supports multiple users simultaneously.

User friendliness

 The application should require minimum effort for users to operate (user friendly)

Platform independent

 This application is made using Java which is platform independent and


architectural neutral.

Hardware Requirement

 Processor - Pentium 4 and above Speed - 233 MHz and above Hard Disk - 10GB
RAM - 256MB 8

4.5 FEASIBILITY STUDY

1.1 Economical Feasibility :-

Economic analysis is most frequently used for evaluation of the effectiveness of the
system. More commonly known as cost/benefit analysis the procedure is to determine
the benefit and saving that are expected from system and compare them with costs,
decisions is made to design and implement the system. This part of feasibility study
gives the top management the economic justification for the new system. This is an
important input to the management the management because very often the top
management does not like to get confounded by the various technicalities that bound to
be associated with a project of this kind. A simple economic analysis that gives the
actual comparison of costs and benefits is much more meaningful in such cases. In the
system, the organization is most satisfied by economic feasibility. Because, if the
organization implements this system, it need not require any additional hardware
resources as well as it will be saving lot of time.

16
1.2 Technical Feasibility :-

Technical feasibility centers on the existing manual system of the test management
process and to what extent it can support the system. According to feasibility analysis
procedure the technical feasibility of the system is analyzed and the technical
requirements such as software facilities, procedure, inputs are identified. It is also one
of the important phases of the system development activities. The system offers greater
levels of user friendliness combined with greater processing

1.3 Operational Feasibility :-

Operational feasibility is the extent to which users are able to work with the system or
application. Owing to the user friendly nature of the system, users are very comfortable
to work use it.

1.4 SYSTEM PLANNING

Software Development Model or Methods :-

This project follows the Waterfall model or Classic Life Cycle which involves the
following steps;

 System Requirements

 Software Requirements
 Analysis
 Program Design
 Coding
 Testing
 Operations and maintenance

Main Activities of the Software (WBS-Work Breakdown Structure)

 Proposal Preparation
 Feasibility study and information gathering
 System Requirement Specification

17
 Designing of Database
 Programming and Coding
 Testing
 Implementation and operation
 Project Report Writing and Documentation

1.5 System Features

Some Performance requirements The software shall support use of multiple users at a
time.
 There are no other specific performance requirements that will affect development.
 The database shall be able to accommodate a minimum of 1,000 records of Users.

1.6 Safety and Security Requirements

Safety Requirements:-

The database may get crashed at any certain time due to virus or operating
system failure. Therefore, it is required to take the database backup.

Security Requirements:-

Some of the factors that are identified to protect the software from accidental or
malicious access, use, modification below. Keep specific log or history data sets
Assign certain functions to different modules

Software Quality Attributes:-

The Quality of the System is maintained in such a way so that it can be very user
friendly to all the users.
The software quality attributes are assumed as under:
 Accurate and hence reliable.
 Secured.
 Fast speed.
 Compatibility.

18
4.6 Problem Definition:-

The problem here is to develop a web application which completely automize the
examination process for an university. To perform this the complete problem has been
divided into five sub-problems so that they can be solved easily and after that can be
integrated to make it an integrated working application.

 Online Registration / Enrollment of Student


 Online Login
 Online Schedule
 Online Manage the question bank
 Online Examination
 Online Result declaration
 Online display randomly question.

 The questions will be display randomly from question bank.

At the Login module user name and password facilty and credentials should be
checked properly at the time of login for student,expert, controller and Exam Dept
Admin.

In the schedule Module send the exam schedule to the student.

In question bank module for the examination could be changed dynamically.


Automatic checking of objective answers and manual checking of descriptive answers
should be acilitated, if any.
In the Objective answers module will be checked automatically by the system from the
database and the subjective answer manually checking by exam department will take
place.

In the exam module When the student starts the exam the timer will start automatically
and show the student how much time is left.

At result module display the result of each student and send by the exam. Dept.

19
5. MODULES AND

DESCRIPTION

20
 BASIC MODULES

In Our Project with the help of ‘Divide and Conquer theory’ we can divide overall
program in Five Modules These five modules are:

.Login Module

.Student Module

.Exam Controller Module

.Exam Dept Module

.Expert Module

 LOGIN MODULE

This is the first module in this project a anyone who want to enter into this
project/application . he/she must have pass through this module, in other word we can
say that this is authentication module because the user authentication with his/her. To
provided user name and password facility and credentials should be checked properly
at the time of login for student ,expert, controller and Exam Dept Admin.

 STUDENT LOGIN FORM

This is the form in this project a student who want to enter into this project application.
he/she must have pass through this module, in other word we can say that this is
authentication module because the user authentication with his/her.

 REGISTRATION FORM

In this module student can get his/her whole information like his name, address, fees,
detail, program and courses. The user can select only one course at the time. Our
student table will register the student. University will provide each student a unique
student Id during enrollment time. The purpose of this is so that no one can register on
behalf of any other student. and only the student himself/herself can register for the
examination using this id as password. Students only submit his/her documents and
fees after the registration.

21
 VIEW SCHUDLE:-

In this schedule form student get his/her schedule according to his registration. The
schedule is managed by the exam dept.

 EXAM PROCESS

When the student starts the exam the timer will start automatically and show the
student how much time is left.

 SHOW RESULT

In the result form will manage the result(Subjective and Objective questions) and
Status of the student. This table contains the student id from which we will help us in
generating the result.

5.1 Exam Controller Module :


The controller has authority to modify the criteria is provided to the controller of
examination and provide an interface from where controller will create new Expert and
Admin for Exam Dept.

In this module the controller will Create, Delete and Edit, admin for the exam dept with all of
there details. A Login name and password has been provided through which the admin
can later login to perform all of there tasks.

 MANAGE EXPERT

In this module the controller will Create , Delete and Edit experts for they can later
send question sets for objective as well as subjective questions which will be asked to
solve to students under exam process. Sane as Manage Admin module, A Login
name and password has been provided hete too through which the expert can later
login to send questions.

22
 EXAMDEPT MODULE

In the exam dept will manage the question bank sent by experts and make schedule
and declare Result.

 Mangeschstud

In this form the exam dept. managed the schedule and sends to the student with
their exam dates. For this first he see all the details of registered students and allot
them date accordingly.

 Managequsbnk

This form is manage the subjective and objective question in the question bank sent by
the expert module. The Manage Question Bank . Managed the question will be display
randomly from question bank.

 checksubqus

This module checks the subjective question attempted by the student during the exam.
subjective answer manually checking by exam department will take place

 Declareresult

in this form the exam dept. manage the result and sends to the student when
they complete their exam. In the expert module the Experts to send a collection of
questions(objective and subjective) in Question Bank

23
5.2 Expert Module :
In the expert module the Experts to send a collection of questions(objective
and subjective) in Question Bank.

 Subjective question:-

SubQus table will contain Subjective question and it’s right answer. To not provide
facility of copy and paste while attempting the Subjective questions on the web
page.Here the iSubQusId is the primary key.

 Objective question:-

ObjQus table will contain objective question and four options and right answer.
Objective answers will be checked automatically by the system from the database. Here
the question id is the primary key.

24
6.TECHNOLOGIES
USED:-

25
6.1.1 SOFTWARE REQUIREMENT:-

Operating System : Windows-XP Professional Version 2002, service pack-


2, Microsoft IIS 5.0/6.0

Platform : .Net
Technology : Asp.net

Language : C#(C sharp)

Backend : SQL server 2007

Editor : Microsoft word processor 2000

For Development : visual studio .Net setup tools

For Design : HTML, Visual studio designer

For deployment, software’s used are :-

Operating system : Windows-xp professional

Version 2002, service pack-2

Framework : .Net 2005

IIS : Configured

Backend : sql server 2000

6.1.2 HARDWARE REQUIREMENTS:-

1. Pentium IV(dual core processor operating at 3.6 GHz)

2. 40GB hard disk

3. 1GB RAM
26
 For Deployment, Hardware’s used are :- MINIMUM
1. Pentium III or better processor

2. 10 GB hard disk

3. 256MB RAM

4. 10-100 MBPS of Network card

Recommended

1. Pentium IV

2. 20GB hard disk

3. 1GB RAM

4. 100-512 MBPS of network card

6.2 LANGUAGES:-

1.1About java:-

Java is a popular general-purpose programming language and computing platform.


It is fast, reliable, and secure. According to Oracle, the company that owns Java,
Java runs on 3 billion devices worldwide.Considering the number of Java
developers, devices running Java, and companies adapting it, it's safe to say that
Java will be around for many years to come.This guide will provide everything you
need to know about Java programming language before you learn it. More
specifically, you will learn about features of Java programming, its applications,
reasons to learn it, and how you can learn it the right way.

1.2 History of java:-


The history of Java is very interesting. ... Later, Java technology was incorporated by
Netscape. The principles for creating Java programming were "Simple, Robust, Portable,
Platform-independent, Secured, High Performance, Multithreaded, Architecture Neutral, Object-
Oriented, Interpreted and Dynamic".

27
1.3 Features of java:-

The primary objective of Java programming language creation was to make


it portable, simple and secure programming language. Apart from this,
there are also some excellent features which play an important role in the
popularity of this language. The features of Java are also known as
java buzzwords. A list of most important features of Java language is given
below.

1 Simple
2 Object-Oriented
3 Portable
4 Platform independent

5 Secured
6 Robust
7 Architecture neutral
8 Interpreted
9 High Performance
10 Multithreaded
11 Distributed
12 Dynamic

1.4 Java server pages:-

Java Server Pages (JSP) is a server-side programming technology that


enables the creation of dynamic, platform-independent method for building
Web-based applications. JSP have access to the entire family of Java
APIs, including the JDBC API to access enterprise databases. This tutorial
will teach you how to use Java Server Pages to develop your web
applications in simple and easy steps.

28
1.5 Features of JSP:-

 Extension to Servlet

 Powerful

 Portable

 Flexible

 Easy

 Extension to Servlet

 Easy to Read data from user

 No

 Easy to Maintain

1.6 Advantages of JSP:-

1. HTML friendly simple and easy language and tags.

2. Supports Java Code.

3. Supports standard Web site development tools.

1.7 Disadvantages of JSP:-

 As JSP pages are translated to servlets and compiled, it is difficult to


trace errors occurred in JSP pages.
 JSP pages require double the disk space to hold the JSP page.
 JSP pages require more time when accessed for the first time as
they are to be compiled on the server.

29
6.3 BACK END:-

This is the part of well known software package called as the Microsoft
Office. It is designed to built the various database, and to perform other
data work. SQL provides an extremely powerful, easy to use database
that will serve our needs when you required the power of fully relational
database. SQL is also helpful create a variety of database as well as how
to enter, edit and final data in existing database

SQL SERVER:-

SQL server 2007 utilities, such as backup and restore, run much faster and have less
effect on server operations. SQL Server 7.0 also includes a variety of new features
designed to support the underlying database architecture and to provide more flexible
system management. SQL Server also include a number of new features designed to
reduce database backup and recovery times. A different backup captures only those
data pages that have changed after the last database backup. Many times differential
backup can eliminates much of the time the server spends rolling transaction forward.
With SQL Server 7.0 a portion of the database can be restored or rolled forward to
minimize recovery time in the event of media failure. Restoring a backup is easy
because the restore process automatically creates the database and all the necessary
files. SQL server 7.0 supports backup to same tape media with other backup, such as
those written by the Microsoft Windows NT backup program.

30
7. GRAPHICAL
REPRESENTATION:-

31
7.1 Data flow diagram:-

Data flow diagram is graphical representation of flow of data in an


information system. It is capable of depicting incoming data flow, outgoing
data flow and stored data. The DFD does not mention anything about how
data flows through the system.

There is a prominent difference between DFD and Flowchart. The flowchart


depicts flow of control in program modules. DFDs depict flow of data in the
system at various levels

Types of DFD
Data Flow Diagrams are either Logical or Physical.

 Logical DFD - This type of DFD concentrates on the system process, and flow of
data in the system.For example in a Banking software system, how data is
moved between different entities.

 Physical DFD - This type of DFD shows how the data flow is actually
implemented in the system. It is more specific and close to the implementation.

DFD Components:-
DFD can represent Source, destination, storage and flow of data using the
following set of components –

 Entities - Entities are source and destination of information data. Entities are
represented by a rectangles with their respective names.

 Process - Activities and action taken on the data are represented by Circle or
Round-edged rectangles.

 Data Storage - There are two variants of data storage - it can either be
represented as a rectangle with absence of both smaller sides or as an open-
sided rectangle with only one side missing.

32
 Data Flow - Movement of data is shown by pointed arrows. Data movement is
shown from the base of arrow as its source towards head of the arrow as
destination.

Levels of DFD

 Level 0 - Highest abstraction level DFD is known as Level 0 DFD, which depicts
the entire information system as one diagram concealing all the underlying
details. Level 0 DFDs are also known as context level DFDs.

 Level 1 - The Level 0 DFD is broken down into more specific, Level 1 DFD. Level
1 DFD depicts basic modules in the system and flow of data among various
modules. Level 1 DFD also mentions basic processes and sources of information.

 Level 2 - At this level, DFD shows how data flows inside the modules mentioned
in Level 1.

Higher level DFDs can be transformed into more specific lower level DFDs with
deeper level of understanding unless the desired level of specification is
achieved.

Data flow diagram for online demand examination

33
1 STUDENT LOGIN FORM:

DFD:- CONTEXT LEVEL “0”

LEVEL “0”

34
DFD FOR 0-LEVEL

35
36
37
38
39
CLASS DIAGRAM

40
PROCESS LOGIN :-DATA FLOW DIAGRAM

Student login:-

2. COURSE :-

41
DFD FOR EXAMDEPT:-

7.2 Entity-Relationship
Model
Entity-Relationship model is a type of database model based on the notion of real
world entities and relationship among them. We can map real world scenario onto ER
database model. ER Model creates a set of entities with their attributes, a set of
constraints and relation among them.

ER (Entity relationship ) diagram displays the relationships of entity set stored


in a database. In other words, we can say that ER diagrams help you to
explain the logical structure of databases. At first look, an ER diagram looks
very similar to the flowchart. However, ER Diagram includes many
specialized symbols, and its meanings make this model unique.

History Of ER models
ER diagrams are a visual tool which is helpful to represent the ER model. It
was proposed by Peter Chen in 1971 to create a uniform convention which

42
can be used for relational database and network. He aimed to use an ER
model as a conceptual modeling approach

USE OF E-R DIAGRAMS

Here, are prime reasons for using the ER Diagram

 Helps you to define terms related to entity relationship modeling


 Provide a preview of how all your tables should connect, what fields are
going to be on each table
 Helps to describe entities, attributes, relationships
 ER diagrams are translatable into relational tables which allows you to
build databases quickly
 ER diagrams can be used by database designers as a blueprint for
implementing data in specific software applications
 The database designer gains a better understanding of the information to
be contained in the database with the help of ERP diagram
 ERD is allowed you to communicate with the logical structure of the database
to users

Components of the ER Diagram


This model is based on three basic concepts

 Entities
 Attributes
 Relationships

Model is best used for the conceptual design of database. ER Model can be represented as
follows :

43
Example

For example, in a University database, we might have entities for Students,


Courses, and Lecturers. Students entity can have attributes like Rollno,
Name, and DeptID. They might have relationships with Courses and
Lecturers.

44
Entity - An entity in ER Model is a real world being, which has some properties
called attributes. Every attribute is defined by its corresponding set of values,
called domain. An entity can be place, person, object, event or a concept, which stores
data in the database. The characteristics of entities are must have an attribute, and a
unique key. Every entity is made up of some 'attributes' which represent that entity.

For example, Consider a school database. Here, a student is an entity. Student has
various attributes like name, id, age and class etc.

Notation of an Entity

Entity set:
Student

An entity set is a group of similar kind of entities. It may contain entities with
attribute sharing similar values

 Relationship - The logical association among entities is called relationship.


Relationships are mapped with entities in various ways. Mapping cardinalities define the
number of associations between two entities.

45
For example:

 You are attending this lecture


 I am giving the lecture

Attributes
It is a single-valued property of either an entity-type or a relationship-type.

For example, a lecture might have attributes: time, date, duration, place, etc.

An attribute is represented by an Ellipse

46
Cardinality
Defines the numerical attributes of the relationship between two entities or
entity sets.

Different types of cardinal relationships are:

 One-to-One Relationships
 One-to-Many Relationships
 May to One Relationships
 Many-to-Many Relationships

.
47
E-R Diagram Notations
ER- Diagram is a visual representation of data that describe how data is
related to each other.

 Rectangles: This symbol represent entity types


 Ellipses : Symbol represent attributes
 Diamonds: This symbol represents relationship types
 Lines: It links attributes to entity types and entity types with other
relationship types
 Primary key: attributes are underlined
 Double Ellipses: Represent multi-valued attributes

48
49
Entity Relationship Diagram for On Line
Demand Examination :-

Due to lack of space attributes of each entities are shown individually as follows

50
51
Entity Relationship for online examination
system

52
GANTT CHART:-
Gantt chart are a project control technique that can be used for several purpose including
scheduling and planning. Gantt chart is also known bar chart with each box representing an
activity

53
PERT CHART:-
A pert chart is a network of boxes and arrows. The and ending dates for act
boxes in the pert chart can be decorated with starting. Pert stands for program evalution and
review techniques

54
8 Structure Charts:-
Structure chart is a chart derived from Data Flow Diagram. It represents the
system in more detail than DFD. It breaks down the entire system into
lowest functional modules, describes functions and sub-functions of each
module of the system to a greater detail than DFD.

Structure chart represents hierarchical structure of modules. At each layer a


specific task is performed.

Here are the symbols used in construction of structure charts -

 Module - It represents process or subroutine or task. A control module branches


to more than one sub-module. Library Modules are re-usable and invokable from

any module.

 Condition - It is represented by small diamond at the base of module. It depicts

that control module can select any of sub-routine based on some condition.

 Jump - An arrow is shown pointing inside the module to depict that the control

will jump in the middle of the sub-module.

 Loop - A curved arrow represents loop in the module. All sub-modules covered

by loop repeat execution of module.

 Data flow - A directed arrow with empty circle at the end represents data flow.

 Control flow - A directed arrow with filled circle at the end represents control
flow.

55
9 DESIGN PHASE OF THE
SDLC:-

These activities, or phases, usually include planning, analysis, design,


implementation, and maintenance/support. In other words, SDLC is a
conceptual model that guides project management in information system
development. System Development Life Cycle (SDLC) is a conceptual model
which includes policies and procedures for developing or altering systems
throughout their life cycles.

SDLC is used by analysts to develop an information system. SDLC includes


the following activities −

 requirements

 design

 implementation

 testing

 deployment

 operations

 maintenance

Phases of SDLC
Systems Development Life Cycle is a systematic approach which explicitly
breaks down the work into phases that are required to implement either
new or modified Information System.

56
Feasibility Study or Planning
 Define the problem and scope of existing system.

 Overview the new system and determine its objectives.

 Confirm project feasibility and produce the project Schedule.

 During this phase, threats, constraints, integration and security of system


are also considered.

 A feasibility report for the entire project is created at the end of this
phase.

57
Analysis and Specification
 Gather, analyze, and validate the information.

 Define the requirements and prototypes for new system.

 Evaluate the alternatives and prioritize the requirements.

 Examine the information needs of end-user and enhances the system


goal.

 A Software Requirement Specification (SRS) document, which specifies


the software, hardware, functional, and network requirements of the
system is prepared at the end of this phase.

System Design
 Includes the design of application, network, databases, user interfaces,
and system interfaces.

 Transform the SRS document into logical structure, which contains


detailed and complete set of specifications that can be implemented in a
programming language.

 Create a contingency, training, maintenance, and operation plan.

 Review the proposed design. Ensure that the final design must meet the
requirements stated in SRS document.

 Finally, prepare a design document which will be used during next


phases.

Implementation
 Implement the design into source code through coding.

 Combine all the modules together into training environment that detects
errors and defects.

 A test report which contains errors is prepared through test plan that
includes test related tasks such as test case generation, testing criteria,
and resource allocation for testing.

58
 Integrate the information system into its environment and install the new
system.

Maintenance/Support
 Include all the activities such as phone support or physical on-site
support for users that is required once the system is installing.

 Implement the changes that software might undergo over a period of


time, or implement any new requirements after the software is deployed
at the customer location.

 It also includes handling the residual errors and resolve any issues that
may exist in the system even after the testing phase.

 Maintenance and support may be needed for a longer time for large
systems and for a short time for smaller systems.

Life Cycle of System Analysis and Design

The following diagram shows the complete life cycle of the system during
analysis and design phase.

59
10. Systems Design
Systems design is the process of defining the architecture, modules, interfaces, and
data for a system to satisfy specified requirements. Systems design could be seen as
the application of systems theory to product development.

Output Design
The design of output is the most importanttask of any system. During
output design, developers identify the type of outputs needed, and consider
the necessary output controls and prototype report layouts.

Objectives of Output Design


The objectives of input design are −

 To develop output design that serves the intended purpose and


eliminates the production of unwanted output.

 To develop the output design that meets the end users requirements.

60
 To deliver the appropriate quantity of output.

 To form the output in appropriate format and direct it to the right person.

 To make the output available on time for making good decisions.

Let us now go through various types of outputs −

External Outputs
Manufacturers create and design external outputs for printers. External
outputs enable the system to leave the trigger actions on the part of their
recipients or confirm actions to their recipients.

Some of the external outputs are designed as turnaround outputs, which


are implemented as a form and re-enter the system as an input.

Internal outputs
Internal outputs are present inside the system, and used by end-users and
managers. They support the management in decision making and reporting.

There are three types of reports produced by management information −

 Detailed Reports − They contain present information which has almost


no filtering or restriction generated to assist management planning and
control.

 Summary Reports − They contain trends and potential problems which


are categorized and summarized that are generated for managers who
do not want details.

 Exception Reports − They contain exceptions, filtered data to some


condition or standard before presenting it to the manager, as
information.

Input Design
In an information system, input is the raw data that is processed to produce
output. During the input design, the developers must consider the input
devices such as PC, MICR, OMR, etc.

61
Therefore, the quality of system input determines the quality of system
output. Well designed input forms and screens have following properties −

 It should serve specific purpose effectively such as storing, recording,


and retrieving the information.

 It ensures proper completion with accuracy.

 It should be easy to fill and straightforward.

 It should focus on user’s attention, consistency, and simplicity.

 All these objectives are obtained using the knowledge of basic design
principles regarding −

o What are the inputs needed for the system?

o How end users respond to different elements of forms and screens.

Objectives for Input Design


The objectives of input design are −

 To design data entry and input procedures

 To reduce input volume

 To design source documents for data capture or devise other data


capture methods

 To design input data records, data entry screens, user interface screens,
etc.

 To use validation checks and develop effective input controls.

Data Input Methods


It is important to design appropriate data input methods to prevent errors
while entering data. These methods depend on whether the data is entered

62
by customers in forms manually and later entered by data entry operators,
or data is directly entered by users on the PCs.

A system should prevent user from making mistakes by −

 Clear form design by leaving enough space for writing legibly.

 Clear instructions to fill form.

 Clear form design.

 Reducing key strokes.

 Immediate error feedback.

Some of the popular data input methods are −

 Batch input method (Offline data input method)

 Online data input method

 Computer readable forms

 Interactive data input

7.3 Database tables :

1 STUDENT DATABASE TABLE:-

S.no . Field name Data types Length constrain


1 Ent.num Int 14 Primary key
2 Fname Varchar 50 Not null
3 Lname Varchar 50 Not null
4 C.adress Varchar 50 Not null
5 C.no. Int 10 Not null
6 Age Int 3 Not null
7 Gender Varchar 10 Not null
8 Email Varchar 30 Not null
9 Password Varchar 30 Not null
10 C password Varchar 30 Not null
11 DOB Date 10 Not null
12 Username Varchar 50 Not null

63
2 ADD QUESTION DATABASE:-

S.no. Field name Data type Length Constrain


1 Quid(PK) Int 9 Primary key
2 Question varchar 50
3 Option 1 varchar 50
4 Option 2 varchar 50
5 Option 3 varchar 50
6 Option 4 varchar 50
7 Paragraph ans varchar 800

3 LOGIN DATABASE TABLE:-

S.no. Field name Data type Length


1 User name varchar 50
2 Password Varchar 50
3 Employee ID VarChar 45
4 Security Question VarChar 45
5 Security Answer VarChar 45
6 Role Date 20

4 MARKING DATABASE TABLE:-

S.no. Field name Data type Length


1 Qid Int 9
2 User name Varchar 50
3 NR question Int 9
4 NW question Int 9
5 Tmark Int 9

64
5 RESULT DATABASE TABLE:-

S.no. Field name Data type Length Constrain


1 Ent.roll Varchar 50 Primary key
2 User name Varchar 50
3 Course Varchar 10
4 Batch Varchar 10
5 Paper name Varchar 10
6 Tmark Int 10
7 Percentage Int 10
8 No.right Int 10
9 No.wrong Int 10
10 Date Date time 10

6 COURSE DATABASE TABLE:-

S.no. Field name Data type Length Constrain


1 Course ID VarChar 10 Primary key
2 Course Name VarChar 45 Not Null
3 Course Description VarChar 45 Not Null
4 Number of Terms Int 3 Not Null

7 EXAMINER TABLE :-

S.no Field name Data type Length Constrain


1 Employee ID VarChar 10 Primary Key
2 First Name VarChar 45 Not Null
3 Middle Name VarChar 45 Null
4 Last Name VarChar 45 Not Null
5 Gender VarChar 6 Not Null
6 Date of Birth Date 20 Not Null
7 Email VarChar 45 Not Null
8 Mobile 1 VarChar 10 Not Null
9 Mobile 2 VarChar 10 Not Null
10 Category VarChar 45 Not Null
11 Department ID VarChar 10 Not Null

65
8 SUBJECT TABLE:-

S. No Filed Name Data Type Length Constrain/Re


marks
1 Subject ID VarChar 10 Primary Key
2 Subject Name VarChar 20 Not Null
3 Course ID VarChar 10 Not Null
4 Term VarChar 5 Not Null
5 Subject type VarChar 45 Not Null

9 TESTING SCHUDLING TABLE :-

S. No Filed Name Data Type Length Constrain/Re


marks
1 Test ID VarChar 10 Primary Key
2 Course ID VarChar 10 Not Null
3 Subject ID VarChar 10 Not Null
4 Is Active Int 1 Not Null
5 Generated By VarChar 45 Not Null

10 TESTING SETTING TABLE:-

S. No Filed Name Data Type Length Constrain/Re


marks
1 Test ID VarChar 10 Primary Key
2 One Mark Int 3 Not Null
3 Two Marks Int 3 Not Null
4 Four Marks Int 3 Not Null
5 Five Marks Int 3 Not Null
6 Minimum Int 3 Not Null
Passing Marks

66
8 CODING

67
Back End
MySQL 5.0 was used as back end

Database Source Code


-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.45-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE,
SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
--
-- Create schema testing
--
CREATE DATABASE IF NOT EXISTS testing;
USE testing;
--
-- Definition of table `course`
--
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
`CourseID` varchar(10) NOT NULL,

30 `CourseName` varchar(45) NOT NULL,


`CourseDescription` varchar(45) NOT NULL,
`NoOfTerms` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`CourseID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `course`
--
/*!40000 ALTER TABLE `course` DISABLE KEYS */;
INSERT INTO `course` (`CourseID`,`CourseName`,`CourseDescription`,`NoOfTerms`) VALUES
('CID1000000','ICT','General Knowledge in IT',3),
('CID1000001','Science','Grammar ',3),
('CID1000002','Home Economics','Sets and Operation',3),
('CID1000003','History','History of Ghana',3);
/*!40000 ALTER TABLE `course` ENABLE KEYS */;
--
-- Definition of table `department`
--

68
DROP TABLE IF EXISTS `department`;
CREATE TABLE `department` (
`DepartmentID` varchar(10) NOT NULL,
`Name` varchar(45) NOT NULL,
`DepartmentHead` varchar(45) NOT NULL,
`OfficeLine1` varchar(45) NOT NULL,
`Officeline2` varchar(45) default NULL,
PRIMARY KEY (`DepartmentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `department`
--
/*!40000 ALTER TABLE `department` DISABLE KEYS */;
31

69
INSERT INTO `department`
(`DepartmentID`,`Name`,`DepartmentHead`,`OfficeLine1`,`Officeline2`)
VALUES
('DEP1000001','Science','Joseph Arhin','0123456789','0123456789'),
('DEP1000002','Mathematics','Wisdom Ahiabley','0247895623',NULL),
('DEP1000003','ICT','Joseph Arlloh','0233698547',NULL),
('DEP1000004','Home Economics','Lydia Adu Gyamfi','0245874521',NULL),
('DEP1000005','General Arts','James Arthur','0247951357',NULL);
/*!40000 ALTER TABLE `department` ENABLE KEYS */;
--
-- Definition of table `employee`
--
DROP TABLE IF EXISTS `employee`;
CREATE TABLE `employee` (
`EmployeeID` varchar(10) NOT NULL,
`FirstName` varchar(45) NOT NULL,
`MiddleName` varchar(45) default NULL,
`LastName` varchar(45) NOT NULL,
`Gender` varchar(6) NOT NULL,
`DOB` date NOT NULL,
`Email` varchar(45) NOT NULL,
`Mobile1` varchar(10) NOT NULL,
`Mobile2` varchar(10) default NULL,
`Category` varchar(45) NOT NULL,
`DepartmentID` varchar(10) NOT NULL,
`Photo` blob,
PRIMARY KEY (`EmployeeID`),
KEY `FK_employee_1` (`DepartmentID`),
CONSTRAINT `FK_employee_1` FOREIGN KEY (`DepartmentID`)
REFERENCES `department` (`DepartmentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `employee`
--
/*!40000 ALTER TABLE `employee` DISABLE KEYS */; 32

70
INSERT INTO `employee`
(`EmployeeID`,`FirstName`,`MiddleName`,`LastName`,`Gender`,`DOB`,`Email`,`Mobile1`,`Mobile
2`,`Category`,`DepartmentID`,`Photo`) VALUES
('EID1000000','Joseph ','HG','Arhin','Male','1960-01-
01','arhin@gmail.com','0241478102',NULL,'Senior Staff','DEP1000001',NULL),
('EID1000001','Joseph',NULL,'Arlloh','Male','1965-02-
02','profarlloh@yahoo.com','0245856309',NULL,'Senior Staff','DEP1000003',NULL),
('EID1000002','Wisdom',NULL,'Ahiabley','Male','1974-03-
03','wisdy@yahoo.com','0247954751',NULL,'Senior Staff','DEP1000002',NULL),
('EID1000003','Lydia','Adu','Gyamfi','Female','1975-07-
07','mamalee@yahoo.com','0263541021',NULL,'Senior Staff','DEP1000004',NULL),
('EID1000004','James',NULL,'Arthur','Male','1968-08-
08','jamesarthur@yahoo.com','0206747488',NULL,'Senior Staff','DEP1000005',NULL);
/*!40000 ALTER TABLE `employee` ENABLE KEYS */;
--
-- Definition of table `login`
--
DROP TABLE IF EXISTS `login`;
CREATE TABLE `login` (
`LogInID` varchar(10) NOT NULL,
`EmployeeID` varchar(10) NOT NULL,
`Password` varchar(45) NOT NULL,
`SecurityQuestion` varchar(45) NOT NULL,
`SecurityAnswer` varchar(45) NOT NULL,
`Role` varchar(45) NOT NULL,
PRIMARY KEY (`LogInID`),
KEY `FK_login_1` (`EmployeeID`),
CONSTRAINT `FK_login_1` FOREIGN KEY (`EmployeeID`) REFERENCES `employee`
(`EmployeeID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `login`
--
/*!40000 ALTER TABLE `login` DISABLE KEYS */; 33

71
INSERT INTO `login`
(`LogInID`,`EmployeeID`,`Password`,`SecurityQuestion`,`SecurityAnswer`,`Role`) VALUES
('LID1000000','EID1000000','kojo','Where did you meet your spouse?','church','Employee'),
('LID1000001','EID1000001','kojo','What is your mother\'s maiden name?','Rose','Employee'),
('LID1000002','EID1000002','kojo','Where did you meet your spouse?','Library','Employee'),
('LID1000003','EID1000003','kojo','Where did you meet your spouse?','Bus','Employee'),
('LID1000005','EID1000004','kojo','What is your mother\'s maiden name? ','Ama','Employee');
/*!40000 ALTER TABLE `login` ENABLE KEYS */;
--
-- Definition of table `question`
--
DROP TABLE IF EXISTS `question`;
CREATE TABLE `question` (
`QuestionID` varchar(10) NOT NULL,
`Question` varchar(50) NOT NULL,
`Option1` varchar(45) NOT NULL,
`Option2` varchar(45) NOT NULL,
`Option3` varchar(45) NOT NULL,
`Option4` varchar(45) NOT NULL,
`Answer` varchar(45) character set latin1 collate latin1_bin NOT NULL,
`Marks` varchar(45) NOT NULL,
`SubjectID` varchar(45) NOT NULL,
`LessonNo` varchar(45) NOT NULL,
`QuestionExplanation` varchar(45) default NULL,
PRIMARY KEY (`QuestionID`),
KEY `FK_question_1` (`SubjectID`),
CONSTRAINT `FK_question_1` FOREIGN KEY (`SubjectID`) REFERENCES `subject`
(`SubjectID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `question`
--
/*!40000 ALTER TABLE `question` DISABLE KEYS */; 34

72
INSERT INTO `question`
(`QuestionID`,`Question`,`Option1`,`Option2`,`Option3`,`Option4`,`Answer`,`Marks`,`SubjectID`,`L
essonNo`,`QuestionExplanation`) VALUES
('QUE1000000','Who is SADIC ','IT GURU','administrator','Reverse Only Memory','Return Often
Memory',0x31,'2','SUB1000000','14',''),
('QUE1000010','hi','A','B','C','D',0x32,'1','SUB1000000','1','hi'),
('QUE1000011','The acronymn RAM stands for ','Random Access Memory','Read Access
Memory','Reverse Access Memory','Readable Access Memory',0x31,'1','SUB1000000','1','hi'),
('QUE1000012','The acronymn RAM stands for ','Random Access Memory','Read Access
Memory','Reverse Access Memory','Readable Access Memory',0x31,'1','SUB1000000','4','hi'),
('QUE1000013','The acronymn RAM stands for ','Random Access Memory','Read Access
Memory','Reverse Access Memory','Readable Access Memory',0x31,'1','SUB1000000','4','hi'),
('QUE1000014','What is the use of the monitor
','typing','displaying','inputting','scanning',0x32,'2','SUB1000000','5','hi'),
('QUE1000015','CPU stands for ','Central Processing
Unit','jjjj','lll','ffff',0x31,'2','SUB1000000','6','hi'),
('QUE1000016','SAMMY ','KOJO','YAW','MANSA','ABU',0x32,'2','SUB1000000','7',''),
('QUE1000017','Mahendra is a good person','ama','grace','Mat','go',0x32,'2','SUB1000000','8',''),
('QUE1000018','F','F','F','F','F',0x34,'2','SUB1000000','1','F'),
('QUE1000019','Which among the following is an output device','Printer','Mouse','System
Unit','Keyboard',0x32,'2','SUB1000000','10',''),
('QUE1000020','The fastest printer among the following is ','Inkjet','Laserjet','Epson
Workforce','Maxima',0x31,'2','SUB1000000','11',''),
('QUE1000021','What does the acronymn ROM stands for','Random Only Memory','Read Only
Memory','Reverse Only Memory','Return Often Memory',0x31,'2','SUB1000000','1','');
/*!40000 ALTER TABLE `question` ENABLE KEYS */;
--
-- Definition of table `registration`
--
DROP TABLE IF EXISTS `registration`;
CREATE TABLE `registration` (
`RegistrationID` varchar(10) NOT NULL,
`StudentID` varchar(10) NOT NULL,
`CourseID` varchar(10) NOT NULL, 35

73
`RegisteredDate` date NOT NULL,
`Class` varchar(5) NOT NULL,
PRIMARY KEY (`RegistrationID`),
KEY `FK_registration_1` (`StudentID`),
KEY `FK_registration_2` (`CourseID`),
CONSTRAINT `FK_registration_1` FOREIGN KEY (`StudentID`) REFERENCES `student`
(`StudentID`),
CONSTRAINT `FK_registration_2` FOREIGN KEY (`CourseID`) REFERENCES `course`
(`CourseID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `registration`
--
/*!40000 ALTER TABLE `registration` DISABLE KEYS */;
INSERT INTO `registration` (`RegistrationID`,`StudentID`,`CourseID`,`RegisteredDate`,`Class`)
VALUES
('RID1000000','SID1000000','CID1000000','2015-10-15','3A'),
('RID1000001','SID1000001','CID1000001','2015-10-15','3B'),
('RID1000002','SID1000002','CID1000002','2015-10-15','3A'),
('RID1000003','SID1000003','CID1000003','0201-10-15','3B');
/*!40000 ALTER TABLE `registration` ENABLE KEYS */;
--
-- Definition of table `result`
--
DROP TABLE IF EXISTS `result`;
CREATE TABLE `result` (
`ResultID` varchar(10) NOT NULL,
`TestID` varchar(45) NOT NULL,
`TotalMarks` varchar(45) NOT NULL,
`ObtainMarks` varchar(45) NOT NULL,
`StudentID` varchar(45) NOT NULL,
`TestingDate` date NOT NULL,
PRIMARY KEY (`ResultID`),
KEY `FK_result_1` (`TestID`),
KEY `FK_result_2` (`StudentID`), 36

74
CONSTRAINT `FK_result_1` FOREIGN KEY (`TestID`) REFERENCES `test_settings` (`TestID`),
CONSTRAINT `FK_result_2` FOREIGN KEY (`StudentID`) REFERENCES `student`
(`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `result`
--
/*!40000 ALTER TABLE `result` DISABLE KEYS */;
/*!40000 ALTER TABLE `result` ENABLE KEYS */;
--
-- Definition of table `student`
--
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
`StudentID` varchar(10) NOT NULL,
`FirstName` varchar(45) NOT NULL,
`MiddleName` varchar(45) default NULL,
`LastName` varchar(45) NOT NULL,
`Gender` varchar(25) NOT NULL,
`DOB` varchar(20) NOT NULL,
`Email` varchar(20) default NULL,
`Nationality` varchar(20) NOT NULL,
`ParentName_Guardian` varchar(45) NOT NULL,
`Town` varchar(45) NOT NULL,
`HouseNumber` varchar(10) NOT NULL,
`Mobile1` varchar(10) NOT NULL,
`Mobile2` varchar(10) default NULL,
`AdmissionDate` varchar(20) NOT NULL,
PRIMARY KEY (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `student`
-- 37

75
/*!40000 ALTER TABLE `student` DISABLE KEYS */;
INSERT INTO `student`
(`StudentID`,`FirstName`,`MiddleName`,`LastName`,`Gender`,`DOB`,`Email`,`Nationality`,`Parent
Name_Guardian`,`Town`,`HouseNumber`,`Mobile1`,`Mobile2`,`AdmissionDate`) VALUES
('SID1000000','Samuel ','','Anyimah','Male','23/12/1985','samanyimah@gmail.com','Ghanaian','Mr.
Anthony Essel','Prestea','WC 4/13','0246244662','0206488747','01/11/2014'),
('SID1000001','Isaac ','','Essel','Male','26/03/1995','ikessel@yahoo.com','Ghanaian','Mr. Elizaphan
Essel','Tarkwa','EA 2/23','0245123456',NULL,'01/11/2013'),
('SID1000002','Anthoniette
','Afia','Assan','Female','05/07/1986','anthoassan@yahoo.com','Ghanaian','Mr. Enock
Assan','Nanako','MD 34','0249883692',NULL,'01/11/2014'),
('SID1000003','Kojo ','','Owusu','Male','14/05/1984','kowusu@gmail.com','Ghanaian','Mrs. Charlotte
Anyimah','Agona Nsaba','AH 87','0201456987',NULL,'01/12/2014'),
('SID1000004','Grace
','Adjoaba','Boadi','Female','03/06/1987','graceboadi@gmail.com','Ghanaian','Mr. Kofi
Boadi','Sunyani','BL 4','0249885524',NULL,'01/11/2014'),
('SID1000005','Sadic','Ibn','Abubakar','Male','17/11/1985','olando2@yahoo.com','Ghanaian','Omar
Abu','Bolga','BC 8','0205847147',NULL,'01/11/2013'),
('SID1000006','KWAKU','','MAU','Male','23/11/1985',NULL,'GHANAIAN','KANKUZINI','WIAW
SO','WO 14','0247396852','','01/11/2013'),
('SID1000007','Sadic','Ibn','Abubakar','Male','17/11/1985','olando2@yahoo.com','Ghanaian','Omar
Abu','Bolga','BC 8','0205847147','','01/11/2013'),
('SID1000008','Samuel ','','Anyimah','Male','23/12/1985','samanyimah@gmail.com','Ghanaian','Mr.
Anthony Essel','Prestea','WC 4/13','0246244662','0206488747','01/11/2014'),
('SID1000009','Samuel ','','Anyimah','Male','23/12/1985','samanyimah@gmail.com','Ghanaian','Mr.
Anthony Essel','Prestea','WC 4/13','0246244662','0206488747','01/11/2014'),
('SID1000010','KWAKU','','MAU','Male','23/11/1985','','GHANAIAN','KANKUZINI','WIAWSO','W
O 14','0247396852','','01/11/2013'),
('SID1000011','Elizaphan','Abena','Essel','Female','08/09/2015','eliza@gmail.com','Ghanaian','Samuel
Anyimah','Aboso','WC 4/13','0246244662','0206488747','01/11/2014'), 38

76
('SID1000012','Jonathan','Kobina','Yankson','Male','09/06/1965','biobio@gmail.com','Ghanaian','Mr.
Anthony Essel','Eikwe','BN 5/6','0246852147','0206488747','01/11/2013'),
('SID1000013','Isaac ','Kwame','Essel','Male','26/03/1995','ikessel@yahoo.com','Ghanaian','Mr.
Elizaphan Essel','Tarkwa','EA 2/23','0245123456','','01/11/2013'),
('SID1000014','Collins','Opoku','Ampofo','Male','23/12/1985','colopo@gmail.com','Ghanaian','Mr.
Jacob Opoku Ampofo','Kumasi','HV 14/45','0254789635','0547856321','01/11/2015');
/*!40000 ALTER TABLE `student` ENABLE KEYS */;
--
-- Definition of table `subject`
--
DROP TABLE IF EXISTS `subject`;
CREATE TABLE `subject` (
`SubjectID` varchar(10) NOT NULL,
`SubjectName` varchar(45) NOT NULL,
`CourseID` varchar(10) NOT NULL,
`Terms` varchar(20) NOT NULL,
`SubjectType` varchar(45) NOT NULL,
PRIMARY KEY (`SubjectID`),
KEY `FK_subject_1` (`CourseID`),
CONSTRAINT `FK_subject_1` FOREIGN KEY (`CourseID`) REFERENCES `course`
(`CourseID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `subject`
--
/*!40000 ALTER TABLE `subject` DISABLE KEYS */;
INSERT INTO `subject` (`SubjectID`,`SubjectName`,`CourseID`,`Terms`,`SubjectType`) VALUES
('STID100000','Information and Communication Technology','CID1000000','3','Knowledge in ICT'),
('STID100001','Physics','CID1000001','3','Waves and Motion'),
('SUB1000000','English','CID1000002','1','Grammar');
/*!40000 ALTER TABLE `subject` ENABLE KEYS */; 39

77
--
-- Definition of table `test_settings`
--
DROP TABLE IF EXISTS `test_settings`;
CREATE TABLE `test_settings` (
`TestID` varchar(10) NOT NULL,
`OneMark` tinyint(3) unsigned NOT NULL,
`TwoMarks` tinyint(3) unsigned NOT NULL,
`FourMarks` tinyint(3) unsigned NOT NULL,
`FiveMarks` tinyint(3) unsigned NOT NULL,
`TotalMarks` tinyint(3) unsigned NOT NULL,
`Min_PassingMarks` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`TestID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `test_settings`
--
/*!40000 ALTER TABLE `test_settings` DISABLE KEYS */;
/*!40000 ALTER TABLE `test_settings` ENABLE KEYS */;
--
-- Definition of table `testing_schedule`
--
DROP TABLE IF EXISTS `testing_schedule`;
CREATE TABLE `testing_schedule` (
`TestID` varchar(10) NOT NULL,
`CourseID` varchar(45) NOT NULL,
`SubjectID` varchar(45) NOT NULL,
`Class` varchar(45) NOT NULL,
`Is_Active` tinyint(1) NOT NULL,
`Generated_By` varchar(45) NOT NULL,
PRIMARY KEY (`TestID`),
KEY `FK_testing_schedule_1` (`CourseID`),

30 `CourseName` varchar(45) NOT NULL,


`CourseDescription` varchar(45) NOT NULL,
`NoOfTerms` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`CourseID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `course`
--
/*!40000 ALTER TABLE `course` DISABLE KEYS */;
INSERT INTO `course` (`CourseID`,`CourseName`,`CourseDescription`,`NoOfTerms`) VALUES
('CID1000000','ICT','General Knowledge in IT',3),
('CID1000001','Science','Grammar ',3),
('CID1000002','Home Economics','Sets and Operation',3),
('CID1000003','History','History of Ghana',3);
/*!40000 ALTER TABLE `course` ENABLE KEYS */;
--
78
-- Definition of table `department`
--
DROP TABLE IF EXISTS `department`;
CREATE TABLE `department` (
`DepartmentID` varchar(10) NOT NULL,
`Name` varchar(45) NOT NULL,
`DepartmentHead` varchar(45) NOT NULL,
`OfficeLine1` varchar(45) NOT NULL,
`Officeline2` varchar(45) default NULL,
PRIMARY KEY (`DepartmentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `department`
--
/*!40000 ALTER TABLE `department` DISABLE KEYS */; 31

79
INSERT INTO `department`
(`DepartmentID`,`Name`,`DepartmentHead`,`OfficeLine1`,`Officeline2`) VALUES
('DEP1000001','Science','Joseph Arhin','0123456789','0123456789'),
('DEP1000002','Mathematics','Wisdom Ahiabley','0247895623',NULL),
('DEP1000003','ICT','Joseph Arlloh','0233698547',NULL),
('DEP1000004','Home Economics','Lydia Adu Gyamfi','0245874521',NULL),
('DEP1000005','General Arts','James Arthur','0247951357',NULL);
/*!40000 ALTER TABLE `department` ENABLE KEYS */;
--
-- Definition of table `employee`
--
DROP TABLE IF EXISTS `employee`;
CREATE TABLE `employee` (
`EmployeeID` varchar(10) NOT NULL,
`FirstName` varchar(45) NOT NULL,
`MiddleName` varchar(45) default NULL,
`LastName` varchar(45) NOT NULL,
`Gender` varchar(6) NOT NULL,
`DOB` date NOT NULL,
`Email` varchar(45) NOT NULL,
`Mobile1` varchar(10) NOT NULL,
`Mobile2` varchar(10) default NULL,
`Category` varchar(45) NOT NULL,
`DepartmentID` varchar(10) NOT NULL,
`Photo` blob,
PRIMARY KEY (`EmployeeID`),
KEY `FK_employee_1` (`DepartmentID`),
CONSTRAINT `FK_employee_1` FOREIGN KEY (`DepartmentID`) REFERENCES `department`
(`DepartmentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `employee`
--
/*!40000 ALTER TABLE `employee` DISABLE KEYS */; 32

80
INSERT INTO `employee`
(`EmployeeID`,`FirstName`,`MiddleName`,`LastName`,`Gender`,`DOB`,`Email`,`Mobile1`,`Mobile
2`,`Category`,`DepartmentID`,`Photo`) VALUES
('EID1000000','Joseph ','HG','Arhin','Male','1960-01-
01','arhin@gmail.com','0241478102',NULL,'Senior Staff','DEP1000001',NULL),
('EID1000001','Joseph',NULL,'Arlloh','Male','1965-02-
02','profarlloh@yahoo.com','0245856309',NULL,'Senior Staff','DEP1000003',NULL),
('EID1000002','Wisdom',NULL,'Ahiabley','Male','1974-03-
03','wisdy@yahoo.com','0247954751',NULL,'Senior Staff','DEP1000002',NULL),
('EID1000003','Lydia','Adu','Gyamfi','Female','1975-07-
07','mamalee@yahoo.com','0263541021',NULL,'Senior Staff','DEP1000004',NULL),
('EID1000004','James',NULL,'Arthur','Male','1968-08-
08','jamesarthur@yahoo.com','0206747488',NULL,'Senior Staff','DEP1000005',NULL);
/*!40000 ALTER TABLE `employee` ENABLE KEYS */;
--
-- Definition of table `login`
--
DROP TABLE IF EXISTS `login`;
CREATE TABLE `login` (
`LogInID` varchar(10) NOT NULL,
`EmployeeID` varchar(10) NOT NULL,
`Password` varchar(45) NOT NULL,
`SecurityQuestion` varchar(45) NOT NULL,
`SecurityAnswer` varchar(45) NOT NULL,
`Role` varchar(45) NOT NULL,
PRIMARY KEY (`LogInID`),
KEY `FK_login_1` (`EmployeeID`),
CONSTRAINT `FK_login_1` FOREIGN KEY (`EmployeeID`) REFERENCES `employee`
(`EmployeeID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `login`
--
/*!40000 ALTER TABLE `login` DISABLE KEYS */; 33

81
INSERT INTO `login`
(`LogInID`,`EmployeeID`,`Password`,`SecurityQuestion`,`SecurityAnswer`,`Role`) VALUES
('LID1000000','EID1000000','kojo','Where did you meet your spouse?','church','Employee'),
('LID1000001','EID1000001','kojo','What is your mother\'s maiden name?','Rose','Employee'),
('LID1000002','EID1000002','kojo','Where did you meet your spouse?','Library','Employee'),
('LID1000003','EID1000003','kojo','Where did you meet your spouse?','Bus','Employee'),
('LID1000005','EID1000004','kojo','What is your mother\'s maiden name? ','Ama','Employee');
/*!40000 ALTER TABLE `login` ENABLE KEYS */;
--
-- Definition of table `question`
--
DROP TABLE IF EXISTS `question`;
CREATE TABLE `question` (
`QuestionID` varchar(10) NOT NULL,
`Question` varchar(50) NOT NULL,
`Option1` varchar(45) NOT NULL,
`Option2` varchar(45) NOT NULL,
`Option3` varchar(45) NOT NULL,
`Option4` varchar(45) NOT NULL,
`Answer` varchar(45) character set latin1 collate latin1_bin NOT NULL,
`Marks` varchar(45) NOT NULL,
`SubjectID` varchar(45) NOT NULL,
`LessonNo` varchar(45) NOT NULL,
`QuestionExplanation` varchar(45) default NULL,
PRIMARY KEY (`QuestionID`),
KEY `FK_question_1` (`SubjectID`),
CONSTRAINT `FK_question_1` FOREIGN KEY (`SubjectID`) REFERENCES `subject`
(`SubjectID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `question`
--
/*!40000 ALTER TABLE `question` DISABLE KEYS */; 34

82
INSERT INTO `question`
(`QuestionID`,`Question`,`Option1`,`Option2`,`Option3`,`Option4`,`Answer`,`Marks`,`SubjectID`,`L
essonNo`,`QuestionExplanation`) VALUES
('QUE1000000','Who is SADIC ','IT GURU','administrator','Reverse Only Memory','Return Often
Memory',0x31,'2','SUB1000000','14',''),
('QUE1000010','hi','A','B','C','D',0x32,'1','SUB1000000','1','hi'),
('QUE1000011','The acronymn RAM stands for ','Random Access Memory','Read Access
Memory','Reverse Access Memory','Readable Access Memory',0x31,'1','SUB1000000','1','hi'),
('QUE1000012','The acronymn RAM stands for ','Random Access Memory','Read Access
Memory','Reverse Access Memory','Readable Access Memory',0x31,'1','SUB1000000','4','hi'),
('QUE1000013','The acronymn RAM stands for ','Random Access Memory','Read Access
Memory','Reverse Access Memory','Readable Access Memory',0x31,'1','SUB1000000','4','hi'),
('QUE1000014','What is the use of the monitor
','typing','displaying','inputting','scanning',0x32,'2','SUB1000000','5','hi'),
('QUE1000015','CPU stands for ','Central Processing
Unit','jjjj','lll','ffff',0x31,'2','SUB1000000','6','hi'),
('QUE1000016','SAMMY ','KOJO','YAW','MANSA','ABU',0x32,'2','SUB1000000','7',''),
('QUE1000017','Mahendra is a good person','ama','grace','Mat','go',0x32,'2','SUB1000000','8',''),
('QUE1000018','F','F','F','F','F',0x34,'2','SUB1000000','1','F'),
('QUE1000019','Which among the following is an output device','Printer','Mouse','System
Unit','Keyboard',0x32,'2','SUB1000000','10',''),
('QUE1000020','The fastest printer among the following is ','Inkjet','Laserjet','Epson
Workforce','Maxima',0x31,'2','SUB1000000','11',''),
('QUE1000021','What does the acronymn ROM stands for','Random Only Memory','Read Only
Memory','Reverse Only Memory','Return Often Memory',0x31,'2','SUB1000000','1','');
/*!40000 ALTER TABLE `question` ENABLE KEYS */;
--
-- Definition of table `registration`
--
DROP TABLE IF EXISTS `registration`;
CREATE TABLE `registration` (
`RegistrationID` varchar(10) NOT NULL,
`StudentID` varchar(10) NOT NULL,
`CourseID` varchar(10) NOT NULL, 35

83
`RegisteredDate` date NOT NULL,
`Class` varchar(5) NOT NULL,
PRIMARY KEY (`RegistrationID`),
KEY `FK_registration_1` (`StudentID`),
KEY `FK_registration_2` (`CourseID`),
CONSTRAINT `FK_registration_1` FOREIGN KEY (`StudentID`) REFERENCES `student`
(`StudentID`),
CONSTRAINT `FK_registration_2` FOREIGN KEY (`CourseID`) REFERENCES `course`
(`CourseID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `registration`
--
/*!40000 ALTER TABLE `registration` DISABLE KEYS */;
INSERT INTO `registration` (`RegistrationID`,`StudentID`,`CourseID`,`RegisteredDate`,`Class`)
VALUES
('RID1000000','SID1000000','CID1000000','2015-10-15','3A'),
('RID1000001','SID1000001','CID1000001','2015-10-15','3B'),
('RID1000002','SID1000002','CID1000002','2015-10-15','3A'),
('RID1000003','SID1000003','CID1000003','0201-10-15','3B');
/*!40000 ALTER TABLE `registration` ENABLE KEYS */;
--
-- Definition of table `result`
--
DROP TABLE IF EXISTS `result`;
CREATE TABLE `result` (
`ResultID` varchar(10) NOT NULL,
`TestID` varchar(45) NOT NULL,
`TotalMarks` varchar(45) NOT NULL,
`ObtainMarks` varchar(45) NOT NULL,
`StudentID` varchar(45) NOT NULL,
`TestingDate` date NOT NULL,
PRIMARY KEY (`ResultID`),
KEY `FK_result_1` (`TestID`),
KEY `FK_result_2` (`StudentID`), 36

84
CONSTRAINT `FK_result_1` FOREIGN KEY (`TestID`) REFERENCES `test_settings` (`TestID`),
CONSTRAINT `FK_result_2` FOREIGN KEY (`StudentID`) REFERENCES `student`
(`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `result`
--
/*!40000 ALTER TABLE `result` DISABLE KEYS */;
/*!40000 ALTER TABLE `result` ENABLE KEYS */;
--
-- Definition of table `student`
--
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
`StudentID` varchar(10) NOT NULL,
`FirstName` varchar(45) NOT NULL,
`MiddleName` varchar(45) default NULL,
`LastName` varchar(45) NOT NULL,
`Gender` varchar(25) NOT NULL,
`DOB` varchar(20) NOT NULL,
`Email` varchar(20) default NULL,
`Nationality` varchar(20) NOT NULL,
`ParentName_Guardian` varchar(45) NOT NULL,
`Town` varchar(45) NOT NULL,
`HouseNumber` varchar(10) NOT NULL,
`Mobile1` varchar(10) NOT NULL,
`Mobile2` varchar(10) default NULL,
`AdmissionDate` varchar(20) NOT NULL,
PRIMARY KEY (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `student`
-- 37

85
/*!40000 ALTER TABLE `student` DISABLE KEYS */;
INSERT INTO `student`
(`StudentID`,`FirstName`,`MiddleName`,`LastName`,`Gender`,`DOB`,`Email`,`Nationality`,`Parent
Name_Guardian`,`Town`,`HouseNumber`,`Mobile1`,`Mobile2`,`AdmissionDate`) VALUES
('SID1000000','Samuel ','','Anyimah','Male','23/12/1985','samanyimah@gmail.com','Ghanaian','Mr.
Anthony Essel','Prestea','WC 4/13','0246244662','0206488747','01/11/2014'),
('SID1000001','Isaac ','','Essel','Male','26/03/1995','ikessel@yahoo.com','Ghanaian','Mr. Elizaphan
Essel','Tarkwa','EA 2/23','0245123456',NULL,'01/11/2013'),
('SID1000002','Anthoniette
','Afia','Assan','Female','05/07/1986','anthoassan@yahoo.com','Ghanaian','Mr. Enock
Assan','Nanako','MD 34','0249883692',NULL,'01/11/2014'),
('SID1000003','Kojo ','','Owusu','Male','14/05/1984','kowusu@gmail.com','Ghanaian','Mrs. Charlotte
Anyimah','Agona Nsaba','AH 87','0201456987',NULL,'01/12/2014'),
('SID1000004','Grace
','Adjoaba','Boadi','Female','03/06/1987','graceboadi@gmail.com','Ghanaian','Mr. Kofi
Boadi','Sunyani','BL 4','0249885524',NULL,'01/11/2014'),
('SID1000005','Sadic','Ibn','Abubakar','Male','17/11/1985','olando2@yahoo.com','Ghanaian','Omar
Abu','Bolga','BC 8','0205847147',NULL,'01/11/2013'),
('SID1000006','KWAKU','','MAU','Male','23/11/1985',NULL,'GHANAIAN','KANKUZINI','WIAW
SO','WO 14','0247396852','','01/11/2013'),
('SID1000007','Sadic','Ibn','Abubakar','Male','17/11/1985','olando2@yahoo.com','Ghanaian','Omar
Abu','Bolga','BC 8','0205847147','','01/11/2013'),
('SID1000008','Samuel ','','Anyimah','Male','23/12/1985','samanyimah@gmail.com','Ghanaian','Mr.
Anthony Essel','Prestea','WC 4/13','0246244662','0206488747','01/11/2014'),
('SID1000009','Samuel ','','Anyimah','Male','23/12/1985','samanyimah@gmail.com','Ghanaian','Mr.
Anthony Essel','Prestea','WC 4/13','0246244662','0206488747','01/11/2014'),
('SID1000010','KWAKU','','MAU','Male','23/11/1985','','GHANAIAN','KANKUZINI','WIAWSO','W
O 14','0247396852','','01/11/2013'),
('SID1000011','Elizaphan','Abena','Essel','Female','08/09/2015','eliza@gmail.com','Ghanaian','Samuel
Anyimah','Aboso','WC 4/13','0246244662','0206488747','01/11/2014'), 38

86
('SID1000012','Jonathan','Kobina','Yankson','Male','09/06/1965','biobio@gmail.com','Ghanaian','Mr.
Anthony Essel','Eikwe','BN 5/6','0246852147','0206488747','01/11/2013'),
('SID1000013','Isaac ','Kwame','Essel','Male','26/03/1995','ikessel@yahoo.com','Ghanaian','Mr.
Elizaphan Essel','Tarkwa','EA 2/23','0245123456','','01/11/2013'),
('SID1000014','Collins','Opoku','Ampofo','Male','23/12/1985','colopo@gmail.com','Ghanaian','Mr.
Jacob Opoku Ampofo','Kumasi','HV 14/45','0254789635','0547856321','01/11/2015');
/*!40000 ALTER TABLE `student` ENABLE KEYS */;
--
-- Definition of table `subject`
--
DROP TABLE IF EXISTS `subject`;
CREATE TABLE `subject` (
`SubjectID` varchar(10) NOT NULL,
`SubjectName` varchar(45) NOT NULL,
`CourseID` varchar(10) NOT NULL,
`Terms` varchar(20) NOT NULL,
`SubjectType` varchar(45) NOT NULL,
PRIMARY KEY (`SubjectID`),
KEY `FK_subject_1` (`CourseID`),
CONSTRAINT `FK_subject_1` FOREIGN KEY (`CourseID`) REFERENCES `course`
(`CourseID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `subject`
--
/*!40000 ALTER TABLE `subject` DISABLE KEYS */;
INSERT INTO `subject` (`SubjectID`,`SubjectName`,`CourseID`,`Terms`,`SubjectType`) VALUES
('STID100000','Information and Communication Technology','CID1000000','3','Knowledge in ICT'),
('STID100001','Physics','CID1000001','3','Waves and Motion'),
('SUB1000000','English','CID1000002','1','Grammar');
/*!40000 ALTER TABLE `subject` ENABLE KEYS */; 39

87
--
-- Definition of table `test_settings`
--
DROP TABLE IF EXISTS `test_settings`;
CREATE TABLE `test_settings` (
`TestID` varchar(10) NOT NULL,
`OneMark` tinyint(3) unsigned NOT NULL,
`TwoMarks` tinyint(3) unsigned NOT NULL,
`FourMarks` tinyint(3) unsigned NOT NULL,
`FiveMarks` tinyint(3) unsigned NOT NULL,
`TotalMarks` tinyint(3) unsigned NOT NULL,
`Min_PassingMarks` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`TestID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `test_settings`
--
/*!40000 ALTER TABLE `test_settings` DISABLE KEYS */;
/*!40000 ALTER TABLE `test_settings` ENABLE KEYS */;
--
-- Definition of table `testing_schedule`
--
DROP TABLE IF EXISTS `testing_schedule`;
CREATE TABLE `testing_schedule` (
`TestID` varchar(10) NOT NULL,
`CourseID` varchar(45) NOT NULL,
`SubjectID` varchar(45) NOT NULL,
`Class` varchar(45) NOT NULL,
`Is_Active` tinyint(1) NOT NULL,
`Generated_By` varchar(45) NOT NULL,
PRIMARY KEY (`TestID`),
KEY `FK_testing_schedule_1` (`CourseID`),

KEY `FK_testing_schedule_2` (`SubjectID`),


KEY `FK_testing_schedule_3` (`Generated_By`),
CONSTRAINT `FK_testing_schedule_1` FOREIGN KEY (`CourseID`) REFERENCES `course`
(`CourseID`),
CONSTRAINT `FK_testing_schedule_2` FOREIGN KEY (`SubjectID`) REFERENCES `subject`
(`SubjectID`),
CONSTRAINT `FK_testing_schedule_3` FOREIGN KEY (`Generated_By`) REFERENCES
`employee` (`EmployeeID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `testing_schedule`
--
/*!40000 ALTER TABLE `testing_schedule` DISABLE KEYS */;
INSERT INTO `testing_schedule`
(`TestID`,`CourseID`,`SubjectID`,`Class`,`Is_Active`,`Generated_By`) VALUES
('TID1000000','CID1000000','STID100000','3',1,'EID1000000'),
88
('TID1000002','CID1000001','STID100001','2',1,'EID1000001');
/*!40000 ALTER TABLE `testing_schedule` ENABLE KEYS */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET
FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET
CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT
*/;
/*!40101 SET
CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESUL
TS */;
/*!40101 SET
COLLATION_CONNECTION=@OLD_COLLATION_CONNECTIO
N */;
/*!40101 SET
CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT
*/; 41

89
Front End
Java Netbeans IDE 7.3 was used for the front end coding
Front End Source Code
Question Form Source Code
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package exams.view;
import exams.dao.QuestionDAO;
import exams.model.Question;
import java.awt.Color;
import javax.swing.JOptionPane;
/**
*
* @author PC
*/
public class QuestionForm extends javax.swing.JFrame{
/**
* Creates new form Question
*/
public QuestionForm() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
lblQID = new javax.swing.JLabel();
txtQID = new javax.swing.JTextField();
lblQuestion = new javax.swing.JLabel();
lblOption1 = new javax.swing.JLabel(); 42

90
lblOption2 = new javax.swing.JLabel();
lblOption3 = new javax.swing.JLabel();
lblOption4 = new javax.swing.JLabel();
lblAnswer = new javax.swing.JLabel();
txtOption1 = new javax.swing.JTextField();
txtOption2 = new javax.swing.JTextField();
txtOption3 = new javax.swing.JTextField();
txtOption4 = new javax.swing.JTextField();
jScrollPane1 = new javax.swing.JScrollPane();
txtareaQuestionExp = new javax.swing.JTextArea();
btnAdd = new javax.swing.JButton();
btnReset = new javax.swing.JButton();
cmbAnswer = new javax.swing.JComboBox();
btnUpdate = new javax.swing.JButton();
btnSearch = new javax.swing.JButton();
lblSID = new javax.swing.JLabel();
txtSID = new javax.swing.JTextField();
lblLessonNo = new javax.swing.JLabel();
txtLessonNo = new javax.swing.JTextField();
lblMarks = new javax.swing.JLabel();
txtMarks = new javax.swing.JTextField();
lblQExplanation = new javax.swing.JLabel();
jScrollPane2 = new javax.swing.JScrollPane();
txtareaQuestion = new javax.swing.JTextArea();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setBackground(new java.awt.Color(153, 204, 0));
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel1.setForeground(new java.awt.Color(0, 0, 204));
jLabel1.setText("QUESTIONS");
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 0, 170, 30));
lblQID.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
lblQID.setForeground(new java.awt.Color(0, 102, 204));
lblQID.setText("Question ID");
getContentPane().add(lblQID, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 50, -1, -1));
txtQID.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
txtQID.setForeground(new java.awt.Color(0, 102, 204));
txtQID.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
txtQIDFocusLost(evt); 43

91
}
});
getContentPane().add(txtQID, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 50, 208, -1));
lblQuestion.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
lblQuestion.setForeground(new java.awt.Color(0, 102, 204));
lblQuestion.setText("Question");
getContentPane().add(lblQuestion, new org.netbeans.lib.awtextra.AbsoluteConstraints(86, 150, -1, -
1));
lblOption1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
lblOption1.setForeground(new java.awt.Color(0, 102, 204));
lblOption1.setText("Option 1");
getContentPane().add(lblOption1, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 320, -1, -
1));
lblOption2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
lblOption2.setForeground(new java.awt.Color(0, 102, 204));
lblOption2.setText("Option 2");
getContentPane().add(lblOption2, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 350, -1, -
1));
lblOption3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
lblOption3.setForeground(new java.awt.Color(0, 102, 204));
lblOption3.setText("Option 3");
getContentPane().add(lblOption3, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 380, -1, -
1));
lblOption4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
lblOption4.setForeground(new java.awt.Color(0, 102, 204));
lblOption4.setText("Option 4");
getContentPane().add(lblOption4, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 410, -1, -
1));
lblAnswer.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
lblAnswer.setForeground(new java.awt.Color(0, 102, 204));
lblAnswer.setText("Answer");
getContentPane().add(lblAnswer, new org.netbeans.lib.awtextra.AbsoluteConstraints(96, 441, -1, -
1));
getContentPane().add(txtOption1, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 320, 323,
-1));
getContentPane().add(txtOption2, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 350, 323,
-1));
getContentPane().add(txtOption3, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 380, 323,
-1)); 44

92
getContentPane().add(txtOption4, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 410, 323,
-1));
txtareaQuestionExp.setColumns(20);
txtareaQuestionExp.setRows(5);
jScrollPane1.setViewportView(txtareaQuestionExp);
getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 240,
323, 70));
btnAdd.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
btnAdd.setForeground(new java.awt.Color(0, 0, 204));
btnAdd.setText("Add");
btnAdd.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAddActionPerformed(evt);
}
});
getContentPane().add(btnAdd, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 480, 138,
36));
btnReset.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
btnReset.setForeground(new java.awt.Color(51, 0, 204));
btnReset.setText("Reset");
btnReset.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnResetActionPerformed(evt);
}
});
getContentPane().add(btnReset, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 480, 129,
36));
cmbAnswer.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
cmbAnswer.setForeground(new java.awt.Color(0, 0, 204));
cmbAnswer.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select Answer",
"1", "2", "3", "4" }));
getContentPane().add(cmbAnswer, new org.netbeans.lib.awtextra.AbsoluteConstraints(166, 441,
323, -1));
btnUpdate.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
btnUpdate.setForeground(new java.awt.Color(51, 0, 204));
btnUpdate.setText("Update");
btnUpdate.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnUpdateActionPerformed(evt);
} 45

93
});
getContentPane().add(btnUpdate, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 480, 129,
36));
btnSearch.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
btnSearch.setForeground(new java.awt.Color(51, 0, 204));
btnSearch.setText("Search");
btnSearch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnSearchActionPerformed(evt);
}
});
getContentPane().add(btnSearch, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 40, 90,
60));
lblSID.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
lblSID.setForeground(new java.awt.Color(0, 102, 204));
lblSID.setText("Subject ID");
getContentPane().add(lblSID, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 80, -1, -1));
txtSID.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
txtSIDFocusLost(evt);
}
});
getContentPane().add(txtSID, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 80, 210, -1));
lblLessonNo.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
lblLessonNo.setForeground(new java.awt.Color(0, 102, 204));
lblLessonNo.setText("Lesson Number");
getContentPane().add(lblLessonNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 110, -1, -
1));
getContentPane().add(txtLessonNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 110,
100, -1));
lblMarks.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
lblMarks.setForeground(new java.awt.Color(0, 102, 204));
lblMarks.setText("Marks");
getContentPane().add(lblMarks, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 110, -1, -
1));
getContentPane().add(txtMarks, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 110, 90, -
1));
lblQExplanation.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N 46

94
lblQExplanation.setForeground(new java.awt.Color(0, 102, 204));
lblQExplanation.setText("Question Explaination");
getContentPane().add(lblQExplanation, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 270,
-1, -1));
txtareaQuestion.setColumns(20);
txtareaQuestion.setRows(5);
jScrollPane2.setViewportView(txtareaQuestion);
getContentPane().add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(166, 150,
323, 80));
pack();
}// </editor-fold>
private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {
if (txtSID.getText().isEmpty()) {
txtSID.setBackground(Color.yellow);
txtSID.grabFocus();
} else {
QuestionDAO dao = new QuestionDAO();
Question ques = new Question();
try {
ques.setQuestionID(dao.getQuestionID());
ques.setSubjectID(txtSID.getText());
ques.setLessonNo(txtLessonNo.getText());
ques.setMarks(Integer.parseInt(txtMarks.getText()));
ques.setQuestion(txtareaQuestion.getText());
ques.setOption1(txtOption1.getText());
ques.setOption2(txtOption2.getText());
ques.setOption3(txtOption3.getText());
ques.setOption4(txtOption4.getText());
ques.setAnswer(cmbAnswer.getSelectedItem().toString());
ques.setQuestionExplanation(txtareaQuestionExp.getText());
if (dao.addQuestion(ques) > 0) {
JOptionPane.showMessageDialog(this, "Question Added");
txtQID.setText(ques.getQuestionID());
} else {
JOptionPane.showMessageDialog(this, "No Record Inserted..");
}
} catch (Exception ex) {
JOptionPane.showMessageDialog(this, ex);
}
} 47

95
}
private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {
if (txtSID.getText().isEmpty()) {
txtSID.setBackground(Color.yellow);
txtSID.grabFocus();
} else {
QuestionDAO dao = new QuestionDAO();
Question ques = new Question();
try {
ques.setQuestionID(txtQID.getText());
ques.setSubjectID(txtSID.getText());
ques.setLessonNo(txtLessonNo.getText());
ques.setMarks(Integer.parseInt(txtMarks.getText()));
ques.setQuestion(txtareaQuestion.getText());
ques.setOption1(txtOption1.getText());
ques.setOption2(txtOption2.getText());
ques.setOption3(txtOption3.getText());
ques.setOption4(txtOption4.getText());
ques.setAnswer(cmbAnswer.getSelectedItem().toString());
ques.setQuestionExplanation(txtareaQuestionExp.getText());
if (dao.modifyQuestion(ques) > 0) {
JOptionPane.showMessageDialog(this, "Question Updated");
} else {
JOptionPane.showMessageDialog(this, "No Record Found..");
}
} catch (Exception ex) {
JOptionPane.showMessageDialog(this, ex);
}
}
}
private void btnSearchActionPerformed(java.awt.event.ActionEvent evt) {
if (txtQID.getText().isEmpty()) {
txtQID.setBackground(Color.yellow);
txtQID.grabFocus();
} else {
QuestionDAO dao = new QuestionDAO();
try {
Question ques = dao.searchQuestion(txtQID.getText());
if (ques != null) {
txtSID.setText(ques.getSubjectID()); 48

96
txtLessonNo.setText(ques.getLessonNo());
txtMarks.setText(ques.getMarks() + "");
txtareaQuestion.setText(ques.getQuestion());
txtOption1.setText(ques.getOption1());
txtOption2.setText(ques.getOption2());
txtOption3.setText(ques.getOption3());
txtOption4.setText(ques.getOption4());
cmbAnswer.setSelectedItem(ques.getAnswer());
txtareaQuestionExp.setText(ques.getQuestionExplanation());
} else {
JOptionPane.showMessageDialog(this, "No Record Found..");
}
} catch (Exception ex) {
JOptionPane.showMessageDialog(this, ex);
}
}
}
private void btnResetActionPerformed(java.awt.event.ActionEvent evt) {
txtQID.setText("");
txtLessonNo.setText("");
txtMarks.setText("");
txtOption1.setText("");
txtOption2.setText("");
txtOption3.setText("");
txtOption4.setText("");
txtQID.setText("");
txtSID.setText("");
txtareaQuestion.setText("");
txtareaQuestionExp.setText("");
cmbAnswer.setSelectedIndex(0);
}
private void txtQIDFocusLost(java.awt.event.FocusEvent evt) {
txtQID.setBackground(Color.white);
}
private void txtSIDFocusLost(java.awt.event.FocusEvent evt) {
txtSID.setBackground(Color.white);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) { 49

97
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(QuestionForm.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(QuestionForm.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(QuestionForm.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(QuestionForm.class.getName()).log(java.util.logging.Level.SEV
ERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new QuestionForm().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton btnAdd;
private javax.swing.JButton btnReset;
private javax.swing.JButton btnSearch;
private javax.swing.JButton btnUpdate;
private javax.swing.JComboBox cmbAnswer;
private javax.swing.JLabel jLabel1; 50

98
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JLabel lblAnswer;
private javax.swing.JLabel lblLessonNo;
private javax.swing.JLabel lblMarks;
private javax.swing.JLabel lblOption1;
private javax.swing.JLabel lblOption2;
private javax.swing.JLabel lblOption3;
private javax.swing.JLabel lblOption4;
private javax.swing.JLabel lblQExplanation;
private javax.swing.JLabel lblQID;
private javax.swing.JLabel lblQuestion;
private javax.swing.JLabel lblSID;
private javax.swing.JTextField txtLessonNo;
private javax.swing.JTextField txtMarks;
private javax.swing.JTextField txtOption1;
private javax.swing.JTextField txtOption2;
private javax.swing.JTextField txtOption3;
private javax.swing.JTextField txtOption4;
private javax.swing.JTextField txtQID;
private javax.swing.JTextField txtSID;
private javax.swing.JTextArea txtareaQuestion;
private javax.swing.JTextArea txtareaQuestionExp;
// End of variables declaration
}

Middle End
Data Access Object (DAO)

Middle End Source Code


QuestionDAO
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package exams.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List; 51

99
import exams.model.Question;
/**
*
* @author PC
*/
public class QuestionDAO {
public String getQuestionID() throws Exception {
String fid;
fid = null;
try (Connection con = Connector.getCon()) {
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select QuestionID from Question order by QuestionID desc");
if (rs.next()) {
String id = rs.getString(1).trim().substring(3);
int iid = Integer.parseInt(id);
fid = "QUE" + (++iid);
} else {
fid = "QUE1000001";
}
}
return fid;
}
public int addQuestion(Question reg) throws Exception {
int result;
try (Connection con = Connector.getCon()) {
PreparedStatement ps = con.prepareStatement("insert into question values(?,?,?,?,?,?,?,?,?,?,?)");
ps.setString(1, reg.getQuestionID());
ps.setString(2, reg.getQuestion());
ps.setString(3, reg.getOption1());
ps.setString(4, reg.getOption2());
ps.setString(5, reg.getOption3());
ps.setString(6, reg.getOption4());
ps.setString(7, reg.getAnswer());
ps.setInt(8, reg.getMarks());
ps.setString(9, reg.getSubjectID()); 52

100
ps.setString(10, reg.getLessonNo());
ps.setString(11, reg.getQuestionExplanation());
result = ps.executeUpdate();
}
return result;
}
/**
*
* @param reg
* @return
* @throws Exception
*/
public int modifyQuestion(Question reg) throws Exception {
int result;
try (Connection con = Connector.getCon()) {
PreparedStatement ps = con.prepareStatement("update question set question=?,
Option1=?,Option2=?,Option3=?,Option4=?,Answer=?,Marks=?,SubjectID=?,LessonNo=?,Question
Explanation=? where questionid=?");
ps.setString(1, reg.getQuestion());
ps.setString(2, reg.getOption1());
ps.setString(3, reg.getOption2());
ps.setString(4, reg.getOption3());
ps.setString(5, reg.getOption4());
ps.setString(6, reg.getAnswer());
ps.setInt(7, reg.getMarks());
ps.setString(8, reg.getSubjectID());
ps.setString(9, reg.getLessonNo());
ps.setString(10, reg.getQuestionExplanation());
ps.setString(11, reg.getQuestionID());
result = ps.executeUpdate();
}
return result;
}
public int removeQuestion(String regid) throws Exception {
int result;
try (Connection con = Connector.getCon()) { 53

101
PreparedStatement ps = con.prepareStatement("delete from question where questionid=?");
ps.setString(1, regid);
result = ps.executeUpdate();
}
return result;
}
public Question searchQuestion(String regid) throws Exception {
Question reg;
try (Connection con = Connector.getCon()) {
PreparedStatement ps = con.prepareStatement("select * from question where questionid=?");
ps.setString(1, regid);
ResultSet rs = ps.executeQuery();
reg = null;
if (rs.next()) {
reg = new Question();
reg.setQuestionID(rs.getString(1));
reg.setQuestion(rs.getString(2));
reg.setOption1(rs.getString(3));
reg.setOption2(rs.getString(4));
reg.setOption3(rs.getString(5));
reg.setOption4(rs.getString(6));
reg.setAnswer(rs.getString(7));
reg.setMarks(rs.getInt(8));
reg.setSubjectID(rs.getString(9));
reg.setLessonNo(rs.getString(10));
reg.setQuestionExplanation(rs.getString(11));
}
}
return reg;
}
public List<Question> listQuestion() throws Exception {
List<Question> list;
try (Connection con = Connector.getCon()) {
PreparedStatement ps = con.prepareStatement("select * from registration ");
ResultSet rs = ps.executeQuery();
list = new ArrayList<>(); 54

102
while (rs.next()) {
Question reg = new Question();
reg.setQuestionID(rs.getString(1));
reg.setQuestion(rs.getString(2));
reg.setOption1(rs.getString(3));
reg.setOption2(rs.getString(4));
reg.setOption3(rs.getString(5));
reg.setOption4(rs.getString(6));
reg.setAnswer(rs.getString(7));
reg.setMarks(rs.getInt(8));
reg.setSubjectID(rs.getString(9));
reg.setLessonNo(rs.getString(10));
reg.setQuestionExplanation(rs.getString(11));
list.add(reg);
}
}
return list;
}
}

103
SCREEN SHOTS

104
105
106
107
108
109
110
111
112
11 Client /server :-
The client-server architecture is a way to dispense a service from a central source. There is a
single server that provides a service, and multiple clients that communicate with the server to
consume its products. In this architecture, clients and servers have different jobs. The server's
job is to respond to service requests from clients, while a client's job is to use the data
provided in response in order to perform some task.

Client/Server Terminology

 Applications Programming Interface (API)


 A set of function and call programs that allow clients and servers to
intercommunicate
 Client

A networked information requester, usually a PC or workstation, that can query


database and/or other information from a server

 Middleware
A set of drivers, APIs, or other software that improves connectivity between a
client application and a server

 Relational Database

A database in which information access is limited to the selection of rows that


satisfy all search criteria

113
 Server

A computer, usually a high-powered workstation, a minicomputer, or a


mainframe, that houses information for manipulation by networked clients

 Structured Query Language (SQL)

A language developed by IBM and standardized by ANSI for


addressing, creating, updating, or querying relational databases

 Client/Server Computing: Client


 .Client machines are generally single-user workstations providing a user-
friendly interface to the end user
 …client-based stations generally present the type of graphical interface
that is most comfortable to users, including the use of windows and a
mouse
 Microsoft Windows and Macintosh OS provide examples of such
interfaces
 . client-based applications are tailored for ease of use and include such
familiar tools as the spreadsheet.

114
 Client/Server Computing: Server
 Each server provides a set of shared services to the clients
 most common type of server currently is the database
 server, usually controlling a relational database enables many
clients to share access to the same database
 enables the use of a high-performance computer system to
manage the database

 Client/Server Characteristics:-

A client/server configuration differs from other types of distributed processing:

 there is a heavy reliance on bringing user-friendly applications to the user on his


or her own system
 there is an emphasis on centralizing corporate databases and many network
management and utility functions.
 there is a commitment, both by user organizations and vendors, to open and
modular systems
 networking is fundamental to the operation
 Cost estimating :-

The first thing to do in order to create an estimate is to create an estimating plan,


which should include:

 Scope definition of the project, defining the boundaries.


 Time plan

Some types of project cost estimating techniques that are commonly used are:
 Analogous Estimation
 Resource Cost Rates Estimation
 Bottom-up Estimation

Expert judgment:- uses the experience and knowledge of experts to estimate the
cost of the project. This technique can take into account unique factors specific to
the project.

Analogous estimating:- uses historical data from similar projects as a basis for the
cost estimate. The estimate can be adjusted for known differences between the
projects.

115
Parametric estimating:- uses statistical modeling to develop a cost estimate. It
uses historical data of key cost drivers to calculate an estimate for different
parameters such as cost and duration. For example, square footage is used in some
construction projects.

Bottom-up estimating:- uses the estimates of individual work packages which are
then summarized or "rolled up" to determine an overall cost estimate for the project.

Cost of Quality (COQ):- includes money spent during the project to avoid failures
and money spent during and after the project due to failures. During cost estimation,
assumptions about the COQ can be included in the project cost estimate.

Project management estimating software:- includes cost estimating software


applications, spreadsheets, simulation applications, and statistical software tools.
This type of software is especially useful for looking at cost estimation alternatives.

TESTING :
 Unit testing:-

Unit testing focuses verification error on the smallest unit of software design – the
software component or module. Using the component-level design description as a
guide, important control paths are tested to uncover errors within the boundary of the
module. The relative complexity of tests and the errors those tests uncover is limited by
the constrained scope established for unit testing. The unit test focuses on the internal
processing logic can be conducted in parallels for multiple components

 Unit test consideration:-

The tests that occur as part of unit tests are illustrated. The module interface is
tested to ensure that information properly flows into and out of the program unit under
test. Local data structures are examined to ensure that data stored temporarily
maintains its integrity during all control structure are exercised to ensure that all
statements in a module have been executed at least once. Boundary conditions are

116
tested to ensure that the module operates properly at boundaries established to limit or
restrict processing. And finally all error handling paths are tested.

Test of data flow across a module interface are required before any other test is
initiated. If data do not enter and exit properly, all other tests are moot. In addition, local
data structures should be exercised and the local impact on global data should be
ascertained during unit testing.

Selective testing of execution paths is an essential task during the unit test.

Among the more common errors in Computations are:

1. Blank test box entries.

2. Misunderstood or incorrect Entries i.e. In Name Fields numeric values are


entered.

3. Incorrect Initialization.

4. Incorrect symbolic representation of an expression.

 Unit Test Procedures:


Unit testing is normally considered as an adjunct to the coding step. The
design of unit tests can be performed before coding begins or after source
code has been generated. Each test case should be coupled with a set of
expected results.

 Integrated testing:-
Integration testing is systematic technique for constructing the software architecture
while at the same time conducting tests to uncover errors associated with interfacing.
The objective is to take unit tested components and build a program structures that has
been dictated by design.

Modification and improvements:-

In testing phase, beside some small errors we got to know about as serious error
which we didn’t thought about on.

117
We didn’t proper use of “DataSet”. Because of this our site was running slowly. After
proper using of DataSet our site becomes fast, i.e. page loaded very quickly. What we
were doing that for each item we have opened the connection. But at page load we
brought all the item and then start retrieving one by one. This is the very big
improvement in our site.

 Test Plan

 Super Admin Login:

If the id field is filled by character the error generated and shown by “*”. That it should be numeric.

If the user id or password does exist then error will be generated that “ User Id or password does not exist.

 Registration:

Required field validator means we have fill the text. Compare to validate mean the field should match from the previous field.

 Student Login:

Appearing for examination, Student must have to be begin through student login
form. There are three field in the student login page and Every field has to filled by
student. Student cannot used character in the login id field. Student registration will be
cancelled automatically by the system after appearing in the examination.

 Admin Login :-

To register the student admin has to login first. The Id field is numeric.

118
CONCLUSION
The “Online Examination System” has been successfully completed. The
goal of the system is achieved and problems are solved. Final reports are
generated as per the specification of the client. The package is developed
in a manner that it is user friendly and required help is provided at different
levels.

The Online Examination project can be easily used in the process of


decision making.

FUTURE SCOPE
1 To modify the Online Examination System project to .Net platform to take the
advantage of geographical remote area. By shifting the project to the Dot Net platform
the project can be made into a Mobile Accessible Application by which the restrictions of
the software & hardware requirements can be scaled down, which is not possible using
ASP.

2 we can even apply the unique identity of the user by keeping certain formalities which
must be answered by the user while entering the test (like the user need to answer
again the questions which he did while registering himself for the test) the questions
selected will be in random order from his personal data only (like the mole present on
the user, etc …) so that we it may confirm that the user itself is writing the test .

3 we can even use the thumb mark of the users to confirm their identities .

4B We can even add the photos of the users in this to confirm the user Identity.
Thus by applying these steps we can make sure that the user itself is writing the exam
not the others.

119
REFERENCES
. www.google.com
. www.wikipedia.com
. www.w3schools.com
. www.project code.com

120
121

You might also like