Sie sind auf Seite 1von 63

Intelligent Question answering System

A PROJECT REPORT
Submitted by

Shanmukh sri vamsi .N [191511062]

in partial fulfillment for the award of the degree


of

BACHELOR OF ENGINEERING
In

COMPUTER SCIENCE AND ENGINEERING

SAVEETHA SCHOOL OF ENGINEERING


SAVEETHA UNIVERSITY: CHENNAI 602 105
June 2018
BONAFIDE CERTIFICATE

Certified that this project report “Intelligent Question answering System” is the bonafide
work of “Shanmukh Sri Vamsi.N [191511062]” who carried out the project work under my
supervision.

SIGNATURE SIGNATURE

PROJECT COORDINATOR HEAD OF THE DEPARTMENT


Mrs.V.Banupriya Dr.S.Anusuya
Assistant professor Department of CSE
Department of CSE Saveetha School Of Engineering
Saveetha School Of Engineering Saveetha University
Saveetha University Chennai 602105
Chennai 602105

INTERNAL EXAMINER EXTERNAL EXAMINER


DECLARATION

We hereby declare that the mini project entitled “Intelligent Question answering System”
in partial fulfillment of requirement for the award of the degree of Bachelor of Technology is
a record of original project work done by us, during our period of study in SAVEETHA SCHOOL
OF ENGINEERING and no part of it has been submitted for any degree, association, fellowship
or any other similar titles.

SIGNATURE

Name:

Date:
CERTIFICATE BY THE GUIDE

This is to certify that the project entitled “Intelligent Question answering System” is the
bonafide work carried out by “Shanmukh sri vamsi.N” student of B.E., SAVEETHA SCHOOL
OF ENGINEERING ,SAVEETHA UNIVERSITY,CHENNAI 602105, during the year 2017 – 2018 under
my guidance.

Dr.T.Devi

Associative professor

Department of CSE

Saveetha School Of Engineering

Saveetha University

Chennai 602105
ACKNOWLEDGEMENT

To begin with we thank the almighty for giving us the strength and knowledge to carry
out this project work. At this outset, we take immense pleasure in expressing our sincere gratitude
to our honorable Chancellor, Dr. N.M.Veeraiyan for being a source of inspiration.

We sincerely thank our Vice-Chancellor, Dr. L. JAWAHAR NESON for providing all the
facilities to complete the project successfully.

We extent our heartiest thanks to our Director, Mrs. Ramya Deepak for providing
constant support and encouragement

We express our gratitude to our beloved Principal Dr.D.Dhanasekaran for granting


permission to undertake the project. We are also thankful to him for his valuable guidance all the
way through the course.

We extend our devoted gratitude to our beloved Head of department Dr.S.Anusuya


department of computer science and engineering & information technology for his consistent
encouragement.

We are deeply indebted to our guide and project Co-Ordinator, Mrs.V.Banupriya for her
motivation, guidance and valuable suggestions to carry out our project and her consistent
encouragement throughout the course of our project work.

We extend our hearty thanks to our project guide Mrs.T.Devi for her unstinted support
and guidance besides cooperation during the development of this project.

We profusely thank all the faculty members of department of computer science &
engineering, who have been a source of great help in multiple ways in our venture.

Finally, we owe our special thanks to our parents and friends for their moral support and
care extended during difficult times.
TABLE OF CONTENTS

CHAPTER NO. TITLE PAGE NO.

ABSTRACT i
v
LIST OF FIGURES
LIST OF SYMBOLS vii
xi
LIST OF ABBREVIATIONS
LIST OF TABLES xii

1. CHAPTER 1 : INTRODUCTION
1.1 GENERAL
1.2 OBJECTIVE
1.3 EXISTING SYSTEM
1.4 PROPOSED SYSTEM
1.4.1 PROPOSED SYSTEM ADVANTAGES
2. CHAPTER 2 :PROJECT DESCRIPTION
2.1 METHODOLOGIES
2.1.1 MODULES NAME
2.1.2 MODULES EXPLANATION
2.1.3 MODULE DIAGRAM
3. CHAPTER 3 : REQUIREMENTS

3.1 HARDWARE REQUIREMENTS

3.2 SOFTWARE REQUIREMENTS

4. CHAPTER 4 : SYSTEM DESIGN


4.1 GENERAL
4.1.1 USE CASE DIAGRAM
4.1.2 CLASS DIAGRAM
4.1.3 OBJECT DIAGRAM
4.1.4 SEQUENCE DIAGRAM
4.1.5 COLLABORATION DIAGRAM
4.1.6 STATE DIAGRAM
4.1.7 ACTIVITY DIAGRAM
4.1.8 COMPONENT DIAGRAM
4.1.9 DATA FLOW DIAGRAM
4.1.10 E-R DIAGRAM
4.1.11 SYSTEM ARCHITECTURE
5. CHAPTER 5 :SOFTWARE SPECIFICATION
5.1 GENERAL
FRONT END
5.2 FEATURES OF JAVA
5.2.1 THE JAVA FRAMEWORK
5.2.2 OBJECTIVE OF JAVA
5.2.3 JAVASERVER PAGES - AN OVERVIEW
5.2.4 EVOLUTION OF WEB APPLICATIONS
5.2.5 BENEFITS OF JSP

5.3 SERVLETS
5.4 JAVA SERVLETS

CHAPTER 6 : IMPLEMENTATION
6. 6.1 CODING
6.2 DATA BASE TABLE STRUCTURE
7. CHAPTER 7 : SNAPSHOTS
7.1 GENERAL
7.2 VARIOUS SNAPSHOTS
8. CHAPTER 8 : SOFTWARE TESTING
8.1 GENERAL
8.2 DEVELOPING METHODOLOGIES
8.3 TYPES OF TESTING
9. CHAPTER 9 :
APPLICATIONS AND FUTURE ENHANCEMENT
9.1 GENERAL
9.2 APPLICATIONS
9.3 FUTURE ENHANCEMENTS
10 CHAPTER 10 :
10.1 CONCLUSION
10.2 REFERENCES
ABSTRACT:
The question answering system is very hot in natural language processing .users can
propose questions in natural language and get compact and relevant answers rather than relative
documents as done in the search engines. The goal of a question answering system is to retrieve
answers to questions rather than full documents or best-matching passages, as most information
retrieval systems currently do. There are two categories in this system viz: open and closed. The
domain specific QA system involves heavy use of natural language processing systems formalized
by building a domain specific ontology QA research attempts to deal with a wide range of question
types including: fact, list, definition, paragraph and cross-lingual questions. Search collections
vary from small local document collections, internal organization documents to be complied with
newswire reports on the World Wide Web. A QAS returns answer of a user question in concise
form. In order to provide the specific answer, the system must know what precisely a user wants.
The prior knowledge of the estimated answer type helps the QAS to extract correct and precise
answers from the document collection.

