0% found this document useful (0 votes)
140 views76 pages

Transactional Behavior Verification in Business Pross As A Service

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views76 pages

Transactional Behavior Verification in Business Pross As A Service

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 76

TRANSACTIONAL BEHAVIOR VERIFICATION IN BUSINESS PROSS

AS A SERVICE CONFIGRATION
Abstract
Business Process as a Service (BPaaS) is an emerging type of cloud service that offers

configurable and executable business processes to clients over the Internet. As BPaaS is still in

early years of research, many open issues remain. Managing the configuration of BPaaS builds

on areas such as software product lines and configurable business processes. The problem has

concerns to consider from several perspectives, such as the different types of variable features,

constraints between configuration options, and satisfying the requirements provided by the

client. In our approach, we use temporal logic templates to elicit transactional requirements from

clients that the configured service must adhere to. For formalizing constraints over configuration,

feature models are used. To manage all these concerns during BPaaS configuration, we develop a

structured process that applies formal methods while directing clients through specifying

transactional requirements and selecting configurable features. The Binary Decision Diagram

(BDD) analysis is then used to verify that the selected configurable features do not violate any

constraints. Finally, model checking is applied to verify the configured service against the

transactional requirement set. We demonstrate the feasibility of our approach with several

validation scenarios and performance evaluations.


Acknowledgment
List of figures
List of abbreviations.

1. Privacy-preserving data publishing,


2. Customized privacy Protection,
3. Personalization,
4. Ranking-based recommendation
5. Social media,
6. Location based social networks
Table content:
- Abstract
- Introduction
- - objectives
-Overview of the system

- System analysis
- Existing system
- Proposed system.

- Feasibility study
- Technical feasibility
- Operational feasibility
- Economical feasibility
- System Requirements
- Modules description
- SDLC methodology
- Software requirement
- Hardware requirement
- System design
-UML
- Technology description.
- coding
- testing
- Output screens
- Conclusion
- Bibliography
- References.
Abstract
Business Process as a Service (BPaaS) is an emerging type of cloud service that offers

configurable and executable business processes to clients over the Internet. As BPaaS is still in

early years of research, many open issues remain. Managing the configuration of BPaaS builds

on areas such as software product lines and configurable business processes. The problem has

concerns to consider from several perspectives, such as the different types of variable features,

constraints between configuration options, and satisfying the requirements provided by the

client. In our approach, we use temporal logic templates to elicit transactional requirements from

clients that the configured service must adhere to. For formalizing constraints over configuration,

feature models are used. To manage all these concerns during BPaaS configuration, we develop a

structured process that applies formal methods while directing clients through specifying

transactional requirements and selecting configurable features. The Binary Decision Diagram

(BDD) analysis is then used to verify that the selected configurable features do not violate any

constraints. Finally, model checking is applied to verify the configured service against the

transactional requirement set. We demonstrate the feasibility of our approach with several

validation scenarios and performance evaluations.


INTRODUCTION
Objectives
 In this digital world, internet plays an important role in daily life. Accordingly Ecommerce
websites are growing and people tend to use these utilities for online shopping, bill paying
etc. Since these are time saving mechanisms. Even though, security is vital when doing these
businesses. The chances for getting these websites attacked are very high. And thus the data
regarding accounts and payment are revealed. E-commerce websites use many security
measures for keeping the confidential data. These data consists of important information like
card number, account number, cvv etc. Even though these are securities enabled, many fraud
attempts are reported causing problems to the account holder. In ordered to overcome this
problem, introducing a new security framework named as BPaas (Business Process as a
service). It acts as a third party application which helps to reducing fraudulent activities in
online transactions. This paper improves the security in transactions for protecting the money
and also avoids hacking activities. It will be very helpful especially in business processes
 In this modern world, internet plays an important role in daily life. Accordingly Ecommerce
websites are growing and people tend to use these utilities for online shopping, bill paying
etc, since these are time saving mechanisms. Even though, security is vital when doing these
businesses, the chances for getting these websites attacked are very high. Thus the data
regarding accounts and payment are revealed. This paper introduces a new concept called
Business Process as a Service(Bpaas) which is used for enhancing security in the online
payment transactions. If an online transaction is performed with the help of a trusted entity
who knows all the details of the account holder like card number, CVV etc. There is a
possibility of user account being misused. In this case, user will set a limit for the amount
that can be withdrawn from the account through BpasS framework. The system will not
allow withdrawing money from user account more than the limit.This helps to reduce the
fraud activities like hacking and reduce the security incidents through online transactions.

Overview of the system


In recent years, cloud services have had dramatic impacts in both the research [1] and industry
[2] landscapes of service-oriented computing. Cloud computing has become a popular paradigm
for delivering a wide range of services, such as software applications, computing capacity,
storage, and virtual platforms [3]. Cloud service providers can offer these utilities to clients over
the Internet in a pay-by-use manner. The distinctive properties of cloud services include: On-
demand availability through public or private network access, most commonly the Internet [3].
Utilization of pooled resources such as servers, applications, CPU time, or storage. Dynamic
response to workload by elastically provisioning and releasing resources [3][4]. Configurability
of service behavior of properties to meet individual client requirements [5][6][7]. The traditional
hierarchy of cloud service types is comprised of three layers, where each layer can provide the
base (infrastructure or platform) for running services within the layer above [3]. Infrastructure as
a Service (IaaS) is the bottom service layer, providing access to virtualized physical resources,
such as storage and computation capacity. Computing capacity offered by Amazon EC21 or IBM
SmartCloud.
SYSTEM ANALYSIS
Existing system
As BPaaS is still an emerging technology, this framework especially one that enables
clients to ensure complex transactional requirements, would be a significant contribution to the
field. Existing approaches that manage cloud service evolution focus on requirements such as
process structure fairness, and preserving elasticity and multi-tenancy. To the best of our
knowledge, complex properties such as transactional requirements are yet to receive attention in
this area. The work presented in this article will hopefully provide avenues for addressing a host
of opportunities present in the early stages of BPaaS research.

DISADVANTAGES

 The problem has concerns to consider from several perspectives, such as the different types
of variable features, constraints between configuration options, and satisfying the
requirements provided by the client.
 BDD analysis is able to efficiently solve satisfiability Problems, but the size of the BDD
dependent on variable Ordering in the underlying propositional logic Property.
 While finding the most efficient ordering is An NP-complete problem, ordering variables
from a depth-first traversal of the feature model has been approved as an effective strategy.
Therefore, we adopt this approach in our work when transforming the feature model to
propositional logic

Proposed system.
Our approach manages BPaaS configuration in a way that addresses the issues identified above.
Firstly, our BPaaS model enables configuration from numerous perspectives important to BPaaS
clients, namely, activities, resources, and data objects, as shown in the scenario examples. Our
configuration method aims to elicit and ensure complex transactional requirements from clients,
by adapting the temporal logic template set as shown in Section 4. This is in contrast to the
approaches proposed but it has the advantage of a reduced runtime when configuring services
with many configuration options and values..
ADVANTAGES OF PROPOSED SYSTEM

 To the best of our knowledge, transactional requirements important to clients, such as those
supported by our template set, are not yet supported by any business process configuration
method, and this is one of the major contributions of this work compared to existing works.
 This increases client trust that the service will behave in a manner consistent with internal
business policies and requirements, without having to perform their own analysis of the
service behavior.
 Our BPaaS model enables configuration from numerous perspectives important to BPaaS
clients, namely, activities, resources, and data objects.
 Our configuration method aims to elicit and ensure complex transactional requirements from
clients, by adapting the temporal logic template set.
 It has the advantage of a reduced runtime when configuring services with many configuration
options and values

FEASIBILITY STUDY
PRELIMINARY INVESTIGATION

The first and foremost strategy for development of a project starts from the thought of
designing a mail enabled platform for a small firm in which it is easy and convenient of sending
and receiving messages, there is a search engine ,address book and also including some
entertaining games. When it is approved by the organization and our project guide the first
activity, ie. Preliminary investigation begins. The activity has three parts:

 Request Clarification

 Feasibility Study

 Request Approval

REQUEST CLARIFICATION

After the approval of the request to the organization and project guide, with an
investigation being considered, the project request must be examined to determine precisely what
the system requires. Here our project is basically meant for users within the company whose
systems can be interconnected by the Local Area Network(LAN). In today’s busy schedule man
need everything should be provided in a readymade manner. So taking into consideration of the
vastly use of the net in day to day life, the corresponding development of the portal came into
existence.

FEASIBILITY ANALYSIS

An important outcome of preliminary investigation is the determination that the system request
is feasible. This is possible only if it is feasible within limited resource and time. The different
feasibilities that have to be analyzed are

 Operational Feasibility
 Economic Feasibility
 Technical Feasibility

Operational Feasibility
Operational Feasibility deals with the study of prospects of the system to be developed.
This system operationally eliminates all the tensions of the Admin and helps him in effectively
tracking the project progress. This kind of automation will surely reduce the time and energy,
which previously consumed in manual work. Based on the study, the system is proved to be
operationally feasible.

Economic Feasibility

Economic Feasibility or Cost-benefit is an assessment of the economic justification for a


computer based project. As hardware was installed from the beginning & for lots of purposes
thus the cost on project of hardware is low. Since the system is a network based, any number of
employees connected to the LAN within that organization can use this tool from at anytime. The
Virtual Private Network is to be developed using the existing resources of the organization. So
the project is economically feasible.

