Professional Documents
Culture Documents
Enrolment number
176594525
Under Guidence
Of
Mr.SAURABH VASHISTHA
Masters
of
Computer Applications
Maidan Garhi
New Delhi– 110068
1
PROFORMA OF PROJECT PROPOSAL
SCHOOL OF COMPUTER AND INFORMATION SCIENCES
IGNOU, MAIDAN GARHI, NEW DELHI – 110 068
………………………………. ………………………………..
2
CERTIFICATE OF ORIGINALITY
……………………… …………………………..
……………………… …………………..….
…………………………. …...……………………………..
………………………..… ………………………………….
…………………………… …………………………………….
Enrolment no:
………………
3
TABLES OF CONTENTS
1 Introduction 1-4
Background
Objectives
Limitation
4 Technologies 13-16
Software requirement
Hardware requirement
Languages
Backend
6 Coding 19-24
8 Testing
Introduction
Software testing
Test plan
9 Future scope
10 Conclusion
11 References
4
1. INTRODUCTION:-
5
2. OBJECTIVES:-
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
4.1 Introduction:-
4.2 Purpose:-
9
4.3 Scope:-
Scope of this project is very broad compared to manually taken exams. They
are:-
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.
Administrator:-
Candidate:-
The function of the student is to update his/her profile and give various exams.
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
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
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
For testing purposes, a simulating tool needs to be used which may have to be
12
4.3 External Interface Requirements
1.1 User Interfaces
Registration Screen:
Login Name
Email Id
Password
Login Screen:
Login Name
Password
Entering Questions:
Questions
Options (4)
Correct Answer
Exam Name
No. Of Questions
Time Limit
Passing Marks
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.
Candidate module.
Examiner module.
Administrator module.
Result rankings module
Discussion Forum module
14
1.5 Behavior Requirement
15
4.4 Non –functional requirements:-
Functionality
User friendliness
The application should require minimum effort for users to operate (user friendly)
Platform independent
Hardware Requirement
Processor - Pentium 4 and above Speed - 233 MHz and above Hard Disk - 10GB
RAM - 256MB 8
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
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.
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
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
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.
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
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.
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 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
.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.
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.
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:-
Platform : .Net
Technology : Asp.net
IIS : Configured
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
Recommended
1. Pentium IV
3. 1GB RAM
6.2 LANGUAGES:-
1.1About java:-
27
1.3 Features of java:-
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
28
1.5 Features of JSP:-
Extension to Servlet
Powerful
Portable
Flexible
Easy
Extension to Servlet
No
Easy to Maintain
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:-
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.
33
1 STUDENT LOGIN FORM:
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.
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
Entities
Attributes
Relationships
Model is best used for the conceptual design of database. ER Model can be represented as
follows :
43
Example
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
45
For example:
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.
46
Cardinality
Defines the numerical attributes of the relationship between two entities or
entity sets.
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.
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.
any module.
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
Loop - A curved arrow represents loop in the module. All sub-modules covered
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:-
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.
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.
System Design
Includes the design of application, network, databases, user interfaces,
and system interfaces.
Review the proposed design. Ensure that the final design must meet the
requirements stated in SRS document.
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.
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.
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.
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.
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.
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.
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 −
All these objectives are obtained using the knowledge of basic design
principles regarding −
To design input data records, data entry screens, user interface screens,
etc.
62
by customers in forms manually and later entered by data entry operators,
or data is directly entered by users on the PCs.
63
2 ADD QUESTION DATABASE:-
64
5 RESULT DATABASE TABLE:-
7 EXAMINER TABLE :-
65
8 SUBJECT TABLE:-
66
8 CODING
67
Back End
MySQL 5.0 was used as back end
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`),
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`),
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)
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
Middleware
A set of drivers, APIs, or other software that improves connectivity between a
client application and a server
Relational Database
113
Server
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:-
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.
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
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.
3. Incorrect Initialization.
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.
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
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.
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