LIST OF FIGURES
FIGURE NO NAME OF THE FIGURE PAGE NO.
2.3.2 Module Diagram

4.2 Activity Diagram

4.3 Use case Diagram

4.4 Data flow diagram

4.5 Sequence diagram

4.6 Collaboration diagram


4.7 Class diagram

4.8 Architecture Diagram


4.9 State Diagram
4.1 Component Diagram
4.12 E-R Diagram

LIST OF SYSMBOLS

NOTATION
S.NO NAME NOTATION DESCRIPTION

Class Name

1. Class Represents a collection


of similar entities
+ public -attribute grouped together.

-private -attribute

# protected

+operation

+operation

+operation

Class A NAME Class B Associations represents


static relationships
2. Association
between classes. Roles
represents the way the
Class A Class B two classes see each
other.
3. Actor It aggregates several
classes into a single
classes.
Class A Class A
Interaction between the
Aggregation system and external
4.
Class B Class B environment

5.
Relation uses Used for additional
(uses) process communication.

Extends relationship is
used when one use case is
6. Relation extends
similar to another use
(extends)
case but does a bit more.

Communication between
7. Communication
various use cases.

State of the processs.


8. State State

9. Initial State Initial state of the object

10. Final state F inal state of the object


11. Control flow
Represents various
control flow between the
states.

12. Decision box Represents decision


making process from a
constraint

Interact ion between the


13. Usescase
system and external
Usecase
environment.

Represents physical
modules which is a
collection of
14. Component
components.

Represents physical
15. Node modules which are a
collection of
components.

A circle in DFD
represents a state or
16. Data process which has been
triggered due to some
Process/State
event or acion.
Represents external
17. External
entities such as
entity keyboard,sensors,etc.

Represents
Transition
18. communication that
occurs between
processes.

19. Object Represents the vertical


Lifeline dimensions that the
object communications.

Represents the message


20. Message Message
exchanged.

LIST OF ABBREVATION

S.NO ABBREVATION EXPANSION

1. DB DataBase

2. JVM Java Virtual Machine

3. JSP Java Server Page

4. PWS Personalised Web Search

5. UPS User Personalised Search

6. JRE Java Runtime Environment


CHAPTER 1
INTRODUCTION
1.1 GENERAL
The actual data mining task is the automatic or semi-automatic analysis of large quantities of data
to extract previously unknown interesting patterns such as groups of data records (cluster analysis),
unusual records (anomaly detection) and dependencies (association rule mining). This usually
involves using database techniques such as spatial indices. These patterns can then be seen as a
kind of summary of the input data, and may be used in further analysis or, for example, in machine
learning and predictive analytics.

1.2 OBJECTIVE:
Our system would identify those portions of the knowledge base that are relevant to the
question minimizing the search space and providing exact expected answers to the user.

1.3 EXISTING SYSTEM:


In existing, the questions given by users are not correctly understanding to the users. There
are no feedbacks in the existing one. The answers given are not better quality to understand
by the end user.

1.4 PROPOSED SYSTEM


Our proposed approach consists of well developed technique for understanding of question
and answers. Question and answers are given in high quality learning system.

1.4.1 PROPOSED SYSTEM ADVANTAGES


 Questions and answers are clearly given by the users.
 Feedbacks and ratings are given by the users.
CHAPTER 2

2.1 METHODOLOGIES
Following modules involves
2.1.1 MODULES
 User interface design
 Ask query process
 Query analysis and user answers
 Voting system
 User integrated output

2.1.2 MODULE DESCRIPTION


1. User interface design
Logging in system the user starts enters the appropriate text fields for the user to log in the
username and the password.
2. Ask query process
The analytical operation of the question is found out. This analysis is responsible for processing
natural language processing (nlp). It is a technique to identify the type of a question, type of an
answer, subject, verb, noun, phrases and adjectives from the question. Tokens are separated from
the question and the meaning is analyzed and the reformulation of question/query is sent to the
next stage. The input is concerted into natural language and that is implemented using word
segmentation algorithm. In word segmentation algorithm the input query from the user is divided
as keywords which is further subdivided and searched in knowledge base forgetting correct
answers.

3. Query analysis and user answers


Once the Question posed by the user. That question goes under parsing ,segmentation, and removes
the stop words from the questions .It generates the proof once it completed using the first order
logic i.e. using the rule it find the answer in knowledge base and get back to the user.
4. Voting system
The Knowledge Base of this proposed system is domain specific. The storage of knowledge Base
is the necessary one to retrieve the relevant and correct answer from the knowledge base using the
rules. For that used the drool expert system and get voting in user using voting system.
5. User Integrated output
The system incrementally extends the knowledge base and includes both domain assertions and
inference methods. The system succeeds if it constructs a knowledge-base that is sufficient to
answer the question within time .The method consists of searching a state space in which states
are knowledge-base and operators select content from the knowledge-base being searched and add
it to the knowledge-base. Based on the knowledge base rules are written in drool expert system.

2.1.3 MODULES DIAGRAM


1. User Interface Design:

Blogger

Register or
Login
Database or
Question and answer
Server

2. Ask query process

User Login

Ask Question part?


Data Base or
Server
Answer Part
3. Query analysis and user answers

Ask Question?

User Answer

Data Base
or Server

4. Voting system

Ask Question?

User Answer

Data Base
or Server
Voting System

5. User integrated output


Ask Question?

User Answer

Data
Base
or
Voti No No Server
CHAPTER 3
REQUIREMENTS ENGINEERING
3.1 HARDWARE REQUIREMENTS
The hardware requirements may serve as the basis for a contract for the implementation of
the system and should therefore be a complete and consistent specification of the whole system.
They are used by software engineers as the starting point for the system design. It shows what the
system does and not how it should be implemented.
PROCESSOR : PENTIUM IV 2.6 GHz, Intel Core 2 Duo.
RAM : 512 MB DD RAM
MONITOR : 15” COLOR
HARD DISK : 40 GB