Technical Feasibility
According to Roger S. Pressman, Technical Feasibility is the assessment of the technical
resources of the organization. The organization needs IBM compatible machines with a graphical
web browser connected to the Internet and Intranet. The system is developed for platform
Independent environment. Java Server Pages, JavaScript, HTML, SQL server and WebLogic
Server are used to develop the system. The technical feasibility has been carried out. The system
is technically feasible for development and can be developed with the existing facility.
SYSTEM REQUIREMENTS
Modules description
Model Checking:

Model checking is a formal method that exhaustively verifies that the behavior of a given model
conforms to a set of properties. We use the NuSMV model checker to verify BPaaS
configurations against the temporal logic forms of conversation rules and transactional
requirements. Our verification uses the symbolic BDD-based model checking feature of
NuSMV. This constructs BDDs from the input model to apply several verification techniques,
including fair CTL model checking and LTL model checking (by an algorithm that reduces the
problem to CTL model checking). We use NuSMV as it provides support for properties
formulated in both LTL and CTL.

Resource and Data Object Selection:

In this model checking phase, only transactional requirements with resources or data objects in
their specification need to be verified. All other requirements have been ensured in the activity
selection phase. This phase is necessary because an activity can have more than one resource
provisioned, in order to defer the selection to the user at runtime. For example, a configuration
may include several resources for the Process Payment activity. When verifying the activity
selection, Process Payment will be treated as a single state. However, when considering
resources, it becomes several states in an XOR structure, as the choice of resource is deferred to
runtime. Data objects are assumed to apply to every runtime instance and do not require process
restructuring during verification. If a violation is found, the client must reconfigure the service
by interpreting the model checking output.

Performance Analysis :

There are several reasons that our configuration process must be able to handle large and
complex scenarios in an efficient way. Firstly, the impact state space explosion has on model
checking performance is exponential as the size of the model increases. Clients may also have
large and complex sets of transactional requirements to be verified. Furthermore, model checking
may need to be applied by the client several times, if a configuration solution is difficult to
obtain. Therefore, long verification times are likely to compound and become a bigger problem
for clients.

Temporal Logic Templates:

The first step in our performance analysis is to verify the impact each individual temporal logic
template has on model checking performance. the verification time for minimal Kripke
structures, as generated by our Kripke structure reduction algorithm, against one requirement
specified using each template. The Scope variable required by every template is set to Global in
each test in order to obtain an even comparison. These results indicate that the templates with the
greatest model checking performance demand are Compensate Success, Alternative,
NonRetriablePivot, and Compensation. Our evaluation utilizes these templates in an even ratio.
SDLC methodology
INPUT DESIGN

Input Design plays a vital role in the life cycle of software development, it requires very
careful attention of developers. The input design is to feed data to the application as accurate as
possible. So inputs are supposed to be designed effectively so that the errors occurring while
feeding are minimized. According to Software Engineering Concepts, the input forms or screens
are designed to provide to have a validation control over the input limit, range and other related
validations.

This system has input screens in almost all the modules. Error messages are developed to
alert the user whenever he commits some mistakes and guides him in the right way so that
invalid entries are not made. Let us see deeply about this under module design.

Input design is the process of converting the user created input into a computer-based
format. The goal of the input design is to make the data entry logical and free from errors. The
error is in the input are controlled by the input design. The application has been developed in
user-friendly manner. The forms have been designed in such a way during the processing the
cursor is placed in the position where must be entered. The user is also provided with in an
option to select an appropriate input from various alternatives related to the field in certain cases.

Validations are required for each data entered. Whenever a user enters an erroneous data,
error message is displayed and the user can move on to the subsequent pages after completing all
the entries in the current page.

OUTPUT DESIGN
The Output from the computer is required to mainly create an efficient method of
communication within the company primarily among the project leader and his team members,
in other words, the administrator and the clients. The output of VPN is the system which allows
the project leader to manage his clients in terms of creating new clients and assigning new
projects to them, maintaining a record of the project validity and providing folder level access to
each client on the user side depending on the projects allotted to him. After completion of a
project, a new project may be assigned to the client. User authentication procedures are
maintained at the initial stages itself. A new user may be created by the administrator himself or
a user can himself register as a new user but the task of assigning projects and validating a new
user rests with the administrator only.

The application starts running when it is executed for the first time. The server has to be started
and then the internet explorer in used as the browser. The project will run on the local area
network so the server machine will serve as the administrator while the other connected systems
can act as the clients. The developed system is highly user friendly and can be easily understood
by anyone using it even for the first time

FUNCTIONAL REQUIREMENTS:

A functional requirement defines a function of a software system or its component. A function is


described as a set of input process and output.
Input: this should require information service information data. It for used for search and
security evaluation.
Process: depend on algorithms analysis works. We analyses security, items search using
efficient mining.
Store: given input will be stored and get from databases.
Output: output will displayed depend in mining algorithms

NON-FUNCTIONAL REQUIREMENTS:

Usability: This should be given the leading priority. This should be able to log into system with
ease and should be able to access all grants. A User can learn to operate prepare inputs for
interpret outputs on a system.

Reliability: This is the ability of system component to perform it required functions understand
Condition for a specified period on time. Reliability includes mean time to security attacks or
failures. One of the main factors that are used to determines the important requirement of any
application.
Performance: It is concerned with quantifiable activates of the system. System must have
internet facility to maintain an accurate date and time and transfer operations.

Supportability: As this application is made up of Java resources, it should not be a problem


moving to other server operating systems.

Implementation: The client is implemented in Java, it can run on any browser where the user
will be able to operate the system.

Operations: The operations requirements are constraints on the Boolean keywords and query
conditions.

Extensibility: This system should be flexible in such a way that it can be easily extended in
order to add some more modules in the future.
Hardware Constraints:

Processor : Any Processor above 500 Mhz.

Ram : 128Mb.

Hard Disk : 10 Gb.

Compact Disk : 650 Mb.

Input device : Standard Keyboard and Mouse.

Output device : VGA and High Resolution Monitor.

Software Constraints:

Operating System : Windows 2000 server Family.

Techniques : Java

Front End : JSP

IDE : .Netbeans

Database : MySql
SYSTEM DESIGN
SYSTEM DESIGN

Identifying Design Goals

There are several reasons to identify the design goals of any system. These goals will help to
design the system in an efficient manner. There are several criteria to identify these goals. Some
of the criteria were explained below:

Performance criteria:

a) Response time: The response time of the method is very low because the system simple
design developed on the high performance system.

b) Throughput: The throughput of the system is high.

c) Memory: memory used by the system is very low.

Dependability criteria:

a) Robustness: the system should be designed to work efficiently on images of any type of
formats without any problem.

b) Availability: the system should be ready to accept command from user at any point of time.

c) Fault Tolerance: the system should not allow the user to work with fault input. It displays
error messages foe every specific fault occurred.

Maintenance criteria:

a) Portability: the system should work on all the platforms like linux, windows.

b) Readability: the code generated should be able to understand the purpose of the project, so
as to make the user to make the modifications easily.

c) Traceability: the code generated should be easy to map with the functions with the
operations selected by the user.
End-user criteria:

a) Utility: the system should be made to operate on al inputs of end-user under any kind of
circumstances. It should complete all the commands or instructions given by user without
any interruptions.

b) Usability: the interface of the user is to be defined with all options which make the work of
the end-user easier.

UML Diagrams

UML stands for Unified Modeling Language. This object-oriented system of notation has
evolved from the work of Grady Booch, James Rumbaugh, Ivar Jacobson, and the Rational
Software Corporation. These renowned computer scientists fused their respective technologies
into a single, standardized model. Today, UML is accepted by the Object Management Group
(OMG)as the standard for modeling object oriented programs.

There are two broad categories of diagrams and then are again divided into sub-categories:

• Structural Diagrams

• Behavioral Diagrams

Structural Diagrams:

The structural diagrams represent the static aspect of the system. These static aspects represent
those parts of a diagram which forms the main structure and therefore stable.

These static parts are represents by classes, interfaces, objects, components and nodes. The four
structural diagrams are:

• Class diagram
• Object diagram
• Component diagram
• Deployment diagram
Class Diagram:

Class diagrams are the most common diagrams used in UML. Class diagram consists of classes,
interfaces, associations and collaboration. Class diagrams basically represent the object oriented
view of a system which is static in nature. Active class is used in a class diagram to represent
the concurrency of the system. Class diagram represents the object orientation of a system. So it
is generally used for development purpose. This is the most widely used diagram at the time of
system construction.

Object Diagram:

Object diagrams can be described as an instance of class diagram. So these diagrams


are more close to real life scenarios where we implement a system. Object diagrams are a set of
objects and their relationships just like class diagrams and also represent the static view of the
system. The usage of object diagrams is similar to class diagrams but they are used to build
prototype of a system from practical perspective.

Component Diagram:

Component diagrams represent a set of components and their relationships. These


components consist of classes, interfaces or collaborations. So Component diagrams represent
the implementation view of a system.

During design phase software artifacts (classes, interfaces etc) of a system are
arranged in different groups depending upon their relationship. Now these groups are known as
components. Finally, component diagrams are used to visualize the implementation.

