Ai Soft: B.Tech in Information Technology
Ai Soft: B.Tech in Information Technology
SCHOOL OF ENGINEERING
SEMESTER VII
2009-2010
ON
AI SOFT
Submitted By
JAYAKUMAR KANIYERI
MOHAMMED SHIYAD
SANGEETH.K.S
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.
2|Page
ACKNOWLEDGEMENT
I would like to thank Mr. Dr. Phillip Samuel, Head of Department for
providing us all the facilities for doing our work.
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
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.
2. Neural network
3. Expert system
4. Genetic algorithm
5|Page
5.
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.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.
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
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,
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.
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
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.
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
Class Libraries
Programming Languages
(VB.NET, C#, VC++…)
ASP.NET
15 | P a g e
A database system must provide following features,
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.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
Technical Feasibility
Economical Feasibility
Behavioral 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
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.
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.
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.
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.
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
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
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
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
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.
A report
A document
A message
Form Design
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
User Module
Assembly Module
Operation Module
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.
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.
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.
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
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.
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.
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).
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
windows forms
web forms
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.
Quality Assurance
Generic risks
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.
Test Procedure
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
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
44 | P a g e
Output Testing
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.
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
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.
48 | P a g e
Determine areas /modules on which testing should focus
Suggest improvements to Plus Point Solution.
SYSTEM IMPLIMENTATION
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.
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.
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
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
{
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;
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 ();
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)
{
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 );
}
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
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;
}
if(EmptyPoint.X == ClickedButton.Location.X ||
EmptyPoint.Y == ClickedButton.Location.Y)
{
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;
}
}
72 | P a g e
return valuetoreturn;
}
tempBtn = (Button)alAllButtons[r.Next(alAllButtons.Count)];
MoveButton(tempBtn);
}
}
private void OnButtonClick(object sender, System.EventArgs e)
{
MoveButton((Button)sender);
}
h+=80;
if (h == 320)
{h=0; v+=80;}
}
return ilTemp;
}
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)
{
}
catch (Exception ex)
{
MessageBox.Show (ex.Message.ToString ());
Conn.Close ();
}
finally
74 | P a g e
{
Conn.Close ();
}
return b;
}
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();
}
Randomize();
77 | P a g e
this.Close();
}
}
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();
}
}
}
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