3.2 SOFTWARE REQUIREMENTS


The software requirements document is the specification of the system. It should include
both a definition and a specification of requirements. It is a set of what the system should do rather
than how it should do it. The software requirements provide a basis for creating the software
requirements specification. It is useful in estimating cost, planning team activities, performing
tasks and tracking the teams and tracking the team’s progress throughout the development activity.
FRONT END : JAVA (JSP, SERVLET)
BACK END : MY SQL 5.5
OPERATING SYSTEM : Windows 07
IDE : Eclipse
CHAPTER 4
DESIGN ENGINEERING
4.1 GENERAL
Design Engineering deals with the various UML [Unified Modeling language] diagrams for the
implementation of project. Design is a meaningful engineering representation of a thing that is to
be built. Software design is a process through which the requirements are translated into
representation of the software. Design is the place where quality is rendered in software
engineering. Design is the means to accurately translate customer requirements into finished
product.

4.1.1 USE CASE DIAGRAM

User
Login

Ask Question

Update server

User answer giving

Store to database View blogger


detail

Explanation:
This is a type of behavioral diagram defined by and created from a Use-case analysis. In this UML
diagram we present a actor behavior or role in that project.
4.1.2 CLASS DIAGRAM

User interface

LoginDao_In
terface

Login Dao
String password
String username

loginCheck()

Ask
Voting System
Question
String Text

askQues ()

voting()

Explanation:
This type of static structure diagram that describes the structure of a system by showing the
system’s classes, their attributes, operations (or methods), and the relationships among the classes.
User given query sent to server here user profile was generated. Based on user privacy
customization search it checks whether to personalize search results or not.

4.1.3 OBJECT DIAGRAM

Login
Ask Question

View Update Voting


Answer System
Server
Explanation:
Object diagram shows that what are the operations available and how workflow goes in proposed
system .Greedy IL generalize user profile according to given query.

4.1.4 SEQUENCE DIAGRAM

User Verifier Ask Question User Answer Voting System

username,password

Ask question user

User Answer

Give Vote for particular Question

Explanation:
This diagram shows how processes operate with one another and in what order. In this
project user given query was matched with user profiles and given to greedy IL after
personalization results given to user.
4.1.5 COLLABORATION DIAGRAM

User Ask Question

1: username,password

4: Give Vote for particular Question


3: User Answer 2: Ask question user

Verifier

Voting
User System
Answer

Explanation:
In this diagram user given query was sent to server and matched with user profile. Whether data
to be hided depend upon User privacy customization search, results given to user
4.1.6 State diagram

User

Verifier

Ask
Question

Answer
Question

Voting
System

Explanation:
A state diagram is a type of diagram used in computer science and related fields to describe
the behavior of systems. State diagrams require that the system described is composed of a finite
number of states; sometimes, this is indeed the case, while at other times this is a reasonable
abstraction. Here user given query was sent to query analysis and result was filtered. Filtered
results are sent to user
4.1.7 ACTIVITY DIAGRAM

Login

User

Register

Ask User Ask


Question Question

Answer user Answers


Question

Voting users Voting


System

Explanation:

In this diagram first we have to create a user profile to user given query. Greedy IL algorithm
generalizes user profiles and depending upon user profile results is personalized. At the end result
was sent to end user. In this diagram represents the behavior of personalization of search results.
4.1.8 COMPONENT DIAGRAM

Interface Package

Operations

Mysql
User Interface
5.5

Tomcat Blogger

Explanation:
This diagram depicts how components are wired together to form larger components. User gives
query in search box server, based on UPS results are filtered. End user receives the personalized
results.
4.1.9 DATA FLOW DIAGRAM
Level-0

User

Login Validate

True

Ask Question System

Ask Question
Level-1

Q&A
System

Ask Question Answer System

Voting System
4.1.10 E-R DIAGRAM

User

View

or Login

Ask qus
Q&A SYSTEM Answer
system
System

Result

Explanation:
Here sender and receiver is an entity and then password, name and port are all attributes,
then diamond box represents the relationship between the sender and receiver. This diagram
illustrates the relationship between database and entity
4.1.11 SYSTEM ARCHITECTURE

View Blogg User Login

Ask Question System

Answer System
Data Base or Server

View Answer Part

VS CS Sharing option

Explanation:
User profiles are generalized using greedy IL. The finding motivates us to maintain a priority
queue of candidate prune-leaf operators in descending order of the information loss caused by the
operator. This queue, denoted by Q, enables fast retrieval of the best so- far candidate operator.
Filtering results based on UPS and results are shown to user.
CHAPTER 5
DEVELOPMENT TOOLS
5.1 GENERAL
This chapter is about the software language and the tools used in the development of the project.
The platform used here is JAVA.
5.2 FEATURES OF JAVA

5.2.1 THE JAVA FRAMEWORK


Java is a programming language originally developed by James Gosling at Sun
Microsystemsand released in 1995 as a core component of Sun Microsystems' Java platform. The
language derives much of its syntax from C and C++ but has a simpler object model and fewer
low-level facilities. Java applications are typically compiled to bytecode that can run on any Java
Virtual Machine (JVM) regardless of computer architecture. Java is general-purpose, concurrent,
class-based, and object-oriented, and is specifically designed to have as few implementation
dependencies as possible. It is intended to let application developers "write once, run anywhere".
Java is considered by many as one of the most influential programming languages of the
20th century, and is widely used from application software to web applicationsThe java framework
is a new platform independent that simplifies application development internet.Java technology's
versatility, efficiency, platform portability, and security make it the ideal technology for network
computing. From laptops to datacenters, game consoles to scientific supercomputers, cell phones
to the Internet, Java is everywhere!

5.2.2 OBJECTIVES OF JAVA


To see places of Java in Action in our daily life, explore java.com.

Why Software Developers Choose Java


Java has been tested, refined, extended, and proven by a dedicated community. And numbering
more than 6.5 million developers, it's the largest and most active on the planet. With its versatility,
efficiency, and portability, Java has become invaluable to developers by enabling them to:
 Write software on one platform and run it on virtually any other platform
 Create programs to run within a Web browser and Web services
 Develop server-side applications for online forums, stores, polls, HTML forms processing,