Deployment Diagram:

Deployment diagrams are a set of nodes and their relationships. These nodes are
physical entities where the components are deployed. Deployment diagrams are used for
visualizing deployment view of a system. This is generally used by the deployment team.

Behavioral Diagrams: Any system can have two aspects, static and dynamic. So a model is
considered as complete when both the aspects are covered fully. Behavioral diagrams basically
capture the dynamic aspect of a system. Dynamic aspect can be further described as the
changing/moving parts of a system.

UML has the following five types of behavioral diagrams:

• Use case diagram

• Sequence diagram

• Collaboration diagram

• State chart diagram

• Activity diagram

Use case Diagram:

Use case diagrams are a set of use cases, actors and their relationships. They represent
the use case view of a system. A use case represents a particular functionality of a system. So
use case diagram is used to describe the relationships among the functionalities and their
internal/external controllers. These controllers are known as actors.

Sequence Diagram:

A sequence diagram is an interaction diagram. From the name it is clear that the
diagram deals with some sequences, which are the sequence of messages flowing from one
object to another. Interaction among the components of a system is very important from
implementation and execution perspective. So Sequence diagram is used to visualize the
sequence of calls in a system to perform a specific functionality.

Collaboration Diagram:

Collaboration diagram is another form of interaction diagram. It represents the structural


organization of a system and the messages sent/received. Structural organization consists of
objects and links.

The purpose of collaboration diagram is similar to sequence diagram. But the specific purpose
of collaboration diagram is to visualize the organization of objects and their interaction.
State chart Diagram:

Any real time system is expected to be reacted by some kind of internal/external


events. These events are responsible for state change of the system. State chart diagram is used
to represent the event driven state change of a system. It basically describes the state change of
a class, interface etc. State chart diagram is used to visualize the reaction of a system by
internal/external factors.

Activity Diagram:

Activity diagram describes the flow of control in a system. So it consists of activities


and links. The flow can be sequential, concurrent or branched. Activities are nothing but the
functions of a system. Numbers of activity diagrams are prepared to capture the entire flow in a
system. Activity diagrams are used to visualize the flow of controls in a system. This is
prepared to have an idea of how the system will work when executed.

Architecture Diagram
User

UserLogin

Check

No
yes

Upload Files UserRegistration

Requst For Service

Downloads Files

End Process

Admin

Adminlogin

Vi ew User Fil es

Registration
userlist

End Process

Server
Serverlogin

Accept Requests

Registration
View Server Usage

End Process

Sequence Diagram

User

Download Files requset for Service to s


user Login UploadFiles

Enter username and password

message

message

Server
View User Account
Server Login View Files Logout
Server View Server Used Memory

Enter username and password

Enter username and password message

Admin

View User Account


Admin Login View Files Logout
Admin View server Details

Enter username and password

Enter username and password message


Component Diagram

User

Enter Username and Password


Login

User

View Server Details

Upload Files Download Files Logout

Admin

Enter Logi Name and Password


Login

Admin

User Details View User Files Server Details Logout

Server

Enter Logi Name and Password


Login

Server

Accept Request View User Files Server Details Logout


Activity Diagram:

UserLogin

User Login

Logout
Request For service
Files Upload File Downloads

Admin

Admin Login

Logout
Server Lists
Files Used Servers UserList

Server
server

View Uswed Server View Files View User Used Space Logout
Technology description

Java Technology

Java technology is both a programming language and a Platform.

The Java Programming Language

The Java programming language is a high-level language that can be characterized by all
of the following buzzwords:

i. Simple
ii. Architecture neutral
iii. Object oriented
iv. Portable
v. Distributed
vi. High performance
vii. Interpreted
viii. Multithreaded
ix. Robust
x. Dynamic
xi. Secure
With most programming languages, you either compile or interpret a program so that you
can run it on your computer. The Java programming language is unusual in that a program is
both compiled and interpreted. With the compiler, first you translate a program into an
intermediate language called Java byte codes —the platform-independent codes interpreted by
the interpreter on the Java platform. The interpreter parses and runs each Java byte code
instruction on the computer.

Compilation happens just once; interpretation occurs each time the program is executed.
The following figure illustrates how this works.
FIGURE 3.1- WORKING OF JAVA

You can think of Java byte codes as the machine code instructions for the Java Virtual
Machine (Java VM). Every Java interpreter, whether it’s a development tool or a Web browser
that can run applets, is an implementation of the Java VM. Java byte codes help make “write
once, run anywhere” possible. You can compile your program into byte codes on any platform
that has a Java compiler. The byte codes can then be run on any implementation of the Java VM.
That means that as long as a computer has a Java VM, the same program written in the Java
programming language can run on Windows 2000, a Solaris workstation, or on an iMac.

The Java Platform

A platform is the hardware or software environment in which a program runs. The Java
platform differs from most other platforms in that it’s a software-only platform that runs on top
of other hardware-based platforms.

The Java platform has two components:

a. The Java Virtual Machine (Java VM)

b. The Java Application Programming Interface (Java API)

You’ve already been introduced to the Java VM. It’s the base for the Java platform and is
ported onto various hardware-based platforms. The Java API is a large collection of ready-made
software components that provide many useful capabilities, such as graphical user interface
(GUI) widgets. The Java API is grouped into libraries of related classes and interfaces; these
libraries are known as packages.The following figure depicts a program that’s running on the
Java platform. As the figure shows, the Java API and the virtual machine insulate the program
from the hardware.

FIGURE 3.2- THE JAVA PLATFORM


Native code is code that after you compile it, the compiled code runs on a specific
hardware platform. As a platform-independent environment, the Java platform can be a bit
slower than native code. However, smart compilers, well-tuned interpreters, and just-in-time byte
code compilers can bring performance close to that of native code without threatening
portability.

Every full implementation of the Java platform gives you the following features:

i. The essentials: Objects, strings, threads, numbers, input and output, data structures,
system properties, date and time, and so on.

ii. Applets: The set of conventions used by applets.

iii. Networking: URLs, TCP (Transmission Control Protocol), UDP (User Data gram
Protocol) sockets, and IP (Internet Protocol) addresses.

iv. Internationalization: Help for writing programs that can be localized for users
worldwide. Programs can automatically adapt to specific locales and be displayed in the
appropriate langage.

v. Security: Both low level and high level, including electronic signatures, public and
private key management, access control, and certificates.

vi. Software components: Known as JavaBeansTM, can plug into existing component
architectures.

vii. Object serialization: Allows lightweight persistence and communication via Remote
Method Invocation (RMI).

viii. Java Database Connectivity (JDBCTM): Provides uniform access to a wide range of
relational databases.

The Java platform also has APIs for 2D and 3D graphics, accessibility, servers,
collaboration, telephony, speech, animation, and more. The following figure depicts what is
included in the Java 2 SDK.
ODBC

Microsoft Open Database Connectivity (ODBC) is a standard programming interface for


application developers and database systems providers. Before ODBC became a de facto
standard for Windows programs to interface with database systems, programmers had to use
proprietary languages for each database they wanted to connect to. Now, ODBC has made the
choice of the database system almost irrelevant from a coding perspective, which is as it should
be. Application developers have much more important things to worry about than the syntax that
is needed to port their program from one database to another when business needs suddenly
change.

Through the ODBC Administrator in Control Panel, you can specify the particular
database that is associated with a data source that an ODBC application program is written to
use. Think of an ODBC data source as a door with a name on it. Each door will lead you to a
particular database. For example, the data source named Sales Figures might be a SQL Server
database, whereas the Accounts Payable data source could refer to an Access database. The
physical database referred to by a data source can reside anywhere on the LAN.

The ODBC system files are not installed on your system by Windows 95. Rather, they
are installed when you setup a separate database application, such as SQL Server Client or
Visual Basic 4.0. When the ODBC icon is installed in Control Panel, it uses a file called
ODBCINST.DLL. It is also possible to administer your ODBC data sources through a stand-
alone program called ODBCADM.EXE. There is a 16-bit and a 32-bit version of this program,
and each maintains a separate list of ODBC data sources.

The advantages of this scheme are so numerous that you are probably thinking there must
be some catch. The only disadvantage of ODBC is that it isn’t as efficient as talking directly to
the native database interface. ODBC has had many detractors make the charge that it is too slow.
Microsoft has always claimed that the critical factor in performance is the quality of the driver
software that is used. In our humble opinion, this is true. The availability of good ODBC drivers
has improved a great deal recently. And anyway, the criticism about performance is somewhat
analogous to those who said that compilers would never match the speed of pure assembly
language. Maybe not, but the compiler (or ODBC) gives you the opportunity to write cleaner
programs, which means you finish sooner. Meanwhile, computers get faster every year.

JDBC Goals:

1.SQL Level API

The designers felt that their main goal was to define a SQL interface for Java. Although
not the lowest database interface level possible, it is at a low enough level for higher-level tools
and APIs to be created. Conversely, it is at a high enough level for application programmers to
use it confidently.

Attaining this goal allows for future tool vendors to “generate” JDBC code and to hide many of
JDBC’s complexities from the end user.

2. SQL Conformance

SQL syntax varies as you move from database vendor to database vendor. In an effort to
support a wide variety of vendors, JDBC will allow any query statement to be passed through it
to the underlying database driver. This allows the connectivity module to handle non-standard
functionality in a manner that is suitable for its users.

