Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 79

DIVISION OF INFORMATION TECHNOLOGY

SCHOOL OF ENGINEERING

B.TECH IN INFORMATION TECHNOLOGY

SEMESTER VII
2009-2010

MINI PROJECT REPORT

ON

AI SOFT
Submitted By

JAYAKUMAR KANIYERI
MOHAMMED SHIYAD
SANGEETH.K.S

DONE AT DIVISION OF INFORMATION TECHNOLOGY


SCHOOL OF ENGINEERING COCHIN UNIVERSITY OF SCIENCE AND
TECHNOLOGY,KOCHI-682022

1|Page
DIVISION OF INFORMATION TECHNOLOGY
SCHOOL OF ENGINEERING
COCHIN UNIVERSITY OF SCIENCE AND
TECHNOLOGY
KOCHI-682022

CERTIFICATE

This is to certify that the Mini Project report entitled AI SOFT is a bonafide record
of the work done by JAYAKUMAR, MOHEMMED SHIYAD and
SANGEETH.K.S of VII semester for the partial fulfillment of the award of B-Tech
Degree in information technology during the academic year 2009-2010.

Mrs.Sariga Raj Mr. Dr.Philip Samuel


Lecturer Head of Department
Division of Information Technology Division of Information
Technology SOE cusat
SOE cusat

2|Page
ACKNOWLEDGEMENT

It is a great pleasure to express my sincere thanks to people who have


contributed to my learning through their support, encouragement and guidance. I
thank lord almighty for the strength and blessings endowed on me for
accomplishing the task.

I would like to thank Mr. Dr. Phillip Samuel, Head of Department for
providing us all the facilities for doing our work.

I wish to express my great gratitude to my faculty guide Mrs. Sariga Raj


for his able guidance throughout the completion of the project. During the project
work, I received cheerful co-operation and valuable help from my friends and
parents. I thank them for their active support.

Once again I express my heart-felt gratitude toward all those who have
helped me with their timely assistance and valuable suggestions for the completion
of my project.

JAYAKUMAR KANIYERI
MOHAMMED SHIYAD
SANGEETH.K.S

3|Page
TABLE OF CONTENTS

1. Introduction 6

2. Technology Used 7

3. SRS 8

4. System Design 22

5. Implementation 45

6. Test and Result 53

7. Conclusion and Future Use 56

8. Reference 57

9. Screenshots 58

10.Relevant codes 72

4|Page
ABSTRACT

Intelligence is the computational part of the ability to achieve goals in the world. Varying
kinds and degrees of intelligence occur in people, many animals and some machines. Where as
AI is the science and engineering of making intelligent machines, especially intelligent computer
programs. It is related to the similar task of using computers to understand human intelligence,
but AI does not have to confine itself to methods that are biologically observable.

One of the central factors influencing the process and the outcome of technology transfer
is the nature of the technology being transferred. It attempts to indicate the peculiarities of AI in
this context and move towards a framework to assist recipient decision makers in optimizing the
formulation of their policies on AI technology transfer. The five AI characteristics identified here
relate to complexity, localization, uncertainty, capital intensiveness and awareness. Some of
these features are in principle common with other high technologies, but still bear some aspects
specific to AI, albeit only the intensity with which they characterize the technology. The
complexity of AI technology partially stems from its multi-disciplinary nature. Certain sub-areas
of AI are locally bound and therefore need local innovative capabilities to develop on the
fundamental concepts. The uncertainty in AI projects stems mainly from the two factors of high
rate of change and the difficulties of quantifying the gains of transferring cognitive load from
human to machine. Expensive human skill and enabling technologies are required to develop,
maintain and use AI systems efficiently, making such projects highly capital intensive. Finally,
AI is a young field and is not always completely open about itself which makes the decision
makers' awareness an important issue to be addressed in the growth of AI applications.

The major ways of solving problem in AI is


1. Match finding

2. Neural network

3. Expert system

4. Genetic algorithm

5|Page
5.

Our aim is to implement the Tictacto game in the netowrk so that


1. Two users can play at the same time

2. User should be able to play with the computer

TECHNOLOGY USED IN THIS PROJECT


1) Networking
2) Services
3) Private Assembly
4) ODBC
5) AI – Knowledge base

System Requirements:
Hardware requirements
Processor : PIII or above
RAM : 256 or above
HD : 20GB or above
FD, CDROM, Mouse, Keyboard.
Software Requirements
Operating System : Win2000 family or above
Data Base : SQL Server
Programming Lang. : C#
Technology : .NET

6|Page
INTRODUCTION

Intelligence is the computational part of the ability to achieve goals in the world. Varying
kinds and degrees of intelligence occur in people, many animals and some machines. Where as
AI is the science and engineering of making intelligent machines, especially intelligent computer
programs. It is related to the similar task of using computers to understand human intelligence,
but AI does not have to confine itself to methods that are biologically observable.

One of the central factors influencing the process and the outcome of technology transfer
is the nature of the technology being transferred. It attempts to indicate the peculiarities of AI in
this context and move towards a framework to assist recipient decision makers in optimizing the
formulation of their policies on AI technology transfer. The five AI characteristics identified here
relate to complexity, localization, uncertainty, capital intensiveness and awareness. Some of
these features are in principle common with other high technologies, but still bear some aspects
specific to AI, albeit only the intensity with which they characterize the technology. The
complexity of AI technology partially stems from its multi-disciplinary nature. Certain sub-areas
of AI are locally bound and therefore need local innovative capabilities to develop on the
fundamental concepts. The uncertainty in AI projects stems mainly from the two factors of high
rate of change and the difficulties of quantifying the gains of transferring cognitive load from
human to machine. Expensive human skill and enabling technologies are required to develop,
maintain and use AI systems efficiently, making such projects highly capital intensive. Finally,
AI is a young field and is not always completely open about itself which makes the decision
makers' awareness an important issue to be addressed in the growth of AI applications.

7|Page
SYSTEM STUDY

System study is the first stage of system development life cycle. This
gives a clear picture of what actually the physical system is? The system study
is done in two phases. In the first phase, the preliminary survey of the system
is done which helps in identifying the scope of the system. The second phase
of the system study is more detailed and in-depth study in which the
identification of user’s requirement and the limitations and problems of the
present system are studied. After completing the system study, a system
proposal is prepared by the user.

2.1 Existing System


There are somany softwares for manipulating images but all these softwares use the
hard disk for storing images.Allmost all softwares are not userfriendly means if we are
not trained cannot use that software.
Drawbacks:
 Time consuming
 Required more hardware resources
 Not user friendly

2.2 Proposed System


IDBMS is an user friendly system ,anyone can use this system without any
training.IDBMS provide an option for users to store their images not only on hard disk
but also on database too, thereby it gives the security .Software also provide an option for
retrieving images from videos also.

2.3 SYSTEMANALYSIS
System analysis is the process of gathering and interpreting facts,
diagnosing problems and using the information to recommended
improvements on the system. System analysis is a problem solving activity

8|Page
that requires intensive communication between the system users and system
developers. System analysis or study is an important phase of any system
development process. The system is studied to the minutest detail and
analyzed. The system analyst plays the role of the interrogator and dwells
deep into the working of the present system. The system is viewed as a whole
and the input to the system are identified. The outputs from the organizations
are traced to the various processes.

A detailed study of the process must be made by various techniques


like interviews, questionnaires etc. The data collected by these sources must
be scrutinized to arrive to a conclusion. The conclusion is an understanding of
how the system functions. This system is called the existing system. Now the
existing system is subjected to close study and problem areas are identified.

The designer now functions as a problem solver and tries to sort out the
difficulties that the enterprise faces. The solutions are given as proposals. The
proposal is then weighed with the existing system analytically and the best
one is selected. The proposal is presented to the user for an endorsement by
the user. The proposal is reviewed on user request and suitable changes are
made. This is loop that ends as soon as the user is satisfied with proposal.
Preliminary study is the process of gathering and interpreting facts,
using the information for further studies on the system. Preliminary study is
problem solving activity that requires intensive communication between the
system users and system developers. It does various feasibility studies. In
these studies a rough figure of the system activities can be obtained, from
which the decision about the strategies to be followed for effective system
study and analysis can be taken.

9|Page
2.3.1 Package Selection

C # .NET

C # .NET is considered as a pure object oriented programming language


because without using a class, programs cannot be written. .NET allows
different languages to target a managed environment and to interoperate
securely and efficiently. Languages that target the CLR are compiled to
Microsoft Intermediate Language (MSIL).

One purpose of the .NET Framework is to simplify application


development and deployment in the distributed Internet environment. This
extends to applications that are run locally or remotely or that are distributed
over the Internet. This simplification is achieved through a common language
runtime (CLR) that provides a managed execution environment available to

any language that targets the runtime. The functionality this execution
environment provides is made available to these languages through the .NET
Framework class library.
The CLR provides a target that's available from most of the major
programming languages used today. Visual Studio .NET has support for
Visual C++, Visual Basic .NET, Visual J# .NET, and Visual C# out of the
box. You can add support for a growing number of languages that are
available from third-party software vendors, including COBOL, Eiffel,
Python, and Perl.
The CLR and the .NET Framework class library are the two major
components of the .NET Framework.

10 | P a g e
.NET FRAMEWORK-AN OVERVIEW
The .Net Framework is made up of four parts,

 The Common Language Runtime


 A Set of Class Libraries
 A Set of Programming Languages
 ASP.NET Environment

The .NET Framework was intended to make Windows application much


more reliable, while also providing an application with greater degree of
security. It was intended to simplify the development of web application and
services. The framework was designed to provide a single set of libraries that
would work with multiple languages. The .NET Framework is a common
environment for running Web applications and Web libraries-like ADO.NET,
ASP.NET and Windows forms- to provide advanced standard services that
can be integrated onto a variety of computer systems. The Framework
provides- rich application environment, simplified development and easy
integration between a numbers of different languages. Currently it supports
Visual Basic, C++, C# and Jscript (The Microsoft version of Java Script).

THE FOUR COMPONENTS OF .NET FRAMEWORK

Common Language Runtime


One of the design goals of .NET Framework was to unify the runtime
engines so that all developers could work with a set of runtime services.
The .NET Framework’s solution is called the Common Language Runtime
(CLR). The CLR provides capabilities such as memory management, security,
and robust error handling to any language that work with the .NET
Framework. The CLR enables languages to inter operate with one another.

11 | P a g e
Memory can be allocated by code written in one language and can be freed by
code written in another language. Similarly, errors can be raised in one
language and processed in another language.