and more
 Combine applications or services using the Java language to create highly customized
applications or services
 Write powerful and efficient applications for mobile phones, remote processors, low-cost
consumer products, and practically any other device with a digital heartbeat

Some Ways Software Developers Learn Java


 Today, many colleges and universities offer courses in programming for the Java platform.
In addition, developers can also enhance their Java programming skills by reading Sun's
java.sun.com Web site, subscribing to Java technology-focused newsletters, using the Java
Tutorial and the New to Java Programming Center, and signing up for Web, virtual, or
instructor-led courses.

Object Oriented
To be an Object Oriented language, any language must follow at least the four characteristics.
1. Inheritance :It is the process of creating the new classes and using the behavior of the
existing classes by extending them just to reuse the existing code and adding addition a
features as needed.
2. Encapsulation: It is the mechanism of combining the information and providing the
abstraction.
3. Polymorphism: As the name suggest one name multiple form, Polymorphism is the
way of providing the different functionality by thefunctions having the same name based
on the signatures of the methods.
4. Dynamicbinding: Sometimes we don't have the knowledge of objects about their
specific types while writing our code. It is the way of providing the maximum
functionality to a program about the specific type at runtime.
5.2.3 JavaServer Pages - An Overview
Java Server Pages or JSP for short is Sun's solution for developing dynamic web sites. JSP provide
excellent server side scripting support for creating database driven web applications. JSP enable
the developers to directly insert java code into jsp file, this makes the development process very
simple and its maintenance also becomes very easy.
JSP pages are efficient, it loads into the web servers memory on receiving the request very
first time and the subsequent calls are served within a very short period of time.
In today's environment most web sites servers dynamic pages based on user request.
Database is very convenient way to store the data of users and other things. JDBC provide excellent
database connectivity in heterogeneous database environment. Using JSP and JDBC its very
cceasy to develop database driven web application.
Java is known for its characteristic of "write once, run anywhere." JSP pages are
platfJavaServer Pages
JavaServer Pages (JSP) technology is the Java platform technology for delivering dynamic
content to web clients in a portable, secure and well-defined way. The JavaServer Pages
specification extends the Java Servlet API to provide web application developers with a robust
framework for creating dynamic web content on the server using HTML, and XML templates, and
Java code, which is secure, fast, and independent of server platforms.
JSP has been built on top of the Servlet API and utilizes Servlet semantics. JSP has become
the preferred request handler and response mechanism. Although JSP technology is going to be a
powerful successor to basic Servlets, they have an evolutionary relationship and can be used in a
cooperative and complementary manner.
Servlets are powerful and sometimes they are a bit cumbersome when it comes to
generating complex HTML. Most servlets contain a little code that handles application logic and
a lot more code that handles output formatting. This can make it difficult to separate and reuse
portions of the code when a different output format is needed. For these reasons, web application
developers turn towards JSP as their preferred servlet environment.
5.2.4 Evolution of Web Applications
Over the last few years, web server applications have evolved from static to dynamic applications.
This evolution became necessary due to some deficiencies in earlier web site design. For example,
to put more of business processes on the web, whether in business-to-consumer (B2C) or business-
to-business (B2B) markets, conventional web site design technologies are not enough. The main
issues, every developer faces when developing web applications, are:
1. Scalability - a successful site will have more users and as the number of users is increasing
fastly, the web applications have to scale correspondingly.
2. Integration of data and business logic - the web is just another way to conduct business, and so
it should be able to use the same middle-tier and data-access code.
3. Manageability - web sites just keep getting bigger and we need some viable mechanism to
manage the ever-increasing content and its interaction with business systems.
4. Personalization - adding a personal touch to the web page becomes an essential factor to keep
our customer coming back again. Knowing their preferences, allowing them to configure the
information they view, remembering their past transactions or frequent search keywords are all
important in providing feedback and interaction from what is otherwise a fairly one-sided
conversation.
Apart from these general needs for a business-oriented web site, the necessity for new technologies
to create robust, dynamic and compact server-side web applications has been realized. The main
characteristics of today's dynamic web server applications are as follows:
1. Serve HTML and XML, and stream data to the web client
2. Separate presentation, logic and data
3. Interface to databases, other Java applications, CORBA, directory and mail services
4. Make use of application server middleware to provide transactional support.
5. Track client sessions.

5.2.5 Benefits of JSP


One of the main reasons why the JavaServer Pages technology has evolved into what it is
today and it is still evolving is the overwhelming technical need to simplify application design by
separating dynamic content from static template display data. Another benefit of utilizing JSP is
that it allows to more cleanly separate the roles of web application/HTML designer from a software
developer. The JSP technology is blessed with a number of exciting benefits, which are chronicled
as follows:
1. The JSP technology is platform independent, in its dynamic web pages, its web servers, and its
underlying server components. That is, JSP pages perform perfectly without any hassle on any
platform, run on any web server, and web-enabled application server. The JSP pages can be
accessed from any web server.
2. The JSP technology emphasizes the use of reusable components. These components can be
combined or manipulated towards developing more purposeful components and page design. This
definitely reduces development time apart from the At development time, JSPs are very different
from Servlets, however, they are precompiled into Servlets at run time and executed by a JSP
engine which is installed on a Web-enabled application server such as BEA WebLogic and IBM
WebSphere.

5.3Servlets
Earlier in client- server computing, each application had its own client program and it
worked as a user interface and need to be installed on each user's personal computer. Most web
applications use HTML/XHTML that are mostly supported by all the browsers and web pages are
displayed to the client as static documents.
A web page can merely displays static content and it also lets the user navigate through the
content, but a web application provides a more interactive experience.
Any computer running Servlets or JSP needs to have a container. A container is nothing
but a piece of software responsible for loading, executing and unloading the Servlets and JSP.
While servlets can be used to extend the functionality of any Java- enabled server.
They are mostly used to extend web servers, and are efficient replacement for CGI scripts.
CGI was one of the earliest and most prominent server side dynamic content solutions, so before
going forward it is very important to know the difference between CGI and the Servlets.

5.4 Java Servlets