3. JDBC must be implemental on top of common database interfaces

The JDBC SQL API must “sit” on top of other common SQL level APIs. This go allows
JDBC to use existing ODBC level drivers by the use of a software interface. This interface
would translate JDBC calls to ODBC and vice versa.

4. Provide a Java interface that is consistent with the rest of the Java system

Because of Java’s acceptance in the user community thus far, the designers feel that they
should not stray from the current design of the core Java system.

5. Keep it simple

This goal probably appears in all software design goal listings. JDBC is no exception.
Sun felt that the design of JDBC should be very simple, allowing for only one method of
completing a task per mechanism. Allowing duplicate functionality only serves to confuse the
users of the API.

6. Use strong, static typing wherever possible

Strong typing allows for more error checking to be done at compile time; also, less errors appear
at runtime.

7. Keep the common cases simple

Because more often than not, the usual SQL calls used by the programmer are simple

NetBeans:

NetBeans is a software development platform written in Java. The NetBeans Platform


allows applications to be developed from a set of modular software components called modules.
Applications based on the NetBeans Platform, including the NetBeans integrated development
environment (IDE), can be extended by third party developers.

The NetBeans IDE is primarily intended for development in Java, but also supports other
languages, in particular PHP, C/C++ and HTML5.

NetBeans is cross-platform and runs on Microsoft Windows, Mac OS X, Linux, Solaris and
other platforms supporting a compatible JVM.

History:

NetBeans began in 1996 as Xelfi (word play on Delphi),[7][8] a Java IDE student project under the
guidance of the Faculty of Mathematics and Physics at Charles University in Prague. In 1997,
Roman Stank formed a company around the project and produced commercial versions of the
NetBeans IDE until it was bought by Sun Microsystems in 1999. Sun open-sourced the
NetBeans IDE in June of the following year. Since then, the NetBeans community has continued
to grow.[9] In 2010, Sun (and thus NetBeans) was acquired by Oracle Corporation.

NetBeans Platform:
The NetBeans Platform is a framework for simplifying the development of Java Swing desktop
applications. The NetBeans IDE bundle for Java SE contains what is needed to start developing
NetBeans plugins and NetBeans Platform based applications; no additional SDK is required.
Applications can install modules dynamically. Any application can include the Update Center
module to allow users of the application to download digitally signed upgrades and new features
directly into the running application. Reinstalling an upgrade or a new release does not force
users to download the entire application again.The platform offers reusable services common to
desktop applications, allowing developers to focus on the logic specific to their application.
Among the features of the platform are:
i. User interface management (e.g. menus and toolbars)
ii. User settings management
iii. Storage management (saving and loading any kind of data)
iv. Window management
v. Wizard framework (supports step-by-step dialogs)

vi. NetBeans Visual Library

vii. Integrated development tools

NetBeans IDE :

NetBeans IDE is an open-source integrated development environment. NetBeans IDE supports


development of all Java application types (Java SE (including JavaFX), Java ME, web, EJB and
mobile applications) out of the box. Among other features are an Ant-based project system,
Maven support, refactorings, versioncontrol (supporting CVS, Subversion, Git, Mercurial and
Clearcase)

All the functions of the IDE are provided by modules. Each module provides a well-defined
function, such as support for the Java language, editing, or support for the CVS versioning
system, and SVN. NetBeans contains all the modules needed for Java development in a single
download, allowing the user to start working immediately. Modules also allow NetBeans to be
extended. New features, such as support for other programming languages, can be added by
installing additional modules. For instance, Sun Studio, Sun Java Studio Enterprise, and Sun
Java Studio Creator from Sun Microsystems are all based on the NetBeans IDE.

JavaScript and Ajax Development


JavaScript is an object-oriented scripting language primarily used in client-side interfaces for
web applications. Ajax (Asynchronous JavaScript and XML) is a Web 2.0 technique that allows
changes to occur in a web page without the need to perform a page refresh. JavaScript toolkits
can be leveraged to implement Ajax-enabled components and functionality in web pages.

Web Server and Client


Web Server is software that can process the client request and send the response back to the
client. For example, Apache is one of the most widely used web server. Web Server runs on
some physical machine and listens to client request on specific port.
A web client is software that helps in communicating with the server. Some of the most widely
used web clients are Firefox, Google Chrome, Safari etc. When we request something from
server (through URL), web client takes care of creating a request and sending it to server and
then parsing the server response and present it to the user.

HTML and HTTP


Web Server and Web Client are two separate softwares, so there should be some common
language for communication. HTML is the common language between server and client and
stands for HyperText Markup Language.
Web server and client needs a common communication protocol, HTTP (HyperText Transfer
Protocol) is the communication protocol between server and client. HTTP runs on top of TCP/IP
communication protocol.
Some of the important parts of HTTP Request are:
 HTTP Method – action to be performed, usually GET, POST, PUT etc.
 URL – Page to access
 Form Parameters – similar to arguments in a java method, for example user,password
details from login page.
Sample HTTP Request:
1GET /FirstServletProject/jsps/hello.jsp HTTP/1.1
2Host: localhost:8080
3Cache-Control: no-cache
Some of the important parts of HTTP Response are:
 Status Code – an integer to indicate whether the request was success or not. Some of the
well known status codes are 200 for success, 404 for Not Found and 403 for Access
Forbidden.
 Content Type – text, html, image, pdf etc. Also known as MIME type
 Content – actual data that is rendered by client and shown to user.

MIME Type or Content Type: If you see above sample HTTP response header, it contains tag
“Content-Type”. It’s also called MIME type and server sends it to client to let them know the
kind of data it’s sending. It helps client in rendering the data for user. Some of the mostly used
mime types are text/html, text/xml, application/xml etc.

Understanding URL
URL is acronym of Universal Resource Locator and it’s used to locate the server and resource.
Every resource on the web has it’s own unique address. Let’s see parts of URL with an example.
http://localhost:8080/FirstServletProject/jsps/hello.jsp

http:// – This is the first part of URL and provides the communication protocol to be used in
server-client communication.

localhost – The unique address of the server, most of the times it’s the hostname of the server
that maps to unique IP address. Sometimes multiple hostnames point to same IP addresses and
web server virtual host takes care of sending request to the particular server instance.

8080 – This is the port on which server is listening, it’s optional and if we don’t provide it in
URL then request goes to the default port of the protocol. Port numbers 0 to 1023 are reserved
ports for well known services, for example 80 for HTTP, 443 for HTTPS, 21 for FTP etc.

FirstServletProject/jsps/hello.jsp – Resource requested from server. It can be static html, pdf,


JSP, servlets, PHP etc.
Why we need Servlet and JSPs?
Web servers are good for static contents HTML pages but they don’t know how to generate
dynamic content or how to save data into databases, so we need another tool that we can use to
generate dynamic content. There are several programming languages for dynamic content like
PHP, Python, Ruby on Rails, Java Servlets and JSPs.
Java Servlet and JSPs are server side technologies to extend the capability of web servers by
providing support for dynamic response and data persistence.

Web Container
Tomcat is a web container, when a request is made from Client to web server, it passes the
request to web container and it’s web container job to find the correct resource to handle the
request (servlet or JSP) and then use the response from the resource to generate the response and
provide it to web server. Then web server sends the response back to the client.
When web container gets the request and if it’s for servlet then container creates two Objects
HTTPServletRequest and HTTPServletResponse. Then it finds the correct servlet based on the
URL and creates a thread for the request. Then it invokes the servlet service() method and based
on the HTTP method service() method invokes doGet() or doPost() methods. Servlet methods
generate the dynamic page and write it to response. Once servlet thread is complete, container
converts the response to HTTP response and send it back to client.
Some of the important work done by web container are:
 Communication Support – Container provides easy way of communication between
web server and the servlets and JSPs. Because of container, we don’t need to build a
server socket to listen for any request from web server, parse the request and generate
response. All these important and complex tasks are done by container and all we need to
focus is on our business logic for our applications.
 Lifecycle and Resource Management – Container takes care of managing the life cycle
of servlet. Container takes care of loading the servlets into memory, initializing servlets,
invoking servlet methods and destroying them. Container also provides utility like JNDI
for resource pooling and management.
 Multithreading Support – Container creates new thread for every request to the servlet
and when it’s processed the thread dies. So servlets are not initialized for each request
and saves time and memory.
 JSP Support – JSPs doesn’t look like normal java classes and web container provides
support for JSP. Every JSP in the application is compiled by container and converted to
Servlet and then container manages them like other servlets.
 Miscellaneous Task – Web container manages the resource pool, does memory
optimizations, run garbage collector, provides security configurations, support for
multiple applications, hot deployment and several other tasks behind the scene that makes
our life easier.

Coding
package reformance.evaluation;

import weka.classifiers.Classifier;
import weka.classifiers.Sourcable;
import weka.classifiers.trees.j48.BinC45ModelSelection;
import weka.classifiers.trees.j48.C45ModelSelection;
import weka.classifiers.trees.j48.C45PruneableClassifierTree;
import weka.classifiers.trees.j48.ClassifierTree;
import weka.classifiers.trees.j48.ModelSelection;
import weka.classifiers.trees.j48.PruneableClassifierTree;
import weka.core.AdditionalMeasureProducer;
import weka.core.Capabilities;
import weka.core.Drawable;
import weka.core.Instance;
import weka.core.Instances;
import weka.core.Matchable;
import weka.core.Option;
import weka.core.OptionHandler;
import weka.core.RevisionUtils;
import weka.core.Summarizable;
import weka.core.TechnicalInformation;
import weka.core.TechnicalInformationHandler;
import weka.core.Utils;
import weka.core.WeightedInstancesHandler;
import weka.core.TechnicalInformation.Field;
import weka.core.TechnicalInformation.Type;
import java.util.Enumeration;
import java.util.Vector;