. NET Class Libraries


The .NET Framework provides many classes that help developers re-use
code. The .NET Class Libraries contain code for programming topics such as
threading, file I/O, database support, XML parsing, and data structures such
as stack and queues. This entire class libraries is available to any
programming language that supports the .NET Framework. Because all
languages now support the same runtime, they can re-use any class that works
with the .NET Framework. This means that any functionality available to one
language will also be available to any other .NET language.

. NET Programming Languages


The .NET Framework provides a set of tools that help to build code that
works with the .NET Framework. Microsoft provides a set of languages that
are already .NET compatible. C#.Net is one of those languages.

VISUAL C#.NET
C# is a simple, modern, object oriented, and type-safe programming
language derived from C and C++. It will immediately be familiar to C and
C++ programmers. C# aims to combines the high productivity of Visual Basic
and a new programming language designed for building enterprise application
that run on the .NET Framework. C#, which is evolution of C and C++, is
type safe and object oriented. Because it is compiled as managed code, it
benefits from the services of the common language runtime, such as language
interoperability, enhanced security, and garbage collection.
Visual C# .NET is Microsoft’s C# development tool. It includes an
interactive development environment, visual designers for building Windows
and web applications, a compiler, and debugger. Visual C#.Net is part of a

12 | P a g e
suite of products, called Visual Studio. NET, that also includes Visual
Basic .NET, Visual C++, .NET and the Jscript script language. All of these
language provide access to Microsoft .NET Framework, which includes a
common execution engine and a rich class library. The .NET Framework
defines a “Common Language Specification” (CLS), a sort of ligua Franca
that ensures seamless interoperability between CLS-compliant languages and
class libraries.
Visual C#.NET is currently part of the Visual Studio .NET. Microsoft
Visual C#.NET is the tool set for creating XML Web services and
Microsoft .NET-connected applications for Microsoft Windows and the web.

C#.NET
It provides the richest level of integration among presentation
technologies, component technologies and data technologies. The entire
architecture has been created to make it easy to develop for the desktop. The
framework starts al the way down at the memory management and component
loading level, and goes all the way up to the multiple ways of rendering user
and program interfaces. In between there are layers that provide just about any
system level capability that a developer would need at the base is the common
language runtime. This is the heart of .net. The middle layer includes the next

generation of standard system services such as classes that manages data and
xml

The top layer includes user and program interfaces it includes-

 windows forms
 web forms

13 | P a g e
.NET Framework Class Library
Gain mature and powerful, built-in functionality, including a rich set of
collection classes, networking support, multithreading support, string and
regular expression classes, and broad support for XML, XML schemes, XML
namespaces, XSLT, XPath and SOAP.

Some of the main features of the languages are as follows:

i. Object Oriented Language.


ii. Powerful Language for making applications
iii. Security
iv. Multithreading and Multitasking
v. Internet Programming
vi. Intranet Programming
vii. Interoperability
viii. Easily Understanding code,

SYSTEM MANAGEMENT
The system management is for getting information of the remote
system and to apply changes and configuration to the remote system. This is
archived through system management namespace, which contains the required
classes. With the support of the socket programming this system management
can be applied in remote systems. Visual C#.net and Visual Basic .net
supports system management.

14 | P a g e
MICROSOFT VISUAL STUDIO .NET FRAMEWORK

Common Language Runtime

Class Libraries