Java Servlet is a generic server extension that means a java class can be loaded dynamically
to expand the functionality of a server. Servlets are used with web servers and run inside a Java
Virtual Machine (JVM) on the server so these are safe and portable.
Unlike applets they do not require support for java in the web browser. Unlike CGI, servlets
don't use multiple processes to handle separate request. Servets can be handled by separate threads
within the same process. Servlets are also portable and platform independent.
A web server is the combination of computer and the program installed on it. Web server
interacts with the client through a web browser. It delivers the web pages to the client and to an
application by using the web browser and he HTTP protocols respectively.
The define the web server as the package of large number of programs installed on a
computer connected to Internet or intranet for downloading the requested files using File Transfer
Protocol, serving e-mail and building and publishing web pages. A web server works on a client
server model.
CHAPTER 6
IMPLEMENTATION

6.1 CODING

home.jsp

<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@page import="com.DBConnection.DBConnection"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="com.impl.QuestionProcessImpl"%>
<%@page import="com.interfaces.QuesandAns"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<link href="css/structure.css" rel="stylesheet" type="text/css" />

<title>Qus&&Ans</title>
</head>
<div id="top">
<div id="topc">
<a href="Login.jsp" style="color: white;" id="bg1">Log in</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="Register.jsp" style="color: white;">Sign up</a>

</div>
</div>
<script >
function link() {
window.location.replace('http://localhost:8080/OwnConcept/Register.jsp');
}
</script>
<body>
<div id="nav">
<div id="navcontent">
<button id="bg" >Question</button>
<button id="bg">User</button>
</div>
<div id="navsignup">
<h4>Jcup Overflow is a community of 1.7 million programmers, just like you, helping each
other. Join them; it only takes a minute:</h4><button id="ss" onclick="link();">Sign
up</button>
</div>
<%
DBConnection con=new DBConnection();
Connection conn=con.con();
ResultSet rs=null;
Statement st=conn.createStatement();
rs=st.executeQuery("SELECT * FROM quesandans.metatablekey m");

%>
<div id="navqus1">
<table>
<%while(rs.next()){ %>
<tr ><td></td><td></td><td></td><td align="center" style=" border-style: ridge; border-color:
#FFA6FF;background-color: white;"><%=rs.getString(3) %><br>
Vote</td><td></td><td></td><td></td>
<td align="center" style="border-style: ridge; background-color: white;border-color:
#FFA6FF;color: blue;font-weight: bold;"><%=rs.getString(7) %><br>
answer</td><td></td><td></td><td></td>
<td align="center" style="border-style: ridge;background-color:white;"><%=rs.getString(4)
%><br> views</td></tr>
<%} %>
</table>
</div>
<div id="navqus">
<table>
<%
Statement st1=conn.createStatement();
ResultSet r1=st1.executeQuery("SELECT * FROM quesandans.metatablekey m");
while(r1.next()){ %>
<tr><td style="border-bottom-style: ridge; width: 800px;"><h3><a
href="viewcount.jsp?qusid=<%=r1.getString(1)%>"><%=r1.getString(2) %></a></h3></td><td
style="border-bottom-style:ridge; color: blue;">Posted by <%=r1.getString(6) %></tr>
<%} %>
</table>
</div>
</div>
</body>
</html>
Login.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="css/structure.css" rel="stylesheet" type="text/css" />
<link href="css/login.css" rel="stylesheet" type="text/css" />
<title>Qus&&Ans</title>
</head>
<div id="top">
<div id="topc">
<a href="Login.jsp" style="color: white;">Sign in</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="Register.jsp" style="color: white;">Sign up</a>
</div>
</div>
<body>
<div id="nav">
<div id="navcontent">
<button id="bg">Question</button>
<button id="bg">User</button>
<button id="bg">Question</button>
<button id="bg">Question</button>
<button id="bg">Question</button>
</div>
<div id="logins">
</div>
</div>
<div id="loginb">
<div id="loginicon">
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="www.google.com">
<img alt="" src="Images/g+.JPG"></a>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;Or&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="www.facebook.com"><img alt="" src="Images/facebook.JPG"></a>
</div>
<form action="Login" method="post">
<div id="logininput">
<label>Email</label><br>
<input type="text" name="email" placeholder="ram@gmail.com">
<br><br>
<label>Password</label><br>
<input type="password" name="pass" placeholder="*********">
<br><br>
<input type="submit" value="Log in">
</div>
</form>
</body>
<body>
</body>
</html>
Login.java
package com.controller;
import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.BeanClass.UserBean;
import com.impl.Implementaion;
import com.interfaces.UserInter;
/**
* Servlet implementation class Login
*/
@WebServlet("/Login")
public class Login extends HttpServlet {
private static final long serialVersionUID = 1L;

/**
* @see HttpServlet#HttpServlet()
*/
public Login() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
// TODO Auto-generated method stub
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
System.out.println("This is login page servlet");
String email=request.getParameter("email");
String pass=request.getParameter("pass");
UserBean ubean=new UserBean();
ubean.setEmail(email);
ubean.setPass(pass);
UserInter in=new Implementaion();
ArrayList< String > al=new ArrayList<>();
al=in.login(ubean);
if(al.size()>0){
String uname=al.get(0);
String uid=al.get(2);
response.sendRedirect("Userhome.jsp?uname="+uname+"&&uid="+uid);
}
}
}
NewTable.java
package com.Servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.BeanClass.ImageDetails;
import com.Implementation.Implementaion;
import com.Interface.ISearchInterface;
/**
* Servlet implementation class NewTable
*/
@WebServlet("/NewTable")
public class NewTable extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public NewTable() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
// TODO Auto-generated method stub
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
String tablename=request.getParameter("tname");
ImageDetails ibean=new ImageDetails();
ibean.setFilename(tablename);
ISearchInterface in=new Implementaion();
int i=in.newtable(ibean);
if(i==1){response.sendRedirect("home.jsp");}else{response.sendRedirect("error.jsp");}
}
}
UploadFile.java
package com.Servlet;
import java.beans.beancontext.BeanContext;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.BeanClass.ImageDetails;
import com.Implementation.Implementaion;
import com.Interface.ISearchInterface;
import com.oreilly.servlet.multipart.FilePart;
import com.oreilly.servlet.multipart.MultipartParser;
import com.oreilly.servlet.multipart.ParamPart;
import com.oreilly.servlet.multipart.Part;
@WebServlet("/UploadFile")
public class UploadFile extends HttpServlet {
private static final long serialVersionUID = 1L;
public UploadFile() {
super();
}
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
}
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String fileToupload = null;
int imagesiz = 0, rank = 0;
double insert = 0;
String fileName = null;
MultipartParser mp = new MultipartParser(request, 999999999);
Part part = null;
FilePart filePart = null;
ParamPart paramPart = null;
// Bean Class
ImageDetails ibean = new ImageDetails();
// Interface process
ISearchInterface inter = new Implementaion();
while ((part = mp.readNextPart()) != null) {
fileToupload = getServletContext().getRealPath("/");
System.out.println(fileToupload);
// bean.setPath(fileToupload);
System.out.println(fileToupload);
fileToupload = fileToupload.substring(0, fileToupload.indexOf("."))
+ "I-iSearch\\WebContent\\Imagestorage\\";
if (part.isFile()) {
filePart = (FilePart) part;
fileName = filePart.getFileName();
fileToupload = fileToupload + fileName;
System.out.println(fileToupload + "&**(()))");
File file = new File(fileToupload);
String absolutepath = file.getAbsolutePath();
System.out.println(absolutepath + "absolutepath");
// fileToupload = fileToupload + "\\" +fileName ;
File uploadedFile = new File(absolutepath);
double fileSize = filePart.writeTo(uploadedFile);
/*
* long round=Math.round(fileSize); long imagesize=round/1024;
* int imagesiz=(int) imagesize;
*/
imagesiz = (int) fileSize;
// bean.setFileSize1(fileSize);
System.out.println(" fileSize = " + fileSize);
} else if (part.isParam()) {
paramPart = (ParamPart) part;
String tagName = paramPart.getName();
System.out.println("tagName = " + tagName);
String tagValue = paramPart.getStringValue();
rank=Integer.parseInt(tagValue);
System.out.println("tagValue = " + rank);
ibean.setImagerank(rank);
ArrayList<String> paramValues = new ArrayList<String>();
paramValues.add(tagValue);
System.out.println(paramValues.size() + "arrayvalue");
ibean.setImagesdetail(paramValues);
}
}
// calling interface
ibean.setImagerank(rank);
ibean.setFilename(fileName);
ibean.setImagesize(imagesiz);
ibean.setPath(fileToupload);
insert = inter.imagedetail(ibean);
if (insert > 0) {
RequestDispatcher rd = request
.getRequestDispatcher("Store.jsp");
rd.forward(request, response);
} else {
RequestDispatcher rd = request.getRequestDispatcher("error.jsp");
rd.forward(request, response);
}
}
}
Implementation.java
package com.Implementation;