/**
<!-- globalinfo-start -->
* Class for generating a pruned or unpruned C4.5 decision tree. For more information, see<br/>
* <br/>
* Ross Quinlan (1993). C4.5: Programs for Machine Learning. Morgan Kaufmann Publishers,
San Mateo, CA.
* <p/>
<!-- globalinfo-end -->
*
<!-- technical-bibtex-start -->
* BibTeX:
* <pre>
* &#64;book{Quinlan1993,
* address = {San Mateo, CA},
* author = {Ross Quinlan},
* publisher = {Morgan Kaufmann Publishers},
* title = {C4.5: Programs for Machine Learning},
* year = {1993}
*}
* </pre>
* <p/>
<!-- technical-bibtex-end -->
*
<!-- options-start -->
* Valid options are: <p/>
*
* <pre> -U
* Use unpruned tree.</pre>
*
* <pre> -C &lt;pruning confidence&gt;
* Set confidence threshold for pruning.
* (default 0.25)</pre>
*
* <pre> -M &lt;minimum number of instances&gt;
* Set minimum number of instances per leaf.
* (default 2)</pre>
*
* <pre> -R
* Use reduced error pruning.</pre>
*
* <pre> -N &lt;number of folds&gt;
* Set number of folds for reduced error
* pruning. One fold is used as pruning set.
* (default 3)</pre>
*
* <pre> -B
* Use binary splits only.</pre>
*
* <pre> -S
* Don't perform subtree raising.</pre>
*
* <pre> -L
* Do not clean up after the tree has been built.</pre>
*
* <pre> -A
* Laplace smoothing for predicted probabilities.</pre>
*
* <pre> -Q &lt;seed&gt;
* Seed for random data shuffling (default 1).</pre>
*
<!-- options-end -->
*
* @author Eibe Frank ([email protected])
* @version $Revision: 1.9 $
*/
public class C45
extends Classifier
implements OptionHandler, Drawable, Matchable, Sourcable,
WeightedInstancesHandler, Summarizable, AdditionalMeasureProducer,
TechnicalInformationHandler {

/** for serialization */


static final long serialVersionUID = -217733168393644444L;

/** The decision tree */


private ClassifierTree m_root;

/** Unpruned tree? */


private boolean m_unpruned = false;

/** Confidence level */


private float m_CF = 0.25f;

/** Minimum number of instances */


private int m_minNumObj = 2;

/** Determines whether probabilities are smoothed using


Laplace correction when predictions are generated */
private boolean m_useLaplace = false;
/** Use reduced error pruning? */
private boolean m_reducedErrorPruning = false;

/** Number of folds for reduced error pruning. */


private int m_numFolds = 3;

/** Binary splits on nominal attributes? */


private boolean m_binarySplits = false;

/** Subtree raising to be performed? */


private boolean m_subtreeRaising = true;

/** Cleanup after the tree has been built. */


private boolean m_noCleanup = false;

/** Random number seed for reduced-error pruning. */


private int m_Seed = 1;

/**
* Returns a string describing classifier
* @return a description suitable for
* displaying in the explorer/experimenter gui
*/
public String globalInfo() {

return "Class for generating a pruned or unpruned C4.5 decision tree. For more "
+ "information, see\n\n"
+ getTechnicalInformation().toString();
}

/**
* Returns an instance of a TechnicalInformation object, containing
* detailed information about the technical background of this class,
* e.g., paper reference or book this class is based on.
*
* @return the technical information about this class
*/
public TechnicalInformation getTechnicalInformation() {
TechnicalInformation result;

result = new TechnicalInformation(Type.BOOK);


result.setValue(Field.AUTHOR, "Ross Quinlan");
result.setValue(Field.YEAR, "1993");
result.setValue(Field.TITLE, "C4.5: Programs for Machine Learning");
result.setValue(Field.PUBLISHER, "Morgan Kaufmann Publishers");
result.setValue(Field.ADDRESS, "San Mateo, CA");

return result;
}

/**
* Returns default capabilities of the classifier.
*
* @return the capabilities of this classifier
*/
public Capabilities getCapabilities() {
Capabilities result;

try {
if (!m_reducedErrorPruning)
result = new C45PruneableClassifierTree(null, !m_unpruned, m_CF, m_subtreeRaising, !
m_noCleanup).getCapabilities();
else
result = new PruneableClassifierTree(null, !m_unpruned, m_numFolds, !m_noCleanup,
m_Seed).getCapabilities();
}
catch (Exception e) {
result = new Capabilities(this);
}

result.setOwner(this);

return result;
}

/**
* Generates the classifier.
*
* @param instances the data to train the classifier with
* @throws Exception if classifier can't be built successfully
*/
public void buildClassifier(Instances instances)
throws Exception {

ModelSelection modSelection;

if (m_binarySplits)
modSelection = new BinC45ModelSelection(m_minNumObj, instances);
else
modSelection = new C45ModelSelection(m_minNumObj, instances);
if (!m_reducedErrorPruning)
m_root = new C45PruneableClassifierTree(modSelection, !m_unpruned, m_CF,
m_subtreeRaising, !m_noCleanup);
else
m_root = new PruneableClassifierTree(modSelection, !m_unpruned, m_numFolds,
!m_noCleanup, m_Seed);
m_root.buildClassifier(instances);
if (m_binarySplits) {
((BinC45ModelSelection)modSelection).cleanup();
} else {
((C45ModelSelection)modSelection).cleanup();
}
}

/**
* Classifies an instance.
*
* @param instance the instance to classify
* @return the classification for the instance
* @throws Exception if instance can't be classified successfully
*/
public double classifyInstance(Instance instance) throws Exception {

return m_root.classifyInstance(instance);
}

/**
* Returns class probabilities for an instance.
*
* @param instance the instance to calculate the class probabilities for
* @return the class probabilities
* @throws Exception if distribution can't be computed successfully
*/
public final double [] distributionForInstance(Instance instance)
throws Exception {

return m_root.distributionForInstance(instance, m_useLaplace);


}

/**
* Returns the type of graph this classifier
* represents.
* @return Drawable.TREE
*/
public int graphType() {
return Drawable.TREE;
}
/**
* Returns graph describing the tree.
*
* @return the graph describing the tree
* @throws Exception if graph can't be computed
*/
public String graph() throws Exception {

return m_root.graph();
}

/**
* Returns tree in prefix order.
*
* @return the tree in prefix order
* @throws Exception if something goes wrong
*/
public String prefix() throws Exception {

return m_root.prefix();
}

/**
* Returns tree as an if-then statement.
*
* @param className the name of the Java class
* @return the tree as a Java if-then type statement
* @throws Exception if something goes wrong
*/
public String toSource(String className) throws Exception {

StringBuffer [] source = m_root.toSource(className);


return
"class " + className + " {\n\n"
+" public static double classify(Object[] i)\n"
+" throws Exception {\n\n"
+" double p = Double.NaN;\n"
+ source[0] // Assignment code
+" return p;\n"
+" }\n"
+ source[1] // Support code
+"}\n";
}

/**
* Returns an enumeration describing the available options.
*
* Valid options are: <p>
*
* -U <br>
* Use unpruned tree.<p>
*
* -C confidence <br>
* Set confidence threshold for pruning. (Default: 0.25) <p>
*
* -M number <br>
* Set minimum number of instances per leaf. (Default: 2) <p>
*
* -R <br>
* Use reduced error pruning. No subtree raising is performed. <p>
*
* -N number <br>
* Set number of folds for reduced error pruning. One fold is
* used as the pruning set. (Default: 3) <p>
*
* -B <br>
* Use binary splits for nominal attributes. <p>
*
* -S <br>
* Don't perform subtree raising. <p>
*
* -L <br>
* Do not clean up after the tree has been built.
*
* -A <br>
* If set, Laplace smoothing is used for predicted probabilites. <p>
*
* -Q <br>
* The seed for reduced-error pruning. <p>
*
* @return an enumeration of all the available options.
*/
public Enumeration listOptions() {

Vector newVector = new Vector(9);

newVector.
addElement(new Option("\tUse unpruned tree.",
"U", 0, "-U"));
newVector.
addElement(new Option("\tSet confidence threshold for pruning.\n" +
"\t(default 0.25)",
"C", 1, "-C <pruning confidence>"));
newVector.
addElement(new Option("\tSet minimum number of instances per leaf.\n" +
"\t(default 2)",
"M", 1, "-M <minimum number of instances>"));
newVector.
addElement(new Option("\tUse reduced error pruning.",
"R", 0, "-R"));
newVector.
addElement(new Option("\tSet number of folds for reduced error\n" +
"\tpruning. One fold is used as pruning set.\n" +
"\t(default 3)",
"N", 1, "-N <number of folds>"));
newVector.
addElement(new Option("\tUse binary splits only.",
"B", 0, "-B"));
newVector.
addElement(new Option("\tDon't perform subtree raising.",
"S", 0, "-S"));
newVector.
addElement(new Option("\tDo not clean up after the tree has been built.",
"L", 0, "-L"));
newVector.
addElement(new Option("\tLaplace smoothing for predicted probabilities.",
"A", 0, "-A"));
newVector.
addElement(new Option("\tSeed for random data shuffling (default 1).",
"Q", 1, "-Q <seed>"));

return newVector.elements();
}

/**
* Parses a given list of options.
*
<!-- options-start -->
* Valid options are: <p/>
*
* <pre> -U
* Use unpruned tree.</pre>
*
* <pre> -C &lt;pruning confidence&gt;
* Set confidence threshold for pruning.
* (default 0.25)</pre>
*
* <pre> -M &lt;minimum number of instances&gt;
* Set minimum number of instances per leaf.
* (default 2)</pre>
*
* <pre> -R
* Use reduced error pruning.</pre>
*
* <pre> -N &lt;number of folds&gt;
* Set number of folds for reduced error
* pruning. One fold is used as pruning set.
* (default 3)</pre>
*
* <pre> -B
* Use binary splits only.</pre>
*
* <pre> -S
* Don't perform subtree raising.</pre>
*
* <pre> -L
* Do not clean up after the tree has been built.</pre>
*
* <pre> -A
* Laplace smoothing for predicted probabilities.</pre>
*
* <pre> -Q &lt;seed&gt;
* Seed for random data shuffling (default 1).</pre>
*
<!-- options-end -->
*
* @param options the list of options as an array of strings
* @throws Exception if an option is not supported
*/
public void setOptions(String[] options) throws Exception {

// Other options
String minNumString = Utils.getOption('M', options);
if (minNumString.length() != 0) {
m_minNumObj = Integer.parseInt(minNumString);
} else {
m_minNumObj = 2;
}
m_binarySplits = Utils.getFlag('B', options);
m_useLaplace = Utils.getFlag('A', options);

// Pruning options
m_unpruned = Utils.getFlag('U', options);
m_subtreeRaising = !Utils.getFlag('S', options);
m_noCleanup = Utils.getFlag('L', options);
if ((m_unpruned) && (!m_subtreeRaising)) {
throw new Exception("Subtree raising doesn't need to be unset for unpruned tree!");
}
m_reducedErrorPruning = Utils.getFlag('R', options);
if ((m_unpruned) && (m_reducedErrorPruning)) {
throw new Exception("Unpruned tree and reduced error pruning can't be selected " +
"simultaneously!");
}
String confidenceString = Utils.getOption('C', options);
if (confidenceString.length() != 0) {
if (m_reducedErrorPruning) {
throw new Exception("Setting the confidence doesn't make sense " +
"for reduced error pruning.");
} else if (m_unpruned) {
throw new Exception("Doesn't make sense to change confidence for unpruned "
+"tree!");
} else {
m_CF = (new Float(confidenceString)).floatValue();
if ((m_CF <= 0) || (m_CF >= 1)) {
throw new Exception("Confidence has to be greater than zero and smaller " +
"than one!");
}
}
} else {
m_CF = 0.25f;
}
String numFoldsString = Utils.getOption('N', options);
if (numFoldsString.length() != 0) {
if (!m_reducedErrorPruning) {
throw new Exception("Setting the number of folds" +
" doesn't make sense if" +
" reduced error pruning is not selected.");
} else {
m_numFolds = Integer.parseInt(numFoldsString);
}
} else {
m_numFolds = 3;
}
String seedString = Utils.getOption('Q', options);
if (seedString.length() != 0) {
m_Seed = Integer.parseInt(seedString);
} else {
m_Seed = 1;
}
}

/**
* Gets the current settings of the Classifier.
*
* @return an array of strings suitable for passing to setOptions
*/
public String [] getOptions() {

String [] options = new String [14];


int current = 0;

if (m_noCleanup) {
options[current++] = "-L";
}
if (m_unpruned) {
options[current++] = "-U";
} else {
if (!m_subtreeRaising) {
options[current++] = "-S";
}
if (m_reducedErrorPruning) {
options[current++] = "-R";
options[current++] = "-N"; options[current++] = "" + m_numFolds;
options[current++] = "-Q"; options[current++] = "" + m_Seed;
} else {
options[current++] = "-C"; options[current++] = "" + m_CF;
}
}
if (m_binarySplits) {
options[current++] = "-B";
}
options[current++] = "-M"; options[current++] = "" + m_minNumObj;
if (m_useLaplace) {
options[current++] = "-A";
}

while (current < options.length) {


options[current++] = "";
}
return options;
}

/**
* Returns the tip text for this property
* @return tip text for this property suitable for
* displaying in the explorer/experimenter gui
*/
public String seedTipText() {
return "The seed used for randomizing the data " +
"when reduced-error pruning is used.";
}

/**
* Get the value of Seed.
*
* @return Value of Seed.
*/
public int getSeed() {

return m_Seed;
}

/**
* Set the value of Seed.
*
* @param newSeed Value to assign to Seed.
*/
public void setSeed(int newSeed) {

m_Seed = newSeed;
}

/**
* Returns the tip text for this property
* @return tip text for this property suitable for
* displaying in the explorer/experimenter gui
*/
public String useLaplaceTipText() {
return "Whether counts at leaves are smoothed based on Laplace.";
}

/**
* Get the value of useLaplace.
*
* @return Value of useLaplace.
*/
public boolean getUseLaplace() {

return m_useLaplace;
}

/**
* Set the value of useLaplace.
*
* @param newuseLaplace Value to assign to useLaplace.
*/
public void setUseLaplace(boolean newuseLaplace) {

m_useLaplace = newuseLaplace;
}

/**
* Returns a description of the classifier.
*
* @return a description of the classifier
*/
public String toString() {

if (m_root == null) {
return "No classifier built";
}
if (m_unpruned)
return "J48 unpruned tree\n------------------\n" + m_root.toString();
else
return "J48 pruned tree\n------------------\n" + m_root.toString();
}

/**
* Returns a superconcise version of the model
*
* @return a summary of the model
*/
public String toSummaryString() {

return "Number of leaves: " + m_root.numLeaves() + "\n"


+ "Size of the tree: " + m_root.numNodes() + "\n";
}

/**
* Returns the size of the tree
* @return the size of the tree
*/
public double measureTreeSize() {
return m_root.numNodes();
}

/**
* Returns the number of leaves
* @return the number of leaves
*/
public double measureNumLeaves() {
return m_root.numLeaves();
}

/**
* Returns the number of rules (same as number of leaves)
* @return the number of rules
*/
public double measureNumRules() {
return m_root.numLeaves();
}

/**
* Returns an enumeration of the additional measure names
* @return an enumeration of the measure names
*/
public Enumeration enumerateMeasures() {
Vector newVector = new Vector(3);
newVector.addElement("measureTreeSize");
newVector.addElement("measureNumLeaves");
newVector.addElement("measureNumRules");
return newVector.elements();
}

/**
* Returns the value of the named measure
* @param additionalMeasureName the name of the measure to query for its value
* @return the value of the named measure
* @throws IllegalArgumentException if the named measure is not supported
*/
public double getMeasure(String additionalMeasureName) {
if (additionalMeasureName.compareToIgnoreCase("measureNumRules") == 0) {
return measureNumRules();
} else if (additionalMeasureName.compareToIgnoreCase("measureTreeSize") == 0) {
return measureTreeSize();
} else if (additionalMeasureName.compareToIgnoreCase("measureNumLeaves") == 0) {
return measureNumLeaves();
} else {
throw new IllegalArgumentException(additionalMeasureName
+ " not supported (j48)");
}
}

/**
* Returns the tip text for this property
* @return tip text for this property suitable for
* displaying in the explorer/experimenter gui
*/
public String unprunedTipText() {
return "Whether pruning is performed.";
}

/**
* Get the value of unpruned.
*
* @return Value of unpruned.
*/
public boolean getUnpruned() {

return m_unpruned;
}

/**
* Set the value of unpruned. Turns reduced-error pruning
* off if set.
* @param v Value to assign to unpruned.
*/
public void setUnpruned(boolean v) {

if (v) {
m_reducedErrorPruning = false;
}
m_unpruned = v;
}

/**
* Returns the tip text for this property
* @return tip text for this property suitable for
* displaying in the explorer/experimenter gui
*/
public String confidenceFactorTipText() {
return "The confidence factor used for pruning (smaller values incur "
+ "more pruning).";
}

/**
* Get the value of CF.
*
* @return Value of CF.
*/
public float getConfidenceFactor() {

return m_CF;
}

/**
* Set the value of CF.
*
* @param v Value to assign to CF.
*/
public void setConfidenceFactor(float v) {

m_CF = v;
}

/**
* Returns the tip text for this property
* @return tip text for this property suitable for
* displaying in the explorer/experimenter gui
*/
public String minNumObjTipText() {
return "The minimum number of instances per leaf.";
}

/**
* Get the value of minNumObj.
*
* @return Value of minNumObj.
*/
public int getMinNumObj() {

return m_minNumObj;
}

/**
* Set the value of minNumObj.
*
* @param v Value to assign to minNumObj.
*/
public void setMinNumObj(int v) {

m_minNumObj = v;
}

/**
* Returns the tip text for this property
* @return tip text for this property suitable for
* displaying in the explorer/experimenter gui
*/
public String reducedErrorPruningTipText() {
return "Whether reduced-error pruning is used instead of C.4.5 pruning.";
}

/**
* Get the value of reducedErrorPruning.
*
* @return Value of reducedErrorPruning.
*/
public boolean getReducedErrorPruning() {

return m_reducedErrorPruning;
}

/**
* Set the value of reducedErrorPruning. Turns
* unpruned trees off if set.
*
* @param v Value to assign to reducedErrorPruning.
*/
public void setReducedErrorPruning(boolean v) {

if (v) {
m_unpruned = false;
}
m_reducedErrorPruning = v;
}

/**
* Returns the tip text for this property
* @return tip text for this property suitable for
* displaying in the explorer/experimenter gui
*/
public String numFoldsTipText() {
return "Determines the amount of data used for reduced-error pruning. "
+ " One fold is used for pruning, the rest for growing the tree.";
}

/**
* Get the value of numFolds.
*
* @return Value of numFolds.
*/
public int getNumFolds() {

return m_numFolds;
}
/**
* Set the value of numFolds.
*
* @param v Value to assign to numFolds.
*/
public void setNumFolds(int v) {

m_numFolds = v;
}

/**
* Returns the tip text for this property
* @return tip text for this property suitable for
* displaying in the explorer/experimenter gui
*/
public String binarySplitsTipText() {
return "Whether to use binary splits on nominal attributes when "
+ "building the trees.";
}

/**
* Get the value of binarySplits.
*
* @return Value of binarySplits.
*/
public boolean getBinarySplits() {

return m_binarySplits;
}

/**
* Set the value of binarySplits.
*
* @param v Value to assign to binarySplits.
*/
public void setBinarySplits(boolean v) {

m_binarySplits = v;
}

/**
* Returns the tip text for this property
* @return tip text for this property suitable for
* displaying in the explorer/experimenter gui
*/
public String subtreeRaisingTipText() {
return "Whether to consider the subtree raising operation when pruning.";
}

/**
* Get the value of subtreeRaising.
*
* @return Value of subtreeRaising.
*/
public boolean getSubtreeRaising() {

return m_subtreeRaising;
}

/**
* Set the value of subtreeRaising.
*
* @param v Value to assign to subtreeRaising.
*/
public void setSubtreeRaising(boolean v) {

m_subtreeRaising = v;
}

/**
* Returns the tip text for this property
* @return tip text for this property suitable for
* displaying in the explorer/experimenter gui
*/
public String saveInstanceDataTipText() {
return "Whether to save the training data for visualization.";
}

/**
* Check whether instance data is to be saved.
*
* @return true if instance data is saved
*/
public boolean getSaveInstanceData() {

return m_noCleanup;
}

/**
* Set whether instance data is to be saved.
* @param v true if instance data is to be saved
*/
public void setSaveInstanceData(boolean v) {
m_noCleanup = v;
}

/**
* Returns the revision string.
*
* @return the revision
*/
public String getRevision() {
return RevisionUtils.extract("$Revision: 1.9 $");
}

/**
* Main method for testing this class
*
* @param argv the commandline options
*/
public static void main(String [] argv){
argv[0]="weather3.arff";
runClassifier(new C45(),argv );
}

TESTING
TESTING

Software testing is an investigation conducted to provide stakeholders with


information about the quality of the product or service under test. [1]Software testing can also
provide an objective, independent view of the softwareto allow the business to appreciate and
understand the risks of software implementation. Test techniques include, but are not limited to
the process of executing a program or application with the intent of finding software bugs(errors
or other defects).

Software testing can be stated as the process of validating and verifying that a computer
program/application/product:

• It meets the requirements that guided its design and development,

• It works as expected,

• It can be implemented with the same characteristics, It satisfies the needs of
stakeholders.

Software testing, depending on the testing method employed, can be implemented at any time in
the software development process.

Testing levels

There are generally four recognized levels of tests: unit testing, integration testing,
system testing, and acceptance testing. Tests are frequently grouped by where they are added in
the software development process, or by the level of specificity of the test.

Unit testing

Unit testing, also known as component testing, refers to tests that verify the functionality of a
specific section of code, usually at the function level. In an object-oriented environment, this is
usually at the class level, and the minimal unit tests include the constructors and destructors.[32]
These types of tests are usually written by developers as they work on code (white-box style), to
ensure that the specific function is working as expected. One function might have multiple tests,
to catch corner casesor other branches in the code. Unit testing alone cannot verify the
functionality of a piece of software, but rather is used to assure that the building blocks the
software uses work independently of each other.

Unit testing is a software development process that involves synchronized application of a


broad spectrum of defect prevention and detection strategies in order to reduce software
development risks, time, and costs. It is performed by the software developer or engineer during
the construction phase of the software development lifecycle. Rather than replace traditional
QA focuses, it augments it. Unit testing aims to eliminate construction errors before code is
promoted to QA; this strategy is intended to increase the quality of the resulting software as
well as the efficiency of the overall development and QA process.

Integration testing

Integration testing is any type of software testing that seeks to verify the interfaces
between components against a software design. Software components may be integrated in an
iterative way or all together. Normally the former is considered a better practice since it allows
interface issues to be located more quickly and fixed.

Integration testing works to expose defects in the interfaces and interaction between integrated
components (modules). Progressively larger groups of tested software components
corresponding to elements of the architectural design are integrated and tested until the software
works as a system.

System testing

System testing, or end-to-end testing, tests a completely integrated system to verify


that it meets its requirements. For example, a system test might involve testing a logon
interface, then creating and editing an entry, plus sending or printing results, followed by
summary processing or deletion (or archiving) of entries, then logoff.
In addition, the software testing should ensure that the program, as well as working as expected,
does not also destroy or partially corrupt its operating environment or cause other processes
within that environment to become inoperative this includes not corrupting shared memory, not
consuming or locking up excessive resources and leaving any parallel processes unharmed by
its presence.

Testing Types:

Installation testing

An installation test assures that the system is installed correctly and working at actual
customer's hardware.

Compatibility testing

A common cause of software failure (real or perceived) is a lack of its compatibilitywith


other application software,operating systems(or operating system versions, old or new), or
target environments that differ greatly from the original (such as a terminalor GUIapplication
intended to be run on the desktopnow being required to become a web application, which must
render in a web browser). For example, in the case of a lack of backward compatibility, this can
occur because the programmers develop and test software only on the latest version of the target
environment, which not all users may be running. This result in the unintended consequence
that the latest work may not function on earlier versions of the target environment or on older
hardware that earlier versions of the target environment was capable of using.

Smoke and Sanity Testing

Sanity testingdetermines whether it is reasonable to proceed with further testing.

Smoke testingconsists of minimal attempts to operate the software, designed to determine


whether there are any basic problems that will prevent it from working at all. Such tests can be
used as build verification test.
Regression testing

Regression testing focuses on finding defects after a major code change has occurred.
Specifically, it seeks to uncover software regressions, as degraded or lost features, including old
bugs that have come back. Such regressions occur whenever software functionality that was
previously working, correctly, stops working as intended. Typically, regressions occur as an
unintended consequenceof program changes, when the newly developed part of the software
collides with the previously existing code. Common methods of regression testing include
rerunning previous sets of test-cases and checking whether previously fixed faults have
reemerged.

Acceptance Testing

Acceptance testing can mean one of two things:

1. A smoke testis used as an acceptance test prior to introducing a new build to the main
testing process, i.e. before integrationor regression.
2. Acceptance testing performed by the customer, often in their lab environment on their
own hardware, is known as user acceptance testing(UAT). Acceptance testing may be
performed as part of the hand-off process between any two phases of development.

Alpha testing

Alpha testing is simulated or actual operational testing by potential users/customers or an


independent test team at the developers' site.

Beta Testing

Beta testing comes after alpha testing and can be considered a form of external user acceptance
testing. Versions of the software, known as beta versions, are released to a limited audience
outside of the programming team. The software is released to groups of people so that further
testing can ensure the product has few faults or bugs. Sometimes, beta versions are made
available to the open public to increase the feedbackfield to a maximal number of future users.

Functional Vs Non-Functional Testing

Functional testing refers to activities that verify a specific action or function of the
code. These are usually found in the code requirements documentation, although some
development methodologies work from use cases or user stories. Functional tests tend to answer
the question of "can the user do this" or "does this particular feature work."

Non-functional testing refers to aspects of the software that may not be related to a
specific function or user action, such as scalabilityor other performance, behavior under certain
constraints, or security. Testing will determine the breaking point, the point at which extremes
of scalability or performance leads to unstable execution.

Test Case Reports


Test Case# : 1 Priority(H,L): High
Test Objective: Please select dataset.
Test Description: browse dataset is checked.
Requirements Verified: Dataset is checked in the database
Test Environment: Internet Explorer/Frefox
Test setup or Pre-conditions: User initiates any dataset control like Browse
button
Actions Expected Results
If the dataset already exists A message “dataset already exists.” is
displayed. all the required fields are
entered correctly
Pass: Yes Conditional Pass: Fail:
PrP Problems or issues: Nil
Test Case# : 2 Priority(H,L): High
Test Objective: Please select dataset for prediction testing
Test Description: browse dataset is checked
Requirements Verified: Dataset is checked in the database
Test Environment: Jframe, swing
Test setup or Pre-conditions: User initiates any dataset control like Browse button.
Actions Expected Results
If the dataset already exists A message “dataset already exists.” is
displayed. all the required fields are
entered correctly.

Pass: Yes Conditional Pass: Fail:


PrP Problems or issues: Nil

Test Case# : 3 Priority(H,L): High


Test Objective: Please select datasets before predictions
Test Description: Please select datasets in both dataset is checked.
Requirements Verified: dataset in both parties data are checked in the database
Test Environment: Internet Explorer/Frefox
Test setup or Pre-conditions: User initiates any dataset control like Browse button
Actions Expected Results
If the dataset already exists2 dataset in A message “2 dataset in both parties data.” is
both parties data selected or not displayed. if all the required fields are entered
correctly
Pass: Yes Conditional Pass: Fail:
PrP Problems or issues: Nil
- Output screens
Conclusion
The increase in cloud computing adaptations in recent years has produced the concept of
Business Process as a Service (BPaaS), whereby service providers are able to offer common or
proven business processes to clients looking to automate and/or outsource parts of their
operations.We address the problem of managing BPaaS configuration in a way to ensure that the
resulting service i) is valid with respect to configuration constraints of the provider, and ii)
satisfies transactional requirements drawn from the business rules of the client. Our approach
utilizes several modelling techniques, including BPMN for business process structure, statecharts
for transactional state, feature models for configuration constraints. Using these models, we
develop a BPaaS configuration process that applies Binary Decision Diagram (BDD) analysis
and model checking. BDD analysis ensures that BPaaS features selected during configuration do
not violate the domain constraints of the service provider, while model checking verifies the
configured BPaaS against transactional requirements provided by the client. To reduce the
impact of state-space explosion, we employ a state-space reduction algorithm and split the model
checking into two phases. These phases verify different configuration perspectives separately,
and allow for the state space and temporal logic properties to be reduced further. Our
performance analysis shows that the proposed configuration method is capable of verifying
models with hundreds of activities, resources, data objects, and requirement sets within seconds.
Bibliography
Good Teachers are worth more than thousand books, we have them in Our Department