Programming Languages
(VB.NET, C#, VC++…)

ASP.NET

SQL Server 2005


Relational database systems are the most important database systems
used in the software industry today. One of the most outstanding systems is
Microsoft SQL Server. SQL Server is a database management system
developed and marketed by Microsoft. It runs exclusively It runs exclusively
under Windows NT, Windows 95/98, Windows 2000 Server. The most
important aspects of SQL Server 7 are,

 SQL Server is easy to use.


 SQL Server scales from a mobile laptop to symmetric
multiprocessor system.
 SQL Server provides data warehousing features that until now have
only been available in Oracle and other more expensive DBMS.
A database system is an overall collection of different
database software components and database containing the parts viz.
Database application programs, front-end components, Database
Management Systems, and Databases.

15 | P a g e
A database system must provide following features,

 A variety of user interfaces.


 Physical data independence.
 Logical data independence.
 Query optimization.
 Data integrity.
 Concurrency control.
 Backup and recovery.
 Security and authorization.

Structured query language, which was used with relational database. It


is a comprehensive database language it has statements for data definition,
query, and update. Hence it is both ddl and dml. Addition to it has facilities
for defining views on the databases, for specifying security and authorization,
for defining integrity constraint and for specifying transaction control.

Enterprise Manager is the main administrative console for SQL


Server installations. It provides you with a graphical "birdseye" view of all of
the SQL Server installations on your network. You can perform high-level
administrative functions that affect one or more servers, schedule common
maintenance tasks or create and modify the structure of individual databases.
Query Analyzer offers a quick and dirty method for performing
queries against any of your SQL Server databases. It's a great way to quickly
pull information out of a database in response to a user request, test queries
before implementing them in other applications, create/modify stored
procedures and execute administrative tasks.
SQL Profiler provides a window into the inner workings of your
database. You can monitor many different event types and observe database
performance in real time. SQL Profiler allows you to capture and replay
system "traces" that log various activities. It's a great tool for optimizing
databases with performance issues or troubleshooting particular problems.

16 | P a g e
Service Manager is used to control the MS SQL Server (the main SQL
Server process), MSDTC (Microsoft Distributed Transaction Coordinator)
and SQL Server Agent processes. An icon for this service normally resides in
the system tray of machines running SQL Server. You can use Service
Manager to start, stop or pause any one of these services.
Data Transformation Services (DTS) provide an extremely flexible
method for importing and exporting data between a Microsoft SQL Server
installation and a large variety of other formats. The most commonly used
DTS application is the "Import and Export Data" wizard found in the SQL
Server program group.

2.3.2 Resource Required


In this project .NET Framework is used as front – end tool. .NET is one
of the most recently used and one among the most popular front-end tools. It
contains several parts of techniques C#.Net. In this project SQL server is used
as back end tool. His is the default back-end tool of C#.Net. Then it comes the
turn of the operating system. The good and preferred OS for .Net is Windows
XP. We can also use windows 2000 server and windows 2003. In this project
we are using windows Xp as platform. Any number of users can use this
software at a time.

Operating systems: A multimedia PC running windows 98, 2000 or XP


operating system

2.3.3 Feasibility Study
Feasibility study is made to see if the project on completion will serve
the purpose of the organization for the amount of work, effort and the time
that spend on it. Feasibility study lets the developer foresee the future of the
project and the usefulness. Feasibility study is a test of system proposed

17 | P a g e
regarding its workability, impact on the organization, ability to meet the needs
and effective use of resources. Thus when a new project is proposed, it

normally goes through a feasibility study before it’s approved for


development.
The document provide the feasibility of the project that is being
designed and lists various areas that were considered very carefully during the
feasibility study of this project such as technical, economical and behavioral
feasibilities.
Investigating the existing system in the area under investigation does, to
test the technical, social and economical feasibility of a system and generating
ideas about the new system. There are three aspects in the feasibility study
portion of the preliminary investigation.

 Technical Feasibility
 Economical Feasibility
 Behavioral Feasibility

The proposed system must be evaluated from a technical point of view


first, and if technically feasible their impact on the organization must be
assessed. If compatible, the operational system can be devised. Then they
must be tested for economic feasibility.

Technical Feasibility
Technical feasibility examines can the work for the project be done
with correct equipments, existing software technology and available personal.
Considering the hardware the company had a Pentium processor with enough
memory and hard disk space. The important advantage of the system is that it
is platform independent, we can access this with all web browsers .So
Extension of SAMBA Server is technically feasible.

18 | P a g e
Economical Feasibility
The system is economically feasible since the savings and benefits of
the system are more when compared to the cost. The proposed system reduces

the drawbacks of the existing system .The proposed system is speedy and the
cost by benefit ratio is very small.

Behavioral/Operational Feasibility
The proposed project would be beneficial to Plus Point Solutions wave
that, it satisfies the objectives when developed and installed. One of the main
problems faced during development of a new system is getting acceptance
from the user. There is support from the staff of Plus Point Solutions wave
towards the development of the project. All the behavioral aspects are
considered carefully. Thus the project is behaviorally feasible.
The system Extension of SAMBA Server is behaviorally feasible
because the system is very user friendly.

SYSTEM DESIGN

The most creative and challenging phase of the system development


process is design phase, it is a solution, a “how to” approach to the creation of
the proposed system Design, the first step in the development of an
engineered product is initiated only after a clear exposition of expected
product functions becomes available. Based on the user requirements and the
detailed analysis of a new system, the new system must be designed. This is
the phase of system designing. It is a most crucial phase in the development of
a system. Normally, the design proceeds in two stages: preliminary or general
design Structure or detailed design.
Preliminary or general design: In the preliminary or general design, the
features of the new system are specified. The costs of implementing these

19 | P a g e
features and the benefits to be derived are estimated. If the project is still
considered to be feasible, we move to the detailed design stage.
Structure or Detailed design: In the detailed design stage, computer
oriented work begins in earnest. At this stage, the design of the system
becomes more structured. Structure design is a blue print of a computer
system solution to a given problem having the same components and inter-
relationship among the same components as the original problem. Input,
output and processing specifications are drawn up in detail. In the design
stage, the programming language and the platform in which the new system
will run are also decided. There are several tools and techniques used for
designing. These tools and techniques are: Flowchart Data flow diagram
(DFDs) Data dictionary Structured English Decision table Decision tree

Design phase is the life cycle phase in which the detailed design of the
system selected in the study phase is accomplished. A smooth transition from
the study phase to design is necessary because the design phase continues the
activities in the earlier phase. The first step in the design phase is to design the
database and then input and output within predefined guidelines.

Simple designs are easily understood, easily built, and easily tested.
Simplicity is the most important criteria of a design. Other design criteria
include the following.
Documentation: A good design always comes with a set of well-written
documents.
Testability: In a good design every requirement is testable. A design that
cannot be easily tested against its requirements is not acceptable design.
Structure: A good design presents hierarchical structure that makes logical
use of control policies among components.
Modularity: a good design is modular and exhibits the properties of high
cohesiveness and low coupling.

20 | P a g e
Discreteness: A good design separates data procedures and timing
consideration to the extent possible.
Representation: A good design should be easily communicated to all
interested parties through appropriate abstraction and representation.
Reusability: A good design should be repeatable and reusable.
Various Design Concepts
There are various fundamental design concepts, which are designed for a
perfect system. These include: -
1. Process design: The design phase focuses on the detailed implementation
of the system recommended in the feasibility study. Emphasis is on the
translating performance specification.
2. Conceptual Design: After the study and the analysis of the existing system the functional
and operational requirements were identified. Based on these requirements the conceptual
model of the system is designed.

3. Logical Design: The logical design reviews the present system and
prepares input and output specifications, editing, security and control
specification, details of the implementation plans a logical design walk
through.
4. Physical Design: The physical design maps out the details of the physical
system plans. The system implementation derives a test and implementation
plan and specifies any new hardware and software.
5. Input Design: The input design is the process of converting user-oriented
inputs into computer-based formats. It also includes determining the recording
media method of input, speed of capture and entry into the system.
6. Output Design: The normal procedure is to design the output in detail first
and then to work back to the input forms. The output can be in the form of
operational documents or lengthy reports. The input records have to be
validated edited and organized and finally accepted by the system before
being processed to produce the output.

21 | P a g e
7. Database Design: The database is a collection of interrelated data stored
within a minimum of redundancy to serve many applications. It minimizes the
artificiality embedded in using separate files. The primary objectives are fast
response time to enquiries, more information at low cost, redundancy control,
clarity and ease of use, accuracy and fast recovery.
8. Code Design: The process of coding is to facilitate the identification and
retrieval of items of information. The code should be simple and easily
understandable. The codes were designed in such a manner that features such
as optimum human oriented use and machine efficiency are unaffected. The
code should be adequate for present and anticipated data processing for
machine and human use.

3.1. ARCHITECTURAL DESIGN


Architecture is an overall structure of a system. Architecture take into
consideration the overall working of the system. Large system can be

decomposed into sub-systems that provide some related set of services. The
initial design process of identifying these sub-systems and establishing a
framework for sub-system control and communication is called architecture
design.
Architecture design usually comes before detailed system specification.
Architecture decomposition is necessary to structure and organize the
specification. There is no generally accepted process depends on application
knowledge and on the skill and intuition of the system architect.

3.2 DATAFLOW DIAGRAM


Demacro, Gane and Sarron introduces Data Flow Diagram. It is an
important tool used during system analysis, A DFD model is a system using
external entity from which data flows into a process, while transforms the data
and create the output. Data flows through the other process or external entities

22 | P a g e
or files. Data in files may also flow to process as inputs. A DFD shows the
usual flow of data through a system. It views a system as a function that can
transform the inputs into desired outputs. The DFD aims to capture the
transformations that take place within a system to the input data so that
eventually the output data is produced. The main merit of the DFD is that it
can provide an overview of what data the system should process, what
transformation of data area done and where the results flow. So the DFD
shows a movement of data through the different transformations or process in
the system.
Data Flow Diagrams are made up of a number of symbols, which
represent system components. Most data flow modeling methods use four
kinds of symbols. These symbols are used to represent four kinds of system
components. Processes, data stores, data flows, and external entities. Circles
in DFD represent processes. Data flow represented by a thin line in the DFD
and each data store has a unique name and square or rectangle represents
external entities.

Unlike detailed flowchart, Data Flow Diagrams do not supply detailed


description of the modules but graphically describes a system’s data and how
the data interact with the system.
To construct a Data Flow Diagram, we use
 Arrow
 Circles
 Open End Box
 Squares

An arrow identifies the data flow in motion. It is a pipeline through


which information is flown like the rectangle in the flow chart. A circle stands
for process that converts data into information. An open-end box represents a

23 | P a g e
data store, data at rest or a temporary repository of data. A square defines a
source or destination of system data.
The graphical representation of the system makes it good
communication tool between the user and the analyst. By analyzing the Data
Flow diagrams, one can easily track the movement of data and the changes
incurred on it during the process.
Analysis model helps us to understand that relationship between
different components in the system design. Analysis model shows the user
clearly, how a system will function. This is the first technical representation of
a system.
The analysis modeling must achieve three primary objectives.

1. To establish a basis for creation of software design.


2. To describe what the user requires.
3. To define a set of requirements that can be validated once
the software is built.
A data flow diagram is a graphical technique that depicts information
flow and transforms that are applied as data move from input to output. The
DFD is used to represent increasing information flow and functional details.

A level 0 DFD also called a fundamental system model represents the


entire software elements as single bible with input and output indicated by
incoming outgoing arrows respectively. Additional process and information
flow parts are represented in the next level, i.e. Level 1 DFD. Each of the
processes represented at level 1 are sub functions of overall system depicted
in the context model. Any processes which are complex in level 1 will be
further represented into sub functions in the next level, i.e. in level 2.
The purpose of data flow diagram is to provide a semantic bridge
between users and system developers. The diagrams are graphical, eliminating
thousands of words, logical representations, modeling what system does,

24 | P a g e
hierarchical, showing systems at any level of details, and jargon less, allowing
user understanding and reviewing.
The goal of data flow diagram is to have a commonly understood
model of a system. The diagram is the basis of structured system analysis.
Data flow diagram are supported by other techniques of structured system
analysis such as data structured diagrams , data dictionaries and procedure
representing techniques such as decision table , decision tree and structure
English.
The basic elements of DFD are

Bubbles : Used to represent functions.


Arrows : Used to represent data flow
Rectangles : Used to represent external entries
Option box : Used to represent data store.

3.2.1 Definition
Data Flow Diagram is a means of representing a system at any level of
detail with a graphic network of symbols showing data flows, data stores, data
processes, and data sources/destinations.

3.2.2 Purpose/Objective
The purpose of data flow diagram is to provide a semantic bridge
between users and systems developers. The diagrams are graphical,
eliminating thousands of words, logical representations, modeling WHAT
system does; Hierarchical, showing systems at any level of details; and Jargon
less, allowing user understanding and reviewing.
The goal of data flow diagramming is to have a commonly understood
model of a system. The diagram is the basis of structured systems analysis.
Data flow diagram area supported by other techniques of structured systems

25 | P a g e
analysis such as data structured diagrams, data dictionaries, and procedure
representing technique such as decision table, decision trees, and structured
English.
Data Flow Diagrams or DFD represent one of the most ingenious tools
used for structured analysis. DFD is also known as bubble chart. It has the
purpose of clarifying system requirements and identifying major
transformations that will become programs in system design. It is a major
starting point in the design phase that functionally decomposes the
requirements specifications down to the lowest level of detail. A DFD consists
of a series of bubbles joined by lines. The bubble represents data
transformation and lines represent data flow in the system. In the normal
convention a DFD has four major symbols.

Basic Symbols

Process

External entity

Data flow

Data store

Process: A process shows a transformation or manipulation of data flow


within the system.
The symbol used is a rectangular box which contains 3 descriptive
elements firstly an identification number appears in the upper left hand corner.

26 | P a g e
This is allocated arbitrarily at the top level and serves as a unique reference.
Secondly, allocation appears to the right of the identifier and describes where
in the system the process takes place. This may, for example, be a department
or a piece of hardware. Finally, a descriptive title is placed in the center of the
box. This should be a simple imperative sentence with a specific verb, for
example ‘maintain customer records ‘or find driver.
An external entity is source of destination of data flow which is
outside the area of study. Only those entities which originate or receive data
are represented on a business process diagram. The symbol used in an oval
containing a meaningful and unique identifier. Usually this is an element,
from that the system inputs come or to which the system outputs go. A
common example of external entity is person or a group of persons.

Data Store: Data store is a holding place for information within the system. It
is represented by an open ended narrow rectangle. Data stores may be long
term file such as sales ledgers, or may be short term accumulations: for
example batches of documents that are waiting to be processed. Each data
store should be a reference followed by an arbitrary number.
External Entity: External entities are objects outside the system, with which
the system communicates. External entities are sources and destinations of the
system’s inputs and outputs. A common example of external entity is person
or a group of persons or group of persons.

Data Flow: Data store is a holding place for a information within the system.
It is represented by an open ended narrow rectangle. Data stores may be long
term file such as sales ledgers, or may be short term accumulations; for
example batches of documents that are waiting to be processed. Each data
store should be a reference followed by an arbitrary number.

27 | P a g e
Context Level

User AI SOFT User


Request Response

Level 1

28 | P a g e
3.3 FORM DESIGN
Input Design:
The input design is the link between the system and the user. It
comprises the developing specifications and procedures for data preparation
and those steps are necessary to put transaction data in to a usable form for
processing data entry. The activity of putting data in to computer for
processing can be achieved by inspecting the computer to read data from a
written or printed document or it can occur by having people keying the data
directly in to the system. The input design focuses on controlling the amount
of input required, controlling errors, avoiding extra steps and keeping the
process simple.
Input data of a system may not be necessarily a raw data captured in
the system from scratch. These can also be the output of another system or
subsystem. The design of input covers all phases of input from the certain of
initial data to actual entering the data to the system for processing .The design
of inputs involves identifying the data needed ,specifying the characteristics
of each data item , capturing and preparing data for computer processing and
ensuring correctness of data.
The objectives guide the design of the input focus on:
 Effectiveness
 Accuracy
 Ease to use
 Consistency
 Simplicity
 Attractiveness

All these objectives are important and can be attained by the use of
basic design principles.
Several activities are to be performed for the overall input process.
They include some of the following:

29 | P a g e
 Data recording as its source
 Data conversion to computer acceptable medium
 Data validation
 Data flow control`
 Data correction if necessary

Input design is the method by which valid data are accepted from
the user. This part of the designing requires very careful attention. If the data
going into the system is incorrect then the processing and output will magnify
these errors. Inaccurate input data are the most common cause of errors in
data processing.
The input design is carried in such a way that the input screens are
user friendly. The goal of input design is to make data entry as easy, logical
and error free. Input screens take care to filter the invalid data from becoming
an operational data at each entry phase. This is achieved by providing proper
checks.
Also, the input format is designed in such a way that accidental errors
are avoided. The user has to input only just the minimum data required, which
also helps in avoiding the errors that the user may make. Accurate designing
of input format is very important in developing efficient software.
Output Design:
Designing computer output should proceed in an organized,
well thought out manner; the right output must be developed while ensuring
that each output element is designed so that people will find the system can
use easily and effectively.
When analysis design computer output, they should

 Identify the specific output that is needed to meet the


requirements.
 Select methods for presenting information.

30 | P a g e
 Create document, report, or other formats that contain
information produced by the system.
The output form of an information system should accomplish one or more of
the following objectives.

 Convey information about past activities, current status or


projections of the future.
 Signal important events, opportunities, problems, or warnings.
 Trigger an action confirm an action.
The system output may be of any of the following:

 A report
 A document
 A message
 Form Design

A Form is a tool with a message. It is the physical carrier of data of


information. It also can constitute authority for action. A form is classified
into three: Action, Memory and Report form.
An action form requests the user to do something –get- action. A
memory form is a record of historical data that remains in a file is used for
reference, and serves as control on key details. A report form guides
supervisors and other administrators in their activities.
Requirements of Form Design:

 Identification and wording.


 Maximum readability and use.
 Physical factors.
 Order of data items.

31 | P a g e
 Easy of data entry.
 Size and arrangement.
 Use of instructions.
 Efficiency considerations.
 Type of requirements.
Modular Design
Modularization allows the designers to decompose a system into
functional units to impose hierarchical ordering or function usage, to
implement data abstractions, and to develop independently useful subsystems.
In addition modularization can be used to isolate machine dependencies to
improve the performance of software product, or to ease debugging, testing
integration, tuning and modification of the system.
The project contains mainly 5 modules:

 Format Module

 Data Base Module

 User Module

 Assembly Module

 Operation Module

3.4 DATA BASE


The data base design is a logical development in the methods used by
the computer to access and manipulate data stored in the various parts of the
computer system. Database is defined as an integrated collection of data. The
overall objective in the development of database technology has been to treat
data as organization recourses and as an integrated while. The main objectives
of database are data integration, data integrity and data independence.
Database management system (DBMS) allows the data to be protected
and organized separately from other recourses like hardware, software and

32 | P a g e
programs. DBMS is a software package, which contains components that are
not found in other data management packages. The significance of DBMS is

the separation of data as seen by the programs and data as stored on the direct
access storage devices, i.e. the difference between the logical and physical
data. Database design is the first step of the three design activities that are
conducted during software engineering process. The impact of data structure
on program structure and procedural complexity causes data design to have a
profound influence on software quality. The concepts of shared memory and
semaphores provide the foundation for an approach to data design.
The proposed System stores the information relevant for processing in
the SQL server database. This SQL Server database contains tables, where
each table is called a field or column. A table also contains records, which is a
set of fields. All records, in a table the same set of fields with different
information.
Each table contains key fields that establish relationships in an SQL
database and how the records are stored. There are primary key fields that
uniquely identify a record in a table. There are also fields that contain the
primary key from another table called foreign keys.

SQL SERVER 2005


Relational database systems are the most important database systems
used in the software industry today. One of the most outstanding systems is
Microsoft SQL Server. SQL Server is a database management system
developed and marketed by Microsoft. It runs exclusively It runs exclusively
under Windows NT, Windows 95/98, Windows 2000 Server. The most
important aspects of SQL Server 7 are,
 SQL Server is easy to use.
 SQL Server scales from a mobile laptop to symmetric
multiprocessor system.

33 | P a g e
 SQL Server provides data warehousing features that until now have
only been available in Oracle and other more expensive DBMS.

A database system is an overall collection of different database


software components and database containing the parts viz. Database
application programs, front-end components, Database Management Systems,
and Databases. A database system must provide following features,

 A variety of user interfaces.


 Physical data independence.
 Logical data independence.
 Query optimization.
 Data integrity.
 Concurrency control.
 Backup and recovery.
 Security and authorization.

ADO.NET
ADO introduced a simple object model that made accessing data in
MS Windows programs a straightforward task. In addition, ADO introduced
the concept of disconnected record sets as a way to transport data between the
tires of distributed applications. The low-level API behind ADO is called
OLE DB.ADO.NET was designed with the disconnected data in mind,
because this stateless approach works best for distributed Internet
applications. ADO.NET contains two sets of similar classes. One set is a
generic set of classes that can be used to access all databases that have OLE
DB provider and a set of classes for Microsoft’s SQL server.

34 | P a g e
ADO.NET COMPONENTS
The ADO.NET components have been designed to factor data access
from data manipulation. There are two central components of ADO.NET that
accomplish this the Dataset, and the .NET data provider, which is a set of
components including the Connection, Command, Data Reader, and Data
Adapter objects. The ADO.NET Dataset is the core component of the
disconnected architecture of ADO.NET. The Dataset is explicitly designed for

data access independent of any data source. As a result it can be used with
multiple and differing of any data sources, used with XML data, or used to
manage data local to the application.
The other core element of the ADO.NET architecture is the .NET data
provider, whose components are explicitly designed for data manipulation and
fast, forward only, read -only access to data. The connection object provides
connectivity to a data source. The Common objects enables access to database
commands to return data, modify data, run stored procedures, and sends or
retrieve parameter information. The Data Reader provides a high –
performance stream of data from the data source. Finally, the Data Adapter
provides the bridge between the Dataset object and the data source.

SQL Server 2000 includes the following features

 Stored procedures.
 Internet Integration
 Triggers
 Updatable Views.
 Scalability and Availability
 Enterprise Level Database Features
 Strict mode Ease of installation, deployment, and use
 Query caching
 Full-text indexing and searching using MYISAM engine
 Embedded database library

35 | P a g e
 ACID compliance using the InnoDB, BDB and Cluster engines
 Data warehousing

Normalization
Normalization is the process of organizing data in a database. This
includes creating tables and establishing relationships between those tables
according to rules designed both to protect the data and to make the database

more flexible by eliminating redundancy and inconsistent dependency.


Redundant data wastes disk space and creates maintenance problems. If data
that exists in more than one place must be changed, the data must be changed
in exactly the same way in all locations. A buyer’s or promoter’s address
change is much easier to implement if that data is stored only in the buyer’s or
promoter’s table and nowhere else in the database. There are a few rules for
database normalization. Each rule is called a "normal form." If the first rule is
observed, the database is said to be in "first normal form." If the first three
rules are observed, the database is considered to be in "third normal form."
Although other levels of normalization are possible, third normal form is
considered the highest level necessary for most applications.

1NF
 A relation is in 1NF if it contains no repeating groups
 To convert an unnormalised relation to 1NF either:
 Flatten the table and change the primary key, or
 Decompose the relation into smaller relations, one for the repeating
groups and one for the non-repeating groups.
 Remember to put the primary key from the original relation into both new
relations.
 This option is liable to give the best results.

36 | P a g e
2NF
 A relation is in 2NF if it contains no repeating groups and no partial key
functional dependencies
 Rule: A relation in 1NF with a single key field must be in 2NF
 To convert a relation with partial functional dependencies to 2NF. create a
set of new relations:
 One relation for the attributes that is fully dependent upon the key.
 One relation for each part of the key that has partially dependent attributes

3NF
 A relation is in 3NF if it contains no repeating groups, no partial
functional dependencies, and no transitive functional dependencies
 To convert a relation with transitive functional dependencies to 3NF,
remove the attributes involved in the transitive dependency and put them
in a new relation
 Rule: A relation in 2NF with only one non-key attribute must be in 3NF
 In a normalized relation a non-key field must provide a fact about the key,
the whole key and nothing but the key.
 Relations in 3NF are sufficient for most practical database design
problems. However, 3NF does not guarantee that all anomalies have been
removed.

CODING AND DEBUGGING

37 | P a g e
4.1 FUNDAMENTAL DOCUMENTATION
The Extension of Samba Server helps user to easily accessing the files
of the Linux and Windows systems. The project helps user that a dual
operating system. And the user currently using Windows and without reboot
user to access Linux files. From there the application provides simple to use
and understand.
This project will result in a completely system based application which
will allow users to access files, coping files, renaming files and maintains the
record of saved file.

4.2 SPECIAL FEATURES OF LANGUAGE


In this project .NET Framework is used as front – end tool. Net is one
of the most recently used and one among the most popular front-end tools. It
contains several parts of techniques. Some are VB.Net, C#.Net. In this project
SQL server is used as back end tool. His is the default back-end tool of
C#.Net. Then it comes the turn of the operating system. The good and
preferred OS for .Net is Windows 2003. We can also use windows 2000
server and windows XP. In this project we are using windows 2000 server as
platform.
The .Net Framework is made up of four parts,
 The Common Language Runtime
 A Set of Class Libraries
 A Set of Programming Languages
 ASP.NET Environment
The .NET Framework was intended to make Windows application
much more reliable, while also providing an application with greater degree of
security. It was intended to simplify the development of web application and
services. The framework was designed to provide a single set of libraries that
would work with multiple languages. The .NET Framework is a common

38 | P a g e
environment for running Web applications and Web libraries-like ADO.NET,
ASP.NET and Windows forms- to provide advanced standard services that
can be integrated onto a variety of computer systems. The Framework
provides- rich application environment, simplified development and easy
integration between a numbers of different languages. Currently it supports
Visual Basic, C++, C# and Jscript (The Microsoft version of Java Script).

THE FOUR COMPONENTS OF .NET FRAMEWORK

Common Language Runtime


One of the design goals of .NET Framework was to unify the runtime
engines so that all developers could work with a set of runtime services.
The .NET Framework’s solution is called the Common Language Runtime
(CLR). The CLR provides capabilities such as memory management, security,
and robust error handling to any language that work with the .NET
Framework. The CLR enables languages to inter operate with one another.
Memory can be allocated by code written in one language and can be freed by
code written in another language. Similarly, errors can be raised in one
language and processed in another language.

. NET Class Libraries


The .NET Framework provides many classes that help developers re-use
code. The .NET Class Libraries contain code for programming topics such as
threading, file I/O, database support, XML parsing, and data structures such
as stack and queues. This entire class libraries is available to any
programming language that support the .NET Framework. Because all
languages now support the same runtime, they can re-use any class that works
with the .NET Framework. This means that any functionality available to one
language will
also be available to any other .NET language.

39 | P a g e
. NET Programming Languages
The .NET Framework provides a set of tools that help to build code that
works with the .NET Framework. Microsoft provides a set of languages that
are already .NET compatible. C#.Net is one of those languages.

VISUAL C#.NET
C# is a simple, modern, object oriented, and type-safe programming
language derived from C and C++. It will immediately be familiar to C and
C++ programmers. C# aims to combines the high productivity of Visual Basic
and a new programming language designed for building enterprise application
that run on the .NET Framework. C#, which is evolution of C and C++, is
type safe and object oriented. Because it is compiled as managed code, it
benefits from the services of the common language runtime, such as language
interoperability, enhanced security, and garbage collection.
Visual C# .NET is Microsoft’s C# development tool. It includes an
interactive development environment, visual designers for building Windows
and web applications, a compiler, and debugger. Visual C#.Net is part of a
suite of products, called Visual Studio. NET, that also includes Visual
Basic .NET, Visual C++, .NET and the Jscript script language. All of these
language provide access to Microsoft .NET Framework, which includes a
common execution engine and a rich class library. The .NET Framework
defines a “Common Language Specification” (CLS), a sort of ligua Franca
that ensures seamless interoperability between CLS-compliant languages and
class libraries.
Visual C#.NET is currently part of the Visual Studio. NET. Microsoft
Visual C#.NET is the tool set for creating XML Web services and
Microsoft .NET-connected applications for Microsoft Windows and the web.

C#.NET –
It provides the richest level of integration among presentation
technologies, component technologies and data technologies. The entire

40 | P a g e
architecture has been created to make it easy to develop for the desktop. The
framework starts al the way down at the memory management and component
loading level, and goes all the way up to the multiple ways of rendering user
and program interfaces. In between there are layers that provide just about any
system level capability that a developer would need at the base is the common
language runtime. This is the heart of .net
The middle layer includes the next generation of standard system
services such as classes that manages data and xml

The top layer includes user and program interfaces it includes-

 windows forms
 web forms

.NET Framework Class Library


Gain mature and powerful, built-in functionality, including a rich set of
collection classes, networking support, multithreading support, string and
regular expression classes, and broad support for XML, XML schemes, XML
namespaces, XSLT, XPath and SOAP.

Some of the main features of the languages are as follows:

1. Object Oriented Language.


2. Powerful Language for making applications
3. Security
4. Multithreading and Multitasking
5. Internet Programming
6. Intranet Programming
7. Interoperability
8. Easily Understanding code,

41 | P a g e
4.3 TESTING
Testing is a process of executing a program with the interest of finding
an error. A good test is one that has a high probability of finding the yet
undiscovered errors. The primary objective for the test case design is to drive

a set of tests that has the highest likelihood for systematically uncovering
different classes of errors in the software. Testing begins at the level and
works outward towards the interaction of the entire software .A series of
testing are performed for this project before the system is ready for
acceptance.

4.3.1 TESTING STRATEGIES

Quality Assurance

Generic risks

Risk and requirements based testing helps you to determine what to


test first, in which sequence, so you spend the time you have to the parts that
really matter.
The strategy starts with a risk analysis to determine the functions
(requirements) with the highest risk, and plan your test activities guided by
this analysis.
To help you identify the risks involved in all your requirements,
consider the following aspects:

 Functions often used by the users Mostly it’s to accessing the Linux
files from when user is using Windows operating system.
 Complex functions and which require a consistent level of
performance.
 Functions that have a lot of updates or bug fixes. That’s the feedback
and complaint functions and their deletion after an overall look up by
the admin.

42 | P a g e
Test Procedure
The procedure is as follows:
 Prepare the test case.

 Record the expected results and verify whether in tune with


actual results.
 If actual results are not in tune with the expected results, do
the necessary rework?
 Test again and check for the results.
 If the results are satisfactory, wind up testing.

Item Pass / Fail Criteria


The test case consists of different inputs with the expected results in
each case. During testing, the Tester records the Actual Test Results against
the expected
Ones and if found matching, the test case is assigned as a Pass.
Otherwise, the Test Case is assigned as a Fail and orders for Rework and
Retest.
Stop Criteria
The testing can be wrapped up when
 Actual Test Results match with the expected ones.
 System performs well in the specified environment.

Test Procedure

Initially with in homepage, existing users is giving an Ip address of


the system and if it is verified then it search the Linux/Windows files
respectively otherwise it gives error message. The user has permission to

43 | P a g e
copying, the files. And user has to view the record of the files that saved or
copied. If user is copied files then it is updated in the database. So through out
the processes all tests are done.

Test Items
The integration modules are tested. Features to be tested
Various features need to be tested:
 Detect data exchange formats

 Module invocation sequences


 Navigability
 Flow of events

System Testing
System testing involves unit testing, integration testing, acceptance
testing. Careful planning and scheduling are required to ensure that modules
will be available for integration into the evolving software product when
needed.
A test plan has the following steps
1. Prepare test plan
2. Specify conditions for user acceptance testing
3. Prepare test data for program testing
4. Prepare test data for transaction path testing
5. Plan user training
6. Compile/assemble programs
7. Prepare job performance aids
8. Prepare operational documents

The levels of testing include:


 Unit testing
 Integration Testing
 Data validation Testing

44 | P a g e
 Output Testing

4.3.2 Types of Testing

1. Black Box Testing

Black Box testing also called functional testing, focuses on the


functional requirements of the software. Knowing the specified function that a
product designed to perform the test can be conducted to ensure that each

function is fully operational. Black Box tests are carried out to test that input
to function is properly accepted and output is correctly produced. The test
examines some accepts of system with little regards for the internal logic
structure of the software.
It finds the errors in the following categories,
1. Interface errors.
2. Performance in data structures or external database access.
3. Performance errors.
4. Initialization and termination errors.
5. Incorrect or missing functions.
Black box testing is used to detect errors of type incorrect or missing
functions, interface errors, errors in data structures or external database
access, performance, initialization and termination errors.

2. White box testing


White box testing, sometimes called “Glass box testing”, and is a test
case design uses the control structure of the procedural design to check the
errors. It involves following procedures,

45 | P a g e
1. All independent paths within module have been exercised at
least once.
2. All logical decisions were checked for the true and false
values.
3. All loops were executed to check their boundary values.
4. Internal data-structure was tested for their validity

3. Top-Down Testing
Top down testing assumes that main logic or object interactions and
system messages of application need more testing than an individual object’s
methods or supporting logic. Top down strategy can detect serious design

laws early in the implementation. In this project Top down approach was used
to test the user interface and interface navigation.

4. Bottom-Up testing
Bottom up testing starts with details of system and proceeds to higher levels by
progressive aggregation of details until they collectively fit the requirements for the system.
Testing was performed in 5 levels

5. Unit Testing
Unit testing focuses verification effort 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
uncovered scope established for unit testing. The unit testing is white-box
oriented, and step can be conducted in parallel for multiple components. The
modular interface is tested to ensure that information properly flows into and
out of the program unit under test. The local data structure is examined to
ensure that data stored temporarily maintains its integrity during all steps in an
algorithm’s execution. Boundary conditions are tested to ensure that all

46 | P a g e
statements in a module have been executed at least once. Finally, all error
handling paths are tested.
Tests 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. Selective testing of execution paths is an essential task during the unit
test. Good design dictates that error conditions be anticipated and error
handling paths set up to reroute or cleanly terminate processing when an error
does occur. Boundary testing is the last task of unit testing step. Software
often fails at its boundaries.
Unit testing was done in Sell-Soft System by treating each module as
separate entity and testing each one of them with a wide spectrum of test

inputs. Some flaws in the internal logic of the modules were found and were
rectified.

6. Integration Testing
Integration testing is systematic technique for constructing the program
structure 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 structure that has been dictated by design. The entire program is
tested as whole. Correction is difficult because isolation of causes is
complicated by vast expanse of entire program. Once these errors are
corrected, new ones appear and the process continues in a seemingly endless
loop. After unit testing in Sell-Soft System all the modules were integrated to
test for any inconsistencies in the interfaces. Moreover differences in program
structures were removed and a unique program structure was evolved.

7. Validation Testing
The validation testing is used to execute the application without any
invalid data. Validation testing can be defined in many ways, but a simple

47 | P a g e
definition is that the validation succeeds when the software functions in a
manner that can be reasonably expected by the user. When the user enters
incorrect values then the system should not display any error message. Instead
the system has to display helpful message for the user to enter the correct
values.

8. Acceptance Testing
Acceptance testing involves planning and execution of functional tests,
performance tests and stress tests in order to demonstrate the implemented
system satisfies its requirements. Functional test causes involve exercising the
code with nominal files for which the expected outputs are known. Thus the
software system developed in the above manner is one that satisfies the user

needs, confirms to its requirements and design satisfactions and exhibits an


absence of errors.

9. System Testing
Performance is the most important aspects of most applications.
System testing is concerned with measuring and verifying the respond of the
system, when the application is run under varying loads. System responses
includes performance, latency throughput and memory consumption.

Factory Acceptance Testing


 Judge the overall application stability
 Understand the root causes of the reported defects
 Identify modules with high defect density
 Analyse the completeness of testing
 Understand the test coverage

48 | P a g e
 Determine areas /modules on which testing should focus
 Suggest improvements to Plus Point Solution.

SYSTEM IMPLIMENTATION

5.1 Implementation methods


The implementation methods include with proper installation and procedures.
5.2 Implementation Plan
Implementation involves the conversion of a basic application to
complete replacement with a computer system. It is the process of converting
to a new or revised system design into an operational one. During the design
phase, the products structure, its undergoing data structures, the general
algorithms and the interfaces and control/data linkages needed to support
communication among the various sub structures were established.
Implementation process is simply a translation of the design abstraction into
the physical realization, using the language of the target architecture.
Implementation includes all those activities that take place to convert
from the old system to the new. The new system may be totally new
replacing an existing manual or automated system, or it may be a major
modification to an existing system. In either case, proper implementation is
essential to provide a reliable system to meet organizational requirements.
Implementation Planning
In order to implement s system, planning is very essential. Proper
planning has been done to take care of issues listed below.
 Implementation of system environments.
 Standby facilities

49 | P a g e
 Channels of communication
 Methods of changeover
 Resources available
Once the planning has been completed, the major effort is to ensure that the
programs in the system are working properly. At the same time concentrate
on user staff training. When the staff has been trained, the full system can be
carried out, involving both computer and clerical procedures.

The first part of this involves the conversion of existing clerical work
to computer media and settings to go with these as they converted on the
computer. Then the actual change over from the existing system to the new
system takes place.
When the change over has taken place, there will be need for
amendment to correct or improve the new system. The type of implementation
that has been used is that of a computer system replacing manual system. The
algorithms and data structure developed during design, based on the
requirement specifications, were converted to running programs. The various
modules were bound together in to a single application.
This system was developed giving proper emphasis to user interface.
Special care is taken for checking data items. Each item is checked at the time
a value is entered. If a particular text field is numeric, then before entering
the value it will be specified so that the user can enter the correct value in the
correct format. If he had not entered the correct value, the data will not
accept. So he can correct and reenter the details.
In order to achieve the objectives from the new system, the user must
be confident in their work. The system has been developed in a highly
interactive and user-friendly manner.
Post Implementation Review
The final step of the systems approach recognizes that an implemented
solution can fail to solve the problem for which it was developed. The real

50 | P a g e
world has a way out confronting even the most well defined solutions.
Therefore the results of implementing a solution should be monitored and
evaluated. This is called post implementation review process, since the
success of a solution is reviewed after it is implemented. The focus of this
step, i.e., to determine if the implemented solution has indeed helped the firm
and selected business units, meets their system objectives. If not, the system
approach assures to cycle back to previous step and make another attempt to
find a better workable solution.

There are many ways in which changes may be achieved. Commonly used
methods are the following
 Direct Change over.
 Parallel Change over.
 Pilot running change over.
 Stages Change over.
Occasionally the combinations of these methods are used. Parallel
running change over method is used in the implementation of the new system.
The current data is processed both manually and by the new system and the
results are cross-checked. The old manual system is kept alive and operational
until the new system has been proved for at least system cycle.

CONCLUSION & FUTURE ENHANCEMENTS

51 | P a g e
CONCLUSION

Any system, which has been in use for a number of years gradually,
decays and become less effective because of the change in environment to
which it has to be adapted. For a time being, it’s possible to overcome
problems by amendments and minor modification to acknowledge the need of
fundamental changes.
The image database management system provides more security and
also enables the user to store the images directly into the database using the
concept of image data type.
All the suggestions forwarded in the software proposal have successfully
been completed and the final threshold of the application has been crossed.
Weaving through the system developed, a brief idea can be given as follows:
1. Comprehending the problem.
2. Studying the existing system.
3. Building up the course of action to reach the goal.
4. Designing the problem.
5. Visualizing the solution.
6. Preparing the screen outputs.
7. Testing the system with test data.
8. Achieving the required results.
9. Documenting the software developed.

Scope for further development

52 | P a g e
Any system, which has been in use for a number of years gradually,
decays and become less effective because of the change in environment to
which it has to be adapted. For a time being, it’s possible to overcome
problems by amendments and minor modification to acknowledge the need of
fundamental changes.
Computerization was proposed as a solution to the problem for being
outdated with the fast present technologies. In this project work, the aim is to
maximize the effort to computerize it accordingly that meet the entire user
needs. Getting maximum book details for the users and provide graphical
interface search through location maps.
Testing of the whole system has been done with sample data and output
obtained is according to the requirements. The efficiency of this project is
found to be better than the existing in all respects.

SCREEN SHOTS

53 | P a g e
1.Server Home

2.Client Home

54 | P a g e
3.Client Login

4.Registration

55 | P a g e
5.Game TicTacToe

6.TicTacToe Two Player

56 | P a g e
7.Network Game Establishment

8.Game Puzzle

57 | P a g e
\
9.Puzzle Mode II

CODES

58 | P a g e
1.Game Puzzle Codes

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb ;

namespace AISOFT
{

public class Puzzle : System.Windows.Forms.Form


{
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.Button button10;
private System.Windows.Forms.Button button11;
private System.Windows.Forms.Button button12;
private System.Windows.Forms.Button button13;
private System.Windows.Forms.Button button14;
private System.Windows.Forms.Button button15;
private System.Drawing.Point EmptyPoint;

private ArrayList alAllButtons,but;

private ArrayList ilSmallImages;

private Bitmap MainBitmap;

private System.Windows.Forms.MainMenu mainMenu;


private System.Windows.Forms.Button buttonShowHide;
private System.Windows.Forms.Button buttonReStart;
private System.Windows.Forms.MenuItem menuItem7;
private System.Windows.Forms.MenuItem menuItem8;
private System.Windows.Forms.MenuItem miFileNewGame;
private System.Windows.Forms.Button buttonChangeImage;
private System.Windows.Forms.Button buttonRefresh;
private System.Windows.Forms.MenuItem miFile;
private System.Windows.Forms.MenuItem miMode;
private System.Windows.Forms.MenuItem miFileModeNumber;
private System.Windows.Forms.MenuItem miFileModePicture;

59 | P a g e
private System.Windows.Forms.MenuItem miFileModeNumPic;
private System.Windows.Forms.MenuItem miFileLoadPicture;
private System.Windows.Forms.MenuItem miFileExit;
private IContainer components;
private Timer timer1;
int pn;
int hr, mi, se,count;
private StatusStrip statusStrip1;
private ToolStripStatusLabel tc;
private MenuItem mstart;
private ToolStripStatusLabel tm;

public Client objc;


string uname,picname;
private Button bscore;

public Puzzle(Client c, string un)


{

InitializeComponent();
but = new ArrayList();
but.Add(button1);
but.Add(button2);
but.Add(button3);
but.Add( button4);
but.Add( button5);
but.Add( button6);
but.Add( button7);
but.Add( button8);
but.Add( button9);
but.Add( button10);
but.Add( button11);
but.Add( button12);
but.Add( button13);
but.Add( button14);
but.Add( button15);
timer1.Enabled = false;
hr = 0;
mi = 0;
se = 0;
count = 0;
objc = c;
uname = un;
EmptyPoint = new Point ();

alAllButtons = new ArrayList ();

foreach(Button b in panel1.Controls )
alAllButtons.Add (b);

try
{
MainBitmap = (Bitmap)Bitmap.FromFile
(Application.StartupPath +"\\game.jpg");

60 | P a g e
//MessageBox.Show (Application.StartupPath.ToString
());
}
catch (Exception ex)
{

MessageBox.Show (ex.Message.ToString ());


}

Point p = new Point (320,320);


EmptyPoint.X = 240;
EmptyPoint.Y = 240;

miFileModeNumber.Checked = false;
miFileModePicture.Checked = true;
miFileModeNumPic.Checked = false;
HideNumbersFromButtons();

NewGame();

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{

if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code


/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.panel1 = new System.Windows.Forms.Panel();
this.button15 = new System.Windows.Forms.Button();
this.button14 = new System.Windows.Forms.Button();
this.button13 = new System.Windows.Forms.Button();
this.button12 = new System.Windows.Forms.Button();

61 | P a g e
this.button11 = new System.Windows.Forms.Button();
this.button10 = new System.Windows.Forms.Button();
this.button9 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.buttonShowHide = new System.Windows.Forms.Button();
this.buttonReStart = new System.Windows.Forms.Button();
this.mainMenu = new
System.Windows.Forms.MainMenu(this.components);
this.miFile = new System.Windows.Forms.MenuItem();
this.miFileNewGame = new System.Windows.Forms.MenuItem();
this.miFileLoadPicture = new System.Windows.Forms.MenuItem();
this.mstart = new System.Windows.Forms.MenuItem();
this.miFileExit = new System.Windows.Forms.MenuItem();
this.miMode = new System.Windows.Forms.MenuItem();
this.miFileModeNumber = new System.Windows.Forms.MenuItem();
this.miFileModePicture = new System.Windows.Forms.MenuItem();
this.miFileModeNumPic = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem();
this.menuItem8 = new System.Windows.Forms.MenuItem();
this.buttonChangeImage = new System.Windows.Forms.Button();
this.buttonRefresh = new System.Windows.Forms.Button();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.tm = new System.Windows.Forms.ToolStripStatusLabel();
this.tc = new System.Windows.Forms.ToolStripStatusLabel();
this.bscore = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.button15);
this.panel1.Controls.Add(this.button14);
this.panel1.Controls.Add(this.button13);
this.panel1.Controls.Add(this.button12);
this.panel1.Controls.Add(this.button11);
this.panel1.Controls.Add(this.button10);
this.panel1.Controls.Add(this.button9);
this.panel1.Controls.Add(this.button8);
this.panel1.Controls.Add(this.button7);
this.panel1.Controls.Add(this.button6);
this.panel1.Controls.Add(this.button5);
this.panel1.Controls.Add(this.button4);
this.panel1.Controls.Add(this.button3);
this.panel1.Controls.Add(this.button2);
this.panel1.Controls.Add(this.button1);
this.panel1.Location = new System.Drawing.Point(20, 10);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(320, 320);

62 | P a g e
this.panel1.TabIndex = 0;
this.panel1.Paint += new
System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
//
// button15
//
this.button15.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button15.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button15.ForeColor = System.Drawing.SystemColors.Control;
this.button15.Location = new System.Drawing.Point(160, 240);
this.button15.Name = "button15";
this.button15.Size = new System.Drawing.Size(80, 80);
this.button15.TabIndex = 14;
this.button15.Click += new
System.EventHandler(this.OnButtonClick);
//
// button14
//
this.button14.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button14.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button14.ForeColor = System.Drawing.SystemColors.Control;
this.button14.Location = new System.Drawing.Point(80, 240);
this.button14.Name = "button14";
this.button14.Size = new System.Drawing.Size(80, 80);
this.button14.TabIndex = 13;
this.button14.Click += new
System.EventHandler(this.OnButtonClick);
//
// button13
//
this.button13.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button13.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button13.ForeColor = System.Drawing.SystemColors.Control;
this.button13.Location = new System.Drawing.Point(0, 240);
this.button13.Name = "button13";
this.button13.Size = new System.Drawing.Size(80, 80);
this.button13.TabIndex = 12;
this.button13.Click += new
System.EventHandler(this.OnButtonClick);
//
// button12
//
this.button12.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button12.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button12.ForeColor = System.Drawing.SystemColors.Control;
this.button12.Location = new System.Drawing.Point(240, 160);
this.button12.Name = "button12";
this.button12.Size = new System.Drawing.Size(80, 80);
this.button12.TabIndex = 11;

63 | P a g e
this.button12.Click += new
System.EventHandler(this.OnButtonClick);
//
// button11
//
this.button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button11.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button11.ForeColor = System.Drawing.SystemColors.Control;
this.button11.Location = new System.Drawing.Point(160, 160);
this.button11.Name = "button11";
this.button11.Size = new System.Drawing.Size(80, 80);
this.button11.TabIndex = 10;
this.button11.Click += new
System.EventHandler(this.OnButtonClick);
//
// button10
//
this.button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button10.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button10.ForeColor = System.Drawing.SystemColors.Control;
this.button10.Location = new System.Drawing.Point(80, 160);
this.button10.Name = "button10";
this.button10.Size = new System.Drawing.Size(80, 80);
this.button10.TabIndex = 9;
this.button10.Click += new
System.EventHandler(this.OnButtonClick);
//
// button9
//
this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button9.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button9.ForeColor = System.Drawing.SystemColors.Control;
this.button9.Location = new System.Drawing.Point(0, 160);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(80, 80);
this.button9.TabIndex = 8;
this.button9.Click += new System.EventHandler(this.OnButtonClick);
//
// button8
//
this.button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button8.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button8.ForeColor = System.Drawing.SystemColors.Control;
this.button8.Location = new System.Drawing.Point(240, 80);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(80, 80);
this.button8.TabIndex = 7;
this.button8.Click += new System.EventHandler(this.OnButtonClick);
//

64 | P a g e
// button7
//
this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button7.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button7.ForeColor = System.Drawing.SystemColors.Control;
this.button7.Location = new System.Drawing.Point(160, 80);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(80, 80);
this.button7.TabIndex = 6;
this.button7.Click += new System.EventHandler(this.OnButtonClick);
//
// button6
//
this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button6.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button6.ForeColor = System.Drawing.SystemColors.Control;
this.button6.Location = new System.Drawing.Point(80, 80);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(80, 80);
this.button6.TabIndex = 5;
this.button6.Click += new System.EventHandler(this.OnButtonClick);
//
// button5
//
this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button5.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button5.ForeColor = System.Drawing.SystemColors.Control;
this.button5.Location = new System.Drawing.Point(0, 80);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(80, 80);
this.button5.TabIndex = 4;
this.button5.Click += new System.EventHandler(this.OnButtonClick);
//
// button4
//
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button4.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button4.ForeColor = System.Drawing.SystemColors.Control;
this.button4.Location = new System.Drawing.Point(240, 0);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(80, 80);
this.button4.TabIndex = 3;
this.button4.Click += new System.EventHandler(this.OnButtonClick);
//
// button3
//
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;

65 | P a g e
this.button3.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button3.ForeColor = System.Drawing.SystemColors.Control;
this.button3.Location = new System.Drawing.Point(160, 0);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(80, 80);
this.button3.TabIndex = 2;
this.button3.Click += new System.EventHandler(this.OnButtonClick);
//
// button2
//
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button2.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.ForeColor = System.Drawing.SystemColors.Control;
this.button2.Location = new System.Drawing.Point(80, 0);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(80, 80);
this.button2.TabIndex = 1;
this.button2.Click += new System.EventHandler(this.OnButtonClick);
//
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("Microsoft Sans
Serif", 24F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.ForeColor = System.Drawing.SystemColors.Control;
this.button1.Location = new System.Drawing.Point(0, 0);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(80, 80);
this.button1.TabIndex = 0;
this.button1.Click += new System.EventHandler(this.OnButtonClick);
//
// buttonShowHide
//
this.buttonShowHide.Location = new System.Drawing.Point(182, 344);
this.buttonShowHide.Name = "buttonShowHide";
this.buttonShowHide.Size = new System.Drawing.Size(78, 24);
this.buttonShowHide.TabIndex = 1;
this.buttonShowHide.Text = "Show Image";
this.buttonShowHide.Click += new
System.EventHandler(this.buttonShowHideOnClick);
//
// buttonReStart
//
this.buttonReStart.Location = new System.Drawing.Point(16, 344);
this.buttonReStart.Name = "buttonReStart";
this.buttonReStart.Size = new System.Drawing.Size(61, 24);
this.buttonReStart.TabIndex = 2;
this.buttonReStart.Text = "ReStart";
this.buttonReStart.Click += new
System.EventHandler(this.OnButtonReStartClick);
//
// mainMenu

66 | P a g e
//
this.mainMenu.MenuItems.AddRange(new
System.Windows.Forms.MenuItem[] {
this.miFile,
this.miMode,
this.menuItem7});
//
// miFile
//
this.miFile.Index = 0;
this.miFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[]
{
this.miFileNewGame,
this.miFileLoadPicture,
this.mstart,
this.miFileExit});
this.miFile.Text = "Game";
//
// miFileNewGame
//
this.miFileNewGame.Index = 0;
this.miFileNewGame.Text = "New Game";
this.miFileNewGame.Click += new
System.EventHandler(this.OnmiFileNewGameClick);
//
// miFileLoadPicture
//
this.miFileLoadPicture.Index = 1;
this.miFileLoadPicture.Text = "Change Picture";
this.miFileLoadPicture.Click += new
System.EventHandler(this.OnmiFileChangePicture);
//
// mstart
//
this.mstart.Index = 2;
this.mstart.Text = "&Start";
this.mstart.Click += new System.EventHandler(this.mstart_Click);
//
// miFileExit
//
this.miFileExit.Index = 3;
this.miFileExit.Text = "E&xit";
this.miFileExit.Click += new
System.EventHandler(this.OnFileExitClick);
//
// miMode
//
this.miMode.Index = 1;
this.miMode.MenuItems.AddRange(new System.Windows.Forms.MenuItem[]
{
this.miFileModeNumber,
this.miFileModePicture,
this.miFileModeNumPic});
this.miMode.Text = "Mode";
//
// miFileModeNumber
//

67 | P a g e
this.miFileModeNumber.Checked = true;
this.miFileModeNumber.Index = 0;
this.miFileModeNumber.RadioCheck = true;
this.miFileModeNumber.Text = "Number Mode";
this.miFileModeNumber.Click += new
System.EventHandler(this.OnmiFileNumberModeClick);
//
// miFileModePicture
//
this.miFileModePicture.Index = 1;
this.miFileModePicture.RadioCheck = true;
this.miFileModePicture.Text = "Picture Mode";
this.miFileModePicture.Click += new
System.EventHandler(this.OnmiFileModePictureClick);
//
// miFileModeNumPic
//
this.miFileModeNumPic.Index = 2;
this.miFileModeNumPic.Text = "Number and Picture Mode";
this.miFileModeNumPic.Click += new
System.EventHandler(this.OnmiFileModeNumPic);
//
// menuItem7
//
this.menuItem7.Index = 2;
this.menuItem7.MenuItems.AddRange(new
System.Windows.Forms.MenuItem[] {
this.menuItem8});
this.menuItem7.Text = "Help";
//
// menuItem8
//
this.menuItem8.Index = 0;
this.menuItem8.Text = "Help";
this.menuItem8.Click += new
System.EventHandler(this.menuItem8_Click);
//
// buttonChangeImage
//
this.buttonChangeImage.Location = new System.Drawing.Point(83,
344);
this.buttonChangeImage.Name = "buttonChangeImage";
this.buttonChangeImage.Size = new System.Drawing.Size(88, 24);
this.buttonChangeImage.TabIndex = 3;
this.buttonChangeImage.Text = "&Change Image";
this.buttonChangeImage.Click += new
System.EventHandler(this.OnbuttonChangeImageClick);
//
// buttonRefresh
//
this.buttonRefresh.Location = new System.Drawing.Point(488, 344);
this.buttonRefresh.Name = "buttonRefresh";
this.buttonRefresh.Size = new System.Drawing.Size(96, 23);
this.buttonRefresh.TabIndex = 4;
this.buttonRefresh.Text = "Re&fresh";
this.buttonRefresh.Visible = false;

68 | P a g e
this.buttonRefresh.Click += new
System.EventHandler(this.buttonRefresh_Click);
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// statusStrip1
//
this.statusStrip1.BackColor = System.Drawing.Color.White;
this.statusStrip1.Items.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.tm,
this.tc});
this.statusStrip1.Location = new System.Drawing.Point(0, 372);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(348, 22);
this.statusStrip1.TabIndex = 16;
this.statusStrip1.Text = "statusStrip1";
//
// tm
//
this.tm.Name = "tm";
this.tm.Size = new System.Drawing.Size(0, 17);
//
// tc
//
this.tc.Name = "tc";
this.tc.Size = new System.Drawing.Size(13, 17);
this.tc.Text = "0";
//
// bscore
//
this.bscore.Location = new System.Drawing.Point(266, 344);
this.bscore.Name = "bscore";
this.bscore.Size = new System.Drawing.Size(75, 23);
this.bscore.TabIndex = 17;
this.bscore.Text = "Score";
this.bscore.UseVisualStyleBackColor = true;
this.bscore.Click += new System.EventHandler(this.bscore_Click);
//
// Puzzle
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(348, 394);
this.Controls.Add(this.bscore);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.buttonRefresh);
this.Controls.Add(this.buttonChangeImage);
this.Controls.Add(this.buttonReStart);
this.Controls.Add(this.buttonShowHide);
this.Controls.Add(this.panel1);
this.MaximizeBox = false;
this.Menu = this.mainMenu;

69 | P a g e
this.Name = "Puzzle";
this.StartPosition =
System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Puzzle AISOFT ";
this.panel1.ResumeLayout(false);
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();

}
#endregion

private void buttonShowHideOnClick(object sender, System.EventArgs


e)
{
Button tempBtn = (Button)sender;

if (tempBtn.Text == "Show Image")


{
this.Size = new Size (720,450);
Graphics g = this.CreateGraphics ();
g.DrawImage (MainBitmap,375,10,MainBitmap.Width
,MainBitmap.Height );
g.DrawString ("AISOFT",this.Font ,Brushes.MistyRose ,
375,20);

g.Dispose ();
tempBtn.Text = "Hide Image";
buttonRefresh.Visible = true;
}

else
{
this.Size = new Size (375,450);
tempBtn.Text = "Show Image";
buttonRefresh.Visible = false;
}
}
public bool checkFinish()
{
int i, j;
int k = 0, f = 1;
for (i = 0; i < 320; i+=80)
{
for (j = 0; j < 320; j += 80,k++)
{
if (k <15)
{
Button bb = (Button)but[k];

if (bb.Location.X != j || bb.Location.Y != i)
{
f = 0;

70 | P a g e
break;
}
}

}
if (f == 0) break;
}
if (f == 0) return false;
else return true;
}

private void MoveButton(Button ClickedButton)


{

if(EmptyPoint.X == ClickedButton.Location.X ||
EmptyPoint.Y == ClickedButton.Location.Y)
{

Point tempEmptyPoint = new Point ();


tempEmptyPoint = ClickedButton.Location;

int d = Direction (ClickedButton.Location


,EmptyPoint);

if(EmptyPoint.X == ClickedButton.Location.X )
{
foreach(Button bx in panel1.Controls )
{
if (((bx.Location.Y >=
ClickedButton.Location.Y)
&& (bx.Location.Y < EmptyPoint.Y
) &&(bx.Location.X == EmptyPoint.X )) || ((bx.Location.Y <=
ClickedButton.Location.Y)
&& (bx.Location.Y > EmptyPoint.Y
)&&(bx.Location.X == EmptyPoint.X )))
{
count++;
tc.Text = count.ToString();
switch (d)
{
case 1:
Functions.MoveUp(bx);
break;
case 3:
Functions.MoveDown(bx);
break;
}

}
}

71 | P a g e
if(EmptyPoint.Y == ClickedButton.Location.Y )
{

foreach(Button bx in panel1.Controls )
{
if (((bx.Location.X >=
ClickedButton.Location.X)
&& (bx.Location.X < EmptyPoint.X
) && (bx.Location.Y == EmptyPoint.Y )) || ((bx.Location.X <=
ClickedButton.Location.X)
&& (bx.Location.X >EmptyPoint.X
) && (bx.Location.Y == EmptyPoint.Y )))
{
count++;
tc.Text = count.ToString();
switch (d)
{
case 0 :
Functions.MoveRight(bx);
break;
case 2:
Functions.MoveLeft(bx);
break;

}
}
}
if (timer1.Enabled == true && checkFinish())
{
objc.write("-Rinsert into resulttb values('" + uname +
"','" +picname + "'," + count + ",'" + tm.Text+ "')");
//string rep = objc.read();
MessageBox.Show("Game Finished,you take " + count + "
Moves");
disableall();
NewGame();
}

EmptyPoint = tempEmptyPoint;
}
}

private int Direction( Point Loc,Point ep)


{
int valuetoreturn=0;
if ((Loc.X < ep.X) && (Loc.Y == ep.Y ))
valuetoreturn = 0;
else if ((Loc.X > ep.X) && (Loc.Y == ep.Y ))
valuetoreturn= 2;
else if ((Loc.Y < ep.Y) && (Loc.X == ep.X))
valuetoreturn = 3;
else if ((Loc.Y > ep.Y )&&( Loc.X == ep.X))
valuetoreturn= 1;

72 | P a g e
return valuetoreturn;
}

private void Randomize ()


{
Random r = new Random ();
Button tempBtn = new Button();
for (int i = 0; i < 100; i++)
{

tempBtn = (Button)alAllButtons[r.Next(alAllButtons.Count)];
MoveButton(tempBtn);
}
}
private void OnButtonClick(object sender, System.EventArgs e)
{
MoveButton((Button)sender);
}

public Image CropAndReturn(Bitmap ToBeCropped, Bitmap


NewBitmap,int x, int y)
{
Bitmap b = new Bitmap(x,y);
for(int i =0; i< x; i++)
for(int j = 0; j< y; j++)
b.SetPixel (i,j,ToBeCropped.GetPixel (i,j));
return b;

public ArrayList ReturnCroppedList(Bitmap ToBeCropped,int x,int y)


{
ArrayList ilTemp = new ArrayList ();
int h,v;
h=v=0;
for(int k = 0; k <15; k++)
{
Bitmap b = new Bitmap(x,y);

for(int i =0; i< x; i++)


for(int j = 0; j< y; j++)
b.SetPixel (i,j,ToBeCropped.GetPixel
((i+h),(j+v)));
ilTemp.Add(b);

h+=80;
if (h == 320)
{h=0; v+=80;}

}
return ilTemp;
}

public void AddImagesToButtons()


{

73 | P a g e
ilSmallImages = ReturnCroppedList(MainBitmap,80,80);
button1.Image = (Image)ilSmallImages[0];
button2.Image = (Image)ilSmallImages[1];
button3.Image = (Image)ilSmallImages[2];
button4.Image = (Image)ilSmallImages[3];
button5.Image = (Image)ilSmallImages[4];
button6.Image = (Image)ilSmallImages[5];
button7.Image = (Image)ilSmallImages[6];
button8.Image = (Image)ilSmallImages[7];
button9.Image = (Image)ilSmallImages[8];
button10.Image = (Image)ilSmallImages[9];
button11.Image = (Image)ilSmallImages[10];
button12.Image = (Image)ilSmallImages[11];
button13.Image = (Image)ilSmallImages[12];
button14.Image = (Image)ilSmallImages[13];
button15.Image = (Image)ilSmallImages[14];

}
private Bitmap GetBitmapFromDatabase(char c)
{

Bitmap b = new Bitmap (320,320);


Random r = new Random ();
string sql = "Select * from Bitmaps";
string strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="+Application.StartupPath +"\\game.mdb";
OleDbConnection Conn = new OleDbConnection (strConn);
try
{
Conn.Open();
System.Data.OleDb.OleDbDataAdapter da = new
OleDbDataAdapter (sql,Conn);
DataSet ds = new DataSet ();
da.Fill (ds,"Bitmaps");
DataTable dt = ds.Tables["Bitmaps"];
DataRow dr;
do
{
dr= dt.Rows [r.Next (dt.Rows.Count )];
picname = Application.StartupPath + "\\Images\\" +
dr["Picture"].ToString();
b=(Bitmap) Bitmap.FromFile (picname);
picname = picname.Substring(picname.LastIndexOf('\\') +
1);
// b = (Bitmap)Bitmap.FromFile(Application.StartupPath +
"\\Images\\" + dr["Picture"].ToString());

}while(dr["Type"].ToString () != c.ToString ());

}
catch (Exception ex)
{
MessageBox.Show (ex.Message.ToString ());
Conn.Close ();
}
finally

74 | P a g e
{
Conn.Close ();
}
return b;
}

private void OnButtonReStartClick(object sender, System.EventArgs


e)
{
Randomize();
starttime();
}

private void OnmiFileNewGameClick(object sender, System.EventArgs


e)
{
NewGame();
}

private void buttonRefresh_Click(object sender, System.EventArgs


e)
{
Graphics g = this.CreateGraphics ();
g.DrawImage (MainBitmap,375,10,MainBitmap.Width
,MainBitmap.Height);

g.DrawString ("AISOFT",this.Font ,Brushes.MistyRose ,


375,20);
g.Dispose ();
}
public void starttime()
{
se = 0;
mi = 0;
hr = 0;
count = 0;
}

private void OnbuttonChangeImageClick(object sender,


System.EventArgs e)
{
starttime();
MainBitmap = GetBitmapFromDatabase('N');
NewGame();
}

private void OnmiFileModeNumPic(object sender, System.EventArgs e)


{
miFileModeNumber.Checked = false;
miFileModePicture.Checked = false;
miFileModeNumPic.Checked = true;
if(pn == 0)
NewGame();
ShowNumbersOnButtons();

75 | P a g e
}

void ShowNumbersOnButtons()
{
button1.Text = "1";
button2.Text = "2";
button3.Text = "3";
button4.Text = "4";
button5.Text = "5";
button6.Text = "6";
button7.Text = "7";
button8.Text = "8";
button9.Text = "9";
button10.Text = "10";
button11.Text = "11";
button12.Text = "12";
button13.Text = "13";
button14.Text = "14";
button15.Text = "15";
}

void HideNumbersFromButtons()
{
button1.Text = "";
button2.Text = "";
button3.Text = "";
button4.Text = "";
button5.Text = "";
button6.Text = "";
button7.Text = "";
button8.Text = "";
button9.Text = "";
button10.Text = "";
button11.Text = "";
button12.Text = "";
button13.Text = "";
button14.Text = "";
button15.Text = "";
}
void HidePictureFromButtons()
{
NewGame();
}
private void OnmiFileModePictureClick(object sender,
System.EventArgs e)
{
if (miFileModeNumPic.Checked == true)
pn = 1;

miFileModeNumber.Checked = false;
miFileModePicture.Checked = true;
miFileModeNumPic.Checked = false;
NewGame();
}

76 | P a g e
private void OnmiFileChangePicture(object sender, System.EventArgs
e)
{
MainBitmap = GetBitmapFromDatabase('N');
NewGame();
}

private void OnmiFileNumberModeClick(object sender,


System.EventArgs e)
{
miFileModeNumber.Checked = true;
miFileModePicture.Checked = false;
miFileModeNumPic.Checked = false;
pn = 1;
HidePictureFromButtons();
ShowNumbersOnButtons();
disableall();
}
void NewGame()
{
if (miFileModeNumber.Checked == true)
{
pn = 0;
starttime();
MainBitmap = (Bitmap)Bitmap.FromFile(Application.StartupPath +
"\\Images\\clear.jpg");
}
else if (miFileModePicture.Checked == true)
{
HideNumbersFromButtons();
if (pn == 0)
{
MainBitmap = GetBitmapFromDatabase('N');
disableall();
//starttime();
}
}
else if (miFileModeNumPic.Checked == true)
{
if (pn == 0)
{
MainBitmap = GetBitmapFromDatabase('N');
disableall();
//starttime();
}
}
ilSmallImages = new ArrayList();
AddImagesToButtons();

Randomize();

private void OnFileExitClick(object sender, System.EventArgs e)


{

77 | P a g e
this.Close();
}

private void menuItem8_Click(object sender, EventArgs e)


{
MessageBox.Show("Write About Puzzle Game");
}

private void panel1_Paint(object sender, PaintEventArgs e)


{

private void timer1_Tick(object sender, EventArgs e)


{
se = se + 1;
if (se == 60)
{
mi = mi + 1;
se = 0;
}
if (mi == 60)
{
hr = hr + 1;
mi = 0;
}
string str = "";
str = hr.ToString() + ":";
str = str + mi.ToString() + ":";
str = str + se.ToString() + ":";

tm.Text = "" + str;

}
public void enableall()
{
starttime();
timer1.Start();
foreach (Button bx in panel1.Controls)
{
bx.Enabled = true;
}
}
public void disableall()
{
timer1.Stop();
count = 0;
foreach (Button bx in panel1.Controls)
{
bx.Enabled = false;
}
}

78 | P a g e
private void mstart_Click(object sender, EventArgs e)
{
enableall();
}

private void bscore_Click(object sender, EventArgs e)


{
objc.write("-Sselect uid,moves,dur from resulttb where pic='" +
picname + "' order by moves asc");
//string str = objc.read();
//MessageBox.Show(str);
}

}
}

BIBLIOGRAPHY
Patrick Naughton, Schildt Herbert, The Complete reference, Tata Mc Graw-
Hill, 2005.
Rogers S Press Man, Software Engineering, Practitioners Approach
Publishing, Fifth Edition, 2005.
Korth F.Henry, Silberschatz Abraham, Database System Concepts, MacGraw
Hill
Karli Watson, Beginning Visual C# 2005, Wiley Publishing, Inc.
P G.Muraleedharan, DataCentric.Net Programming With C#, Wrox Press
Ltd.

WEBLIOGRAPHY
1. www.google.com
2. www.microsoft.com/sql
3. www.sunsite.net.edu.ck/tutorials/seusql
4. en.wikipedia.org/wiki/.NET_Framework

79 | P a g e

You might also like