import java.beans.beancontext.BeanContext;
import java.io.File;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import com.BeanClass.ImageDetails;
import com.DBConnection.DBConnection;
import com.Interface.ISearchInterface;
publicclass Implementaion implements ISearchInterface
{
static DBConnection connection=new DBConnection();
Connection con=null;
PreparedStatement ps=null,ps1=null,ps2=null;
String iname=null;
publicint imagedetail(ImageDetails ibean)
{
int i=0,size,size1;
size=ibean.getImagesize();
size1=size/1024;
ArrayList< String>arr=new ArrayList<>();
String id=ibean.getFilename();
System.out.println("output"+id);
try {
System.out.println("ImageDteial");
con =connection.con();
if(id.charAt(0)=='a'){
ps=con.prepareStatement("INSERT INTO
isearch.apple(imagename,imagesize,initialrank,dynamiccount) VALUES(?,?,?,?)");
}
elseif(id.charAt(0)=='b'){ps=con.prepareStatement("INSERT INTO
isearch.bird(imagename,imagesize,initialrank,dynamiccount) VALUES(?,?,?,?)");}
elseif(id.charAt(0)=='o'){ps=con.prepareStatement("INSERT INTO
isearch.orange(imagename,imagesize,initialrank,dynamiccount) VALUES(?,?,?,?)");}
elseif(id.charAt(0)=='m'){ps=con.prepareStatement("INSERT INTO
isearch.mango(imagename,imagesize,initialrank,dynamiccount) VALUES(?,?,?,?)");}
elseif(id.charAt(0)=='k'){ps=con.prepareStatement("INSERT INTO isearch.abdul
kalam(imagename,imagesize,initialrank,dynamiccount) VALUES(?,?,?,?)");}
elseif(id.charAt(0)=='s'){ps=con.prepareStatement("INSERT INTO isearch.steve
jobs(imagename,imagesize,initialrank,dynamiccount) VALUES(?,?,?,?)");}
ps.setString(1, ibean.getFilename());
ps.setInt(2,size1);
ps.setInt(3,ibean.getImagerank());
ps.setInt(4, 0);
i=ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}
return i;
}
@Override
publicint newtable(ImageDetails ibean) {
// TODO Auto-generated method stub
Statement stmt;
int i=0;
try {
con=connection.con();
PreparedStatement st;
stmt = con.createStatement();
st=con.prepareStatement("INSERT INTO isearch.imagecollection VALUES(?)");
st.setString(1, ibean.getFilename());
String sql = "CREATE TABLE " +ibean.getFilename()+
"(imagename VARCHAR(45) not NULL, " +
" imagesize INTEGER(45), " +
" initialrank INTEGER(45), " +
" dynamiccount INTEGER(45), " +
" PRIMARY KEY (imagename ))";
i=st.executeUpdate();
stmt.executeUpdate(sql);
System.out.println("%^^%^^%"+i);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

return i;
}
@Override
publicint refresh(String refreshdate) {
// TODO Auto-generated method stub
int i=0;
try {
con=connection.con();
ps=con.prepareStatement("UPDATE isearch.operation o SET refreshdate='"+refreshdate+"'
where id=1");
i=ps.executeUpdate();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return i;
}
@Override
publicint delete(String refreshdate) {
int j=0;
try {
iname=refreshdate;
int i=0;
ResultSet rs=null,rs1=null;
con=connection.con();
ps=con.prepareStatement("SELECT imagename, min(dynamiccount) FROM
isearch."+refreshdate+ " GROUP BY imagename");
rs=ps.executeQuery();
while(rs.next()){i=rs.getInt(2);
iname=rs.getString(1);
File file=newFile("D:\\WORKSPACE1(2015-2016)\\I-
iSearch\\WebContent\\Imagestorage\\"+iname);
file.delete();
}
ps1=con.prepareStatement("DELETE FROM isearch."+refreshdate+ " WHERE
dynamiccount="+i);
j=ps1.executeUpdate();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return j;
}
@Override
public String getdate() {
String date=null;
ResultSet rs;
try {
con=connection.con();
ps=con.prepareStatement("SELECT refreshdate FROM isearch.operation where id=1");
rs=ps.executeQuery();
while(rs.next()){date=rs.getString(1);}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return date;
}
}

Index.html
<!DOCTYPEhtmlPUBLIC"-//W3C//DTD HTML 4.01
Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html; charset=ISO-8859-1">
<metahttp-equiv="Content-Type"content="text/html; charset=utf-8"/>
<linkhref="css/style.css"rel="stylesheet"type="text/css"/>
<linkrel="stylesheet"type="text/css"href="styles.css"/>
<scripttype="text/javascript"src="js/jquery-1.4.2.min.js"></script>
<scriptsrc="js/jquery.autocomplete.js"></script>
<script>
jQuery(function() {
$("#s").keyup(function() {
$("#disjunctive").autocomplete("list.jsp");
var value = "";
$.ajax({
url :"autocontroller.jsp?q=" + $("#s").val(),
//type: "post",
data : value,
cache :false,
success :function(data) {
//alert(data);
$('#msg_Display').html(data);
}
});
});
$("#s").change(function() {
});
});
</script>
<title>i Search</title>
</head>
<body>
<divid="page">
<formaction="dyanamicsearch.jsp">
<divid="searchForm">
<fieldset>
<br><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br><imgsrc="img/i2.gif"width="200"height="150"
class="under"/><imgsrc="img/i10.png"width="220"height="200"class="over"/>
<imgsrc="img/i3.gif"width="150"height="200"class="row"/>
<inputtype="text"name="disjunctive"id="s"id="country"/>
<inputtype="submit"value="search"id="submitButton"/>
<divid="msg_Display"></div>
</fieldset>
</div>
</form>
</div>
</body>
</html>
Agenthome.jsp
<%@pagelanguage="java"contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@pageimport="java.sql.*"%>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0
Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WCSST 19</title>
<metahttp-equiv="Content-type"content="text/html; charset=utf-8"/>
<linkrel="shortcut icon"type="image/x-icon"
href="css/images/favicon.ico"/>
<linkrel="stylesheet"href="css/style.css"type="text/css"media="all"/>
<linkrel="stylesheet"href="css/prettyCheckboxes.css"type="text/css"
media="all"/>
<linkrel="stylesheet"href="css/customScroller.css"type="text/css"
media="all"/>
<scriptsrc="js/jquery-1.4.2.js"type="text/javascript"></script>
<scriptsrc="js/prettyCheckboxes.js"type="text/javascript"></script>
<scriptsrc="js/jquery.customScroller-1.2.js"type="text/javascript"></script>
<scriptsrc="js/js-func.js"type="text/javascript"></script>
<!--[if IE 6]>
<link rel="stylesheet" href="css/ie6.css" type="text/css" media="all" />
<script src="js/png-fix.js" type="text/javascript"></script>
<![endif]-->
<scripttype="text/javascript"src='js/jquery.min.js'></script>
</head>
<script>function startTime() {
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
m = checkTime(m);
s = checkTime(s);
document.getElementById('txt').innerHTML = h+":"+m+":"+s;
vart = setTimeout(function(){startTime()},500);
}
function checkTime(i) {
if (i<10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}</script>
<bodyonload="startTime()">
<!-- START PAGE SOURCE -->
<divclass="shell">
<divclass="gallery">
<divclass="gallery-t">
<divclass="gallery-head">
<divclass="category">
<ahref="#">Category</a>
<divclass="dd-holder">
<divclass="dd-t"></div>
<divclass="dd">
<divclass="dd-inner">
</div>
<divclass="cl">&nbsp;</div>
</div>
<divclass="dd-b"></div>
</div>
</div>
<divclass="sort-by">
<h3>Time:</h3>
<divclass="custom-checkboxes">
<formaction="#"method="post">
<fontcolor:"red"> <divid="txt">
</div></font>
</form>
<divclass="cl">&nbsp;</div>
</div>
<divclass="cl">&nbsp;</div>
</div>
<divclass="cl">&nbsp;</div>
</div>
<divclass="gallery-holder">
<divclass="gallery-content">
<ul>
<%
String name = request.getParameter("disjunctive").toString();
// String
url="http://www.google.co.in/search?hl=en&site=imghp&tbm=isch&source=hp&biw=1366&bi
h=667&q="+name+"&oq=ap&gs_l=img.1.0.0l10.3415.4554.0.5850.2.2.0.0.0.0.139.235.1j1.2.0..
..0...1ac.1.64.img..0.2.234.RvDonERYvIY";
//response.sendRedirect(url);
session.setAttribute("mainkey", name);
System.out.print("######"+name);
String iname=null;
int Size=0;
ResultSet rs=null;
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/isearch", "root",
"root");
PreparedStatement st=con.prepareStatement("select imagename,imagesize,dynamiccount from
isearch."+name+ " order by dynamiccount desc");
rs=st.executeQuery();
while(rs.next())
{
%>
<li><ahref="#"><img
src="Imagestorage/<%=iname=rs.getString(1) %>"width="110"
height="110"alt=""/></a>
<divclass="image-hover">
<h6>Size:<%=Size=rs.getInt(2) %></h6>
<a>Most View:<%=Size=rs.getInt(3) %></a>
<ahref="count.jsp?lol=<%=iname=rs.getString(1) %>">click me</a>
</div></li>
<%} %>
</ul>
<divclass="gallery-b">&nbsp;</div>
</div>
</div>
</div>
</div>
</div>
<divclass="footer">
<pclass="lf">
Copyright &copy; 2010 <ahref="#">SiteName</a> - All Rights Reserved
</p>
<pclass="rf">
Design by <ahref="http://www.websitecsstemplates.com/"
target="_blank">WebsiteCSSTemplates</a>
</p>
<divstyle="clear: both;"></div>
</div>
<!-- END PAGE SOURCE -->
</body>
</html>
CHAPTER 7
VARIOUS SNAPSHOTS

7.1 General

Snapshot is nothing but every moment of the application while running. It gives the clear
elaborated of application. It will be useful for the new user to understand for the future steps.

7.2VARIOUS SNAPSHOTS

SNAPSHOT 1
Home Page:
START UP PAGE

RUN
SIGN UP

LOG IN
POSTING QUESTION

POSTING ANSWER
COMMENTS(LIKES &DISLIKES)

CHECKING FOR QUESTIONS


CHAPTER 8
SOFTWARE TESTING
8.1 GENERAL
The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the functionality
of components, sub assemblies, assemblies and/or a finished product It is the process of exercising
software with the intent of ensuring that the Software system meets its requirements and user
expectations and does not fail in an unacceptable manner. There are various types of test. Each test
type addresses a specific testing requirement.

8.2 DEVELOPING METHODOLOGIES


The test process is initiated by developing a comprehensive plan to test the general
functionality and special features on a variety of platform combinations. Strict quality control
procedures are used.
The process verifies that the application meets the requirements specified in the system
requirements document and is bug free. The following are the considerations used to develop the
framework from developing the testing methodologies.

8.3Types of Tests

8.3.1 Unit testing


Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program input produce valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. Unit tests perform
basic tests at component level and test a specific business process, application, and/or system
configuration. Unit tests ensure that each unique path of a business process performs accurately to
the documented specifications and contains clearly defined inputs and expected results.
8.3.2 Functional test
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.
Functional testing is centered on the following items:
Valid Input : identified classes of valid input must be accepted.
Invalid Input : identified classes of invalid input must be rejected.
Functions : identified functions must be exercised.
Output : identified classes of application outputs must be exercised.
Systems/Procedures: interfacing systems or procedures must be invoked.

8.3.3 System Test


System testing ensures that the entire integrated software system meets requirements. It
tests a configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions and
flows, emphasizing pre-driven process links and integration points.

8.3.4 Performance Test


The Performance test ensures that the output be produced within the time limits,and the
time taken by the system for compiling, giving response to the users and request being send to the
system for to retrieve the results.

8.3.5 Integration Testing


Software integration testing is the incremental integration testing of two or more integrated
software components on a single platform to produce failures caused by interface defects.
The task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company level –
interact without error.

8.3.6 Acceptance Testing


User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional requirements.
Acceptance testing for Data Synchronization:
 The Acknowledgements will be received by the Sender Node after the Packets are received
by the Destination Node
 The Route add operation is done only when there is a Route request in need
 The Status of Nodes information is done automatically in the Cache Updation process

8.2.7 Build the test plan

Any project can be divided into units that can be further performed for detailed processing.
Then a testing strategy for each of this unit is carried out. Unit testing helps to identity the possible
bugs in the individual component, so the component that has bugs can be identified and can be
rectified from errors.
CHAPTER 9

APPLICATION

9.1 GENERAL

It describes about various applications of personalized web search.

9.2 APPLICATIONS

 Search personalization in MSN.


 Search personalization in Google.

9.3 FUTURE ENHANCEMENT:


For future work, since improving the efficiency of SMINn is an important first step for
improving the performance of our PPkNN protocol, we plan to investigate alternative and more
efficient solutions to the SMINn problem in our future work.
CHAPTER 10

10.1 CONCLUSION

To protect user privacy, various privacy-preserving classification techniques have been


proposed over the past decade. The existing techniques are not applicable to outsourced database
environments where the data resides in encrypted form on a third-party server. This paper proposed
a novel privacy-preserving k-NN classification protocol over encrypted data in the cloud. Our
protocol protects the confidentiality of the data, user’s input query, and hides the data access
patterns. We also evaluated the performance of our protocol under different parameter settings.

10.2 REFERENCE:

[1]P. Mell and T. Grance, “The NIST definition of cloud computing (draft),” NIST Special
Publication, vol. 800, p. 145, 2011.
[2] S. De Capitani di Vimercati, S. Foresti, and P. Samarati, “Managing and accessing data in the
cloud: Privacy risks and approaches,” in Proc. 7th Int. Conf. Risk Security Internet Syst., 2012,pp.
1–9.1272 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 27,
NO. 5, MAY 2015
[3] P. Williams, R. Sion, and B. Carbunar, “Building castles out of mud: Practical access pattern
privacy and correctness on UN trusted storage,” in Proc. 15th ACM Conf. Compute. Common.
Security, 2008, pp. 139–148.
[4] P. Paillier, “Public key cryptosystems based on composite degree residuosity classes,” in Proc.
17th Int. Conf. Theory Appl. Cryptographic Techn., 1999, pp. 223–238.
[5] B. K. Samanthula, Y. Elmehdwi, and W. Jiang, “k-nearest neighborclassification over
semantically secure encrypted relational data,”eprint arXiv:1403.5001, 2014.
[6] C. Gentry, “Fully homomorphic encryption using ideal lattices,”in Proc. 41st Annu. ACM
Sympos. Theory Comput., 2009, pp. 169–178.
[7] C. Gentry and S. Halevi, “Implementing gentry’s fully-homomorphic encryption scheme,” in
Proc. 30th Annu. Int. Conf. Theory Appl. Cryptographic Techn.: Adv. Cryptol., 2011, pp. 129–
148.
[8] A. Shamir, “How to share a secret,” Commun. ACM, vol. 22,pp. 612–613, 1979.
[9] D. Bogdanov, S. Laur, and J. Willemson, “Sharemind: A framework for fast privacy-preserving
computations,” in Proc. 13th Eur.Symp. Res. Comput. Security: Comput. Security, 2008, pp. 192–
206.
[10] R. Agrawal and R. Srikant, “Privacy-preserving data mining,”ACM Sigmod Rec., vol. 29, pp.
439–450, 2000.
[11] Y. Lindell and B. Pinkas, “Privacy preserving data mining,” inProc.20th Annu. Int. Cryptol.
Conf. Adv. Cryptol., 2000, pp. 36–54.
[12] P. Zhang, Y. Tong, S. Tang, and D. Yang, “Privacy preserving Naive Bayes classification,”
in Proc. 1st Int. Conf. Adv. Data Mining Appl., 2005, pp. 744–752.

Das könnte Ihnen auch gefallen