References Made From:

1. User Interfaces in C#: Windows Forms and Custom Controls by Matthew MacDonald.
2. Applied Microsoft® .NET Framework Programming (Pro-Developer) by Jeffrey Richter.
3. Practical .Net2 and C#2: Harness the Platform, the Language, and the Framework by Patrick
Smacchia.
4. Data Communications and Networking, by Behrouz A Forouzan.
5. Computer Networking: A Top-Down Approach, by James F. Kurose.
6. Operating System Concepts, by Abraham Silberschatz.
7. M. Armbrust, A. Fox, R. Griffith, A. D. Joseph, R. H. Katz, A. Konwinski, G. Lee, D. A.
Patterson, A. Rabkin, I. Stoica, and M. Zaharia, “Above the clouds: A berkeley view of cloud
computing,” University of California, Berkeley, Tech. Rep. USB-EECS-2009-28, Feb 2009.
8. “The apache cassandra project,” http://cassandra.apache.org/.
9. L. Lamport, “The part-time parliament,” ACM Transactions on Computer Systems, vol. 16,
pp. 133–169, 1998.
10. N. Bonvin, T. G. Papaioannou, and K. Aberer, “Cost-efficient and differentiated data
availability guarantees in data clouds,” in Proc. of the ICDE, Long Beach, CA, USA, 2010.
11. O. Regev and N. Nisan, “The popcorn market. online markets for computational resources,”
Decision Support Systems, vol. 28, no. 1-2, pp. 177 – 189, 2000.
12. A. Helsinger and T. Wright, “Cougaar: A robust configurable multi agent platform,” in Proc.
of the IEEE Aerospace Conference, 2005.
Sites Referred:

http://www.sourcefordgde.com
http://www.networkcomputing.com/
http://www.ieee.org
http://www.emule-project.net/

REFERENCES
[1] Scott Bourne, Claudia Szabo , “Transactional Behavior Verification in Business Process as a
Service Configuration” in 2017.
[2] ZHANG Yifei ,”Research on Online Payment Pattern and Security Strategy of E-commerce",
IEEE in 2010.
[3] Robert Woitsch, Knut Hinkelmann, Ana Maria Juan Ferrer, Joaquin IranzoYuste, “Business
Process as a Service (BPaaS): The BPaaS Design Environment” in 2015.
[4] Princewill, JacksonAkpojaro, “Analysis of Security Issues in Electronic Payment Systems”
International Journal of Computer Applications, in December 2014 .
[5] Chen Zhang, Shijie Jiang, Bin Huang ,”Strategies for The Security of Online Payments in E-
commerce” Proceedings of the 2012 2nd International Conference on Computer and Information
Application (ICCIA 2012) in 2012.
[6] Thomas Barton1, Christian Seel2 ,“Business Process as a Service – Status and Architecture” in
2016.
[7] Robert Woitsch, WilfridUtz,” Business Process as a Service Model Based Business and IT Cloud
Alignment as a Cloud Offering” in 2016
[8]RajuBarskar, AnjanaJayantDeen, JyotiBharati, GulfishanFirdose Ahmed,” The Algorithm Analysis of
E-Commerce Security Issues for Online Payment Transaction System in Banking Technology”
International Journal of Computer Science and Information Security (IJCSIS), April 2010.
[9] Souvik Roy1 and P. Venkateswaran2, “Online Payment System using Steganography and Visual
Cryptography “ IEEE Students’Conference on Electrical, Electronics and Computer Science Online
Payment in 2014.
[10] Kehe Wu Bo Hu, Xuxiang Zhou, SiyuanZheng, Fan Zhang, HongweiXie, “A New Technology
for Quick Online Payment Based on USBKEY” in 2015.
[11] LeiliNosrati Islamic Azad, Amir MassoudBidgoli ,”A review of Mobile Banking Security” IEEE
Canadian Conference on Electrical and Computer Engineering (CCECE) in 2016.
[12] Nour El Madhoun, FouadGuenane, Guy Pujolle, “An Online Security Protocol for NFC
Payment” in 2015.
[13] Cătălin LUPU, Vasile-Gheorghiţă GĂITAN , Valeriu LUPU,” Fingerprints used for security
enhancement of online banking authentication process” International Conference – 7th Edition
Electronics, Computers and Artificial Intelligence 25 June -27 June, 2015.
[14] Hankun', Li Yafang2, “A Comparative Study of China and US Users' Acceptance of Online
Payment” in 2016
[15] Lianru Liu , Meina Song, XiaoxiangLuo , HaopingBai , Shangbin Wang , Junde Song,”An
Implementation of the online-payment Platform based on SaaS” in 2015
[16] Eric Y. Chen, Shuo Chen, ShazQadeer, Rui Wang,” Securing Multiparty Online Services via
Certification of Symbolic Transactions ” IEEE Symposium on Security and Privacy in 2015
[17] Daud Khan, Praveen Varshney, Mohammed A Qadeer.” E-commerce: From Shopping Carts to
Credit Cards” in 2014
[18] Chenggang Zhen, Peng Cheng, “Analysis the Development and Security Policy of Third-Party
Online Payment Platform” in 2007.
[19] Z. ZarehHosseini , E. Barkhordari ,” Enhancement of security with the help of real time
authentication and one time password in e-commerce transactions” 5th Conference on Information and
Knowledge Technology in 2015.
[20] Mohammed Aamir Ali, BudiArief, Martin Emms and Aad van Moorsel, “Does the Online Card
Payment Landscape Unwittingly Facilitate Fraud?” Copublished by the IEEE Computer and Reliability
Societies, March/April 2017.
[21] Mayada Al-Tamimi and Ali Al-Haj, “Online Security Protocol for NFC Mobile Payment
Applications”, 8th International Conference on Information Technology in 2017.
[22] METI, “Survey on Blockchain Technologies and Related Services FY2015 Report,” Japan, Apr.
2016
[23] Zhou Junhua, and WU Qing, “Research on Online Transactions Payment,” J. Market Forum,
January 2006, pp179-183.
[24] I. Eyal, E. G. Sirer, Majority is not enough: Bitcoin mining is vulnerable, in International
Conference on Financial Cryptography and Data Security, Springer, 2014.
[25] N. T. Courtois, L. Bahack, On subversive miner strategies and block withholding attack in bitcoin
digital currency, arXiv preprint arXiv: 1402.1718.
[26] “A blockchain – new age business disruptor” – Deloitte whitepaper, 2017
[27] XiweiXu, Ingo Weber, Mark Staples, Liming Zhu, Jan Bosch , Len Bass , CesarePautasso , Paul
Rimba.” A Taxonomy of Blockchain-Based Systems for Architecture Design” in 2016
[28] T. D. Joseph Poon. The Bitcoin lightning network: Scalable off-chain instant payments. 2016.
[29] X. Xu, C. Pautasso, L. Zhu, V. Gramoli, A. Ponomarev, A. B. Tran, and S. Chen. The blockchain
as a software connector.In WICSA, 2016.
[30] Q.H. Shuai, Online Payment and Security: Peking University Press,Apr.2010,pp.237-264

You might also like