Sunteți pe pagina 1din 92

Chapter - 1

INTRODUCTION
Java is the new development language from Sun Microsystems that leads to write an application or an applet that can be executed on all platforms, it also enables the development more easier. Along with having the capability on multiple platforms, java applets can be executed through the use of web browsers. This enables java applets to be developed and used by the millions of people who were using orld ide eb.

Though sun Java is a powerful language it lac!s in the power concept of wi"ard. So this system is developed to reduce the burden of programmer by over coming the problem of wi"ard for data manipulation and data processing. Also Java Text pad acts as a good compilation and debugging tool for the Java programmers. The main objectivities of this system are given as follows #. $reate A T controls through Speech %. To provide an intelligent environment which contains a number of readymade tools to create applications with out writing the source code. &. 'sing the wi"ard and Text (ad for compilation and execution of the generated source code with out going to the )*S prompt. +. 'sing the wi"ard to generate screen design for any bac! end table. ,. To provide help about Java-s built in classes more interactively to the programmer. .. To design applet program using the wi"ard and standalone applications using the Java Text pad. /. To provide easier debugging environment. 0. To generate error free applications in a shorter period of time.

1.1 Problem Definition


This project is mainly concerned with automation of source code development for the Java applications. 1ow a days Java applet application are mostly used in the web pages. Java-s sun micro system does not provide any !ind of application developing environment to the user. So in order to create the applet application programmer explicitly writes code by using )*S editor or 1otepad. After that programmer go to the )*S prompt to execute these applications. A programmer has to spend their time for designing the application, writing the source code and debugging the source code. There is no way to create Java application in the short period of time. Java application i"ard provides an easiest way to create the applet application with in the shorter period of time. Also Java Text pad is used to write standalone applications and for debugging purpose. An Applet is designed through Speech 2ecognition and through )rag3 and3)rop process.

1.2 METHODS O PRO!"EM SO"#IN$


The following steps solves our basic problem of automation of the source code development #. $reating the A T components whenever the user is in need of it through speech recognition and drag3and3drop process. %. 4eep trac! of the change in their properties whenever the user modifies it. &. riting the components with their properties into the file name specified by the user. +. To create a data file which is used for the further updating the application.

Chapter % 2

COMP&N' PRO I"E


NE((&") TECHNO"O$IES *P+ "TD bridging future innovations.
Newwalk Technologies 51T6 is one of the South 7ndia-s leading 7T $ompany that envisioned and pioneered the adoption of the flexible global business practices that today enable companies to operate more efficiently and produce more value. e commenced operations in #888, when the 7T services industry didn-t exist as it does today. 1ow, with a presence in 7ndian Sub $ontinent, 9 a comprehensive range of services across diverse industries, we are one of the 7ndia:s leading 7nformation Technology companies. *ne of the best ;ortune companies is among our valued customers. e are part of South 7ndia-s growing conglomerates < 1ewwal! =roups 3 which, with its interests in ;inancial Services, Agricultural, >ngineering 9 Technology )evelopment, provides us with a grounded understanding of specific business challenges facing global companies. As industry leaders, we introduced offshore development, pioneered ?@3 Steps MultimediaA development and support framewor!s, ensuring compressed delivery timeframes. Today, our solutions provide strategic advantage to several most3admired organi"ations in the world. we have long3standing and vibrant partnerships with many companies across the globe.

2.1 Mi,,ion- #i,ion . #al/e,


hile our Mission articulates the reason for our existence, our vision reflects an aspiration to continually improve, to excel 9 be the best. *ur values characteri"e us as an organi"ation 9 guide our every action.

2.2 Mi,,ion
To help customers achieve their business objectives by providing innovative, 2esearch and development, 7T solutions and services. Ma!e it a joy for all customers to wor! with us.

2.0 #i,ion
&

To be among the 7ndian top #BB by %B#B.

2.1 #al/e,
7ntegrity and 7nnovation Ceading $hange >xcellence and Accuracy 2espect for 7ndividuals Cearning and sharing 2esearch

2.2 Re,ear3h an4 De5elopment


The phrase Re,ear3h an4 De5elopment 6R.D7 has a special commercial significance apart from its conventional coupling of scientific research and technological development. As this process is usually associated with innovation as well, 7n general, R.D activities are conducted by speciali"ed units or centers belonging to companies, universities and state agencies. 7n the context of commerce, D2esearch and )evelopmentD normally refers to future3oriented, longer3term activities in science or technology, using similar techniEues to scientific research without predetermined outcomes and with broad forecasts of commercial yield. Across the past generation, we 1ewwal! Technologies from a number of disciplines have conducted research on different areas of IEEE an4 &CM with the aim of contributing to the advancement of Technology. *ur mission is both to perform world3 class research, learning and to apply what we learn, in collaboration with education practitioners, business and government enterprises, and non3profit organi"ations, to the reform and improvement of instruction and learning in colleges, museums, universities and wor!places. This mission has guided 1ewwal! Technologies in its programs of research, its demonstration projects and its direct support of college improvement and reform. 2esearch is essential to tac!le the increasing challenge that meets out the growing needs on our society. So the government is committed to raising the level of research and development that ta!es place in the country. The research programs funded by the Ministry of >ducation ensure the policies and services provided by the 1ewwal!

technologies. And are based on the latest and most reliable evidence, and the needs of the Technology. *ur research and practical implementation efforts are dedicated to guaranteeing sustained improvement in achievement for all =raduate and (ostgraduate >ngineers. ith public and private financial support, 1ewwal! Technologies continues to study learning and teaching of Advanced Technologies and as well as the underpinnings and elements of effective learning environments. 1ewwal! Technologies now also plays a major role in educational reform and 'niversity restructuring through projects with a presence in a number of states and districts, in this region and around the country. 1ewwal! Technologies research portfolio includes large programs of extended duration as well as single3investigator projects that are generally of =reater scope and greater length. 2esearch activities are organi"ed within specific thematic categories of learning and teaching that organi"e the body of this report. O/r IEEE an4 &CM Re,ear3h &rea In3l/4e, Fiometrics 7nternet $omputing $lientHServer )evelopment Modeling 1etwor! Services (arallel processing and distributed system Artificial 7ntelligence ;u""y and expert System Speech and Audio >ngineering ireless and $ommunication Technologies (attern analysis and machine intelligence

G G G G G G G G G G

7mage (rocessing )ata Mining 7nteractive Multimedia Security and ;irewall Systems Iideo 9 Signal (rocessing 1eural 1etwor!s 7ntelligent Transportation 4nowledge And )ata >ngineering Iisuali"ation And $omputer =raphics Mobile $omputing

Chapter - 0

S'STEM &N&"'SIS
0.1 Intro4/3tion
The analysis of the role of a proposed system and the identification of the reEuirements that it should meet. 7t is the starting point for system design. The term is most commonly used in the context of commercial programming, where software developers are often classed as either systems analysts or programmers. The systems analysts are responsible for identifying reEuirements 5i.e. systems analysis6 and producing a design. The programmers are then responsible for implementing it J%.%K.

0.2 Definition
The study of an activity or procedure to determine the desired end and the most efficient method of obtaining this end J%.%K.

0.0 E8i,tin9 S:,tem


7n particularly Java code is written in notepad and executed in )*S prompt. Sun Micro Systems do not provide any environment for compiling and for execution. Cater on some tools has been developed but they do not provided any separate 7)> to create an Applet by using controls, but for doing so in present Java environment, one should write coding separately.

0.1 Pit-fall of E8i,tin9 S:,tem


a. Manual writing of $ode $ode is typed manually in any of the >ditors.

b. Manual written $ode $onsists of >rrors Typed code may consist of many >rrors which has to be identified and corrected manually. c. ;or >very A T $ontrols $ode has to be written ;or creation 9 generation of >vents of any of the A T controls code has to be written.

d. Single way for $reating A T $ontrols *nly through written code. e. (roperties can be set only thru $ode f. Multiple windows needed for Java >nvironment Separate indows for writing code, compilation and execution of program. g. $oding for )atabase connection. h. >rror contained code. i. aste of time j. Cong coding process

0.2 Propo,e4 S:,tem


a. $reation of Applet Application within Short period of time through Speech 2ecognition 9 through )rag3and3)rop process. b. Single indow for Java >nvironment. c. Automatic $ode =eneration. d. >rrorless $ode As it is automatically generated it is >rrorless. e. 7)> for creating A T $ontrols. f. Multiple ways for creating A T $ontrols. i. ii. )rag and )rop process for $ontrols. $reation of $ontrols thru Speech. indow for (roperty Setting.

g. Separate

h. (rovision of dialog boxes for opening, Saving of Java ;iles. i. Text pad for writing and editing Java file. j. Step3by3Step generation of i"ards for )atabase $onnection.

!. (rovision for designing 'ser 7nterface.

Chapter - 1

RE;UIREMENT &N&"'SIS
2eEuirement analysis involves obtaining a clear and thorough understanding of the product to be developed, with a view to removing all ambiguities and inconsistencies from the initial customer perception of the problem. 2eEuirement analysis enables the system engineer to specify software function and performance, indicate software-s interface with other system elements, and establish design constraints that the software must met J#.&K. 2eEuirement analysis allows the analyst to refine the software allocation and build models of the process, data and behavioral domains that will be treated by Software 2eEuirement analysis provides the Software engineer with a representation of information and function that can be translated to data, architectural, and procedural design J#.&K.

1.1 Soft<are Re=/irement Spe3ifi3ation


Analysis techniEues may lead to paper or computer based specification that contains graphical and natural language description of software reEuirement J%.%K. a. $reation of an Applet Application within Short period of time through Speech 2ecognition. b. Automatic generation of source code without error for the an Applet Application created thru Speech 2ecognition including event handling methods. c. System can accept Ioice 7nput regardless of slang d. A Text pad is to be provided for writing Java code with following facilities #. Ability to change font type, font style, font si"e.

%. Ability to save the written code in the form of Java file or Applet without specifying the extension. &. Ability to load a reEuired file. +. Ability to compile, can see error list and can be corrected. ,. Ability to execute the code and see results. .. Ability to write standalone applications. e. A Java Application following facilities #. Selection of controls through Menu options %. (ositioning of controls through drag and drop method. &. Selections of controls through drag and drop method. +. Setting up of properties for all controls through a separate (roperty indow. ,. Setting up of )atabase connection to all the controls placed in the wi"ard. .. =enerating of Source code in Text pad including >vent Landling methods for placed controls with out any error. /. (roviding an easiest way to create the applet application with in the shorter period of time. 0. Allowing the end user to design and use Java applets in his web page. f. This project can save a considerable amount of user-s time while writing the source code. g. The applications that are built using these projects are free from errors since the source code is to be generated automatically. h. All the processes related with the creation of a Java application can be done on a single indow. i. All other users to write and edit text documents can also use the Text pad. j. (roviding 7)> for creating A T $ontrols. !. Step3by3Step generation of i"ards for )atabase $onnection. l. (rovision to enhance the speech recognition to all facilities available in Java i"ard is to be provided for designing user interface with

1.2 ea,ibilit: St/4:


A feasibility study is a high3level capsule version of the entire System analysis and )esign (rocess. The study begins by classifying the problem definition. 8

;easibility is to determine if it-s worth doing. *nce an acceptance problem definition has been generated, the analyst develops a logical model of the system. A search for alternatives is analy"ed carefully J#.&K. There are + parts in feasibility study. #. >conomic ;easibility %. *perational ;easibility &. Technical ;easibility +. Fehavioral ;easibility

1.2.1 E3onomi3

ea,ibilit:

>conomic feasibility attempts to weigh the costs of developing and implementing a new system, against the benefits that would accrue from having the new system in place. This feasibility study gives the top management the economic justification for the new system. A simple economic analysis which gives the actual comparison of costs and benefits are much more meaningful in this case. 7n addition, this proves to be a useful point of reference to compare actual costs as the project progresses. There could be various types of intangible benefits on account of automation. These could include increased customer satisfaction, improvement in product Euality better decision ma!ing timeliness of information, expediting activities, improved accuracy of operations, better documentation and record !eeping, faster retrieval of information, better employee morale. The system developed and installed will be good benefit to the organi"ation. The system will be developed and operated in the existing hardware and software infrastructure. So there is no need of additional hardware and software for the system.

1.2.2 Operational ea,ibilit:


(roposed project is beneficial only if it can be turned into information systems that will meet the organi"ations operating reEuirements. Simply stated, this test of feasibility as!s if the system will wor! when it is developed and installed. Are there major barriers to 7mplementationM Lere are Euestions that will help test the operational feasibility of a projectN

#B

This system can be implemented in the organi"ation because there is adeEuate support from management and users. Feing developed in Java so that the necessary operations are carried out automatically. Ouestion that going to be as!ed are ill the system be used if it developed and implemented. 7f there was sufficient support for the project from the management and from the users. Lave the users been involved in planning and development of the (roject. ill the system produce poorer result in any respect or areaM This system can be implemented in the organi"ation because there is adeEuate support from management and users. Feing developed in Java so that the necessary operations are carried out automatically. This project is *perational ;easible. 7t can be used for developing stand lone programs. 7t can be used for developing a whole project of any !ind. $an be used by any !ind of users.

1.2.0 Te3hni3al ea,ibilit:


>valuating the technical feasibility is the tric!iest part of a feasibility study. This is because, .at this point in time, not too many detailed design of the system, ma!ing it difficult to access issues li!e performance, costs on 5on account of the !ind of technology to be deployed6 etc. A number of issues have to be considered while doing a technical analysis. Ouestion that going to be as!ed are )oes the necessary technology exist to do what is been suggested )oes the proposed eEuipment have the technical capacity for using the new systemM Are there technical guarantees of accuracy, reliability and data securityM The project is developed on (entium 7I with ,#% MF 2AM. The environment reEuired in the development of system is any windows platform. The observer pattern along with factory pattern will update the results eventually. The language used in

##

the development is JAIA #., which is technically strong 9 the project is technically feasible.

indows >nvironment and so

1.2.1 !eha5ioral ea,ibilit:


(eople are inherently resistant to change and computers have been !nown to facilitate changes. An estimate should be made of how strong a reaction the user staff is li!ely to have toward the development of a computeri"ed system. 7t is common !nowledge that computer installations have something to do with turnover, transfer, retaining and changes in employee job status. 7ntroduction of new candidate system reEuires special effort to educate, sell and train the staffs.This project do not reEuire that much of training to staff as it is very easy to understand and wor!.

1.0 S:,tem lo< Dia9ram

#%

The System ;low )iagram shows major subsystem and important lines of information, data and control flow.

#&

ave 7H(

$onvert into Streams (ass thru Speech >ngine Canguage Ierification 1C(H72

Speech to Text

=et Fest To!en

To!en Separation

JS=;

To!en Match Pes $ode =eneration

1o

S!ip for 1ext 7H(

i9/re 1.1 S:,tem lo< Dia9ram

1.0.1 Co4e $eneration


;low )iagram of Automatic code generation process.

#+

Start Selection of Appr. $ontrol

Pes

7f Futto n

1o

7mport (ac!ages $reate a $lass $reate a Futton

Selection of another control $ode

Set its properties

Add it to Action Cistener Add to $ontainer $reate Action (erformed56

$lose the $lass

i9/re 1.2 Co4e $eneration Pro3e,,

Chapter % 2

S'STEM DESI$N
#,

System )esign is an iterative process through which reEuirements are translated into a ?blueprintA for constructing the software. 7nitially, the blueprint depicts a holistic view of System J#.&K.

2.1 &r3hite3t/ral De,i9n


Architecture is the structure of program modules, the manner in which these modules interact, and the structure of data that are used by the components J#.&K.

2.1.1 Mo4/le Chart Main Screen


Start Java Application )eveloper

Java Application i"ard

Java Text (ad

>xit

i9/re 2.1 Main S3reen Mo4/le Chart

Java Application

i"ard

#.

Java Application i"ard

$reation of $ontrols through Speech

)rag 9 )rop of $ontrols

$reating )atabase $onnection

$ode =eneration Save as .java or .Applet

$ompile

2un 2un as .Java 2un as .Applet

Stop i9/re 2.2 >a5a &ppli3ation (i?ar4 Mo4/le Chart

>a5a Te8t Pa4

Java Text (ad Save as .java Type Java 2un as .Java $ompile 2un as .Applet or .Applet 2un Source $ode Stop

#/

i9/re 2.0 >a5a Te8tPa4 Mo4/le Chart

2.1.2 Mo4/le De,3ription


(roject mainly consists of two modulesQ a module is nothing but wor!spaces, which the Java programmers can use for developing their applications. These wor!spaces are, Java Application Java Text (ad. i"ard.

>a5a &ppli3ation (i?ar4


The Java wi"ard is mainly concerned with the speech recognition and automatic code generation. This wor!space saves as a wi"ard for the programmers, which generates the code for the user-s applications. The Java wi"ard development is divided in to following parts. Speech 2ecognition. i"ard Cayout. #0

Automatic $ode =eneration. )atabase i"ard 2un time environment

i. Speech Recognition 7n this part, the voice data from an user is captured by the 7FM voice engine .The captured data is converted into streams and to!eni"ed. The to!ens are validated using the grammar file which is defined using JS=;. The valid to!ens are verified whether they match with any element of the command set. 7f matched the corresponding A T component is created in ii. Wizard Layout The wi"ard layout is one of the important (arts, which contains a number of ='7 components and menus. This includes wor! sheets, font, color dialog and properties. Some of these components are Men/ 7t contains collection of choice to interact with the wi"ard. >ach menu item represents some thing that can be selected by the user. Toolbo8 Toolbox contains collection of tools such as buttons, text field, text area, radio buttons etc., each tool is identified by standard icon. 'ser can select the desired tool from this toolbox in order to create your application, nothing but )rag and )rop process. !/tton Te8t fiel4 The Futton allow user to clic! for performing a action. The text field is a single < line text3entry area, usually called an edit control. Text fields allow the user to enter string and to edit the text. "abel Te8t area "i,t The label is a string that can be displayed on the screen. 'sually this is used to name the objects. The text area is used to handle multiple lines of text. The list provides a compact multiple3choice scrolling selection lists. A list object can be constructed to show any number of choices in the visible window. S3roll bar Scroll bars used to select continuous value between a i"ard Cayout or! sheet.

#8

Specified minimum and maximum. Scroll bar may be oriented hori"ontally and vertically. Che3@ bo8 A chec! box is a control that is used to turn an option on or off. 7t consists of a small box that can either contain a chec! mar! or not. Ra4io !/tton 2adio button is a control that is used to turn an option on or off. 7t also consists of a small circle that can either . contain a dot mar! or not. ont Dialo9 7t supports all the Java fonts and we can assign the font to a desired ='7 component in the wor! sheet. Also different font styles are also applicable to these components. Color Dialo9 The Java color chooser class in the JSC allows you to select the needed color. Propertie, Fy using the property dialog we can change the values, width, height and other attributes of the component. Dialo9 !o8 7t displays simple dialog box for the user input. These can be used for the following purposes. $reating a new file. *pening a file. Save the file. Selecting the color and font.

iii. Automatic Code Generation Automatic code generation is the most important part of our project. henever a user designs their layout in wor!sheet that the source code is automatically generated in the test format by using the object output stream and file stream. After the external designing in wor!sheet the user can write a control to desired component by using the vector class in Java whenever the user double clic!s the component that time the vector is opened. So the user can write desired to desired position. The code generation part of the system generates three types of files with the same name they are with the extension .dat file, .java file 9 .applet file.

%B

The .dat file and the .java files produced for both the applet application and frame application, while the .applet file is created only for the applet application. The source code generated by the wi"ard can be directly opened from the wi"ard using the Java Text pad. iv. Database wizard )ata base wi"ard allows the user to process the database and create database applications such as the form and reports. v. Run Time nvironment The 2un Time >nvironment enables the application to be compiled for the byte code and to execute this byte code. 7n the run time environment the compilation is the process of generating the class files of the application. The java compiler does the compilation as follows, javac RfilenameS The file that is ta!en for the compilation must be a Java file and with the extension as .java, the output file produced is of the type .class which is called as the byte code. The java applications can be executed in two ways, when the application is a applet application the we use the applet viewer or any java compatible browsers for the execution. 7f the same application is a stand3alone application then we use the java interpreter to execute the application.

>a5a Te8t Pa4


The Java Text pad is the next part of our project, which is used for text editing and also debugging the java applications. The source code generated by the java wi"ard can be viewed by using the java text pad. This text pad can be used for, *pen an existing application. >dit a new application. )ebug a java application. $ompile a java application. >xecuted the compiled application. $omplete help about java classes.

%#

7n text pad some editing options li!e cut, copy, paste, find and replace are also provided. The foreground and bac!ground of the wor!space can also be changed.

2.1.0 Net<or@ &r3hite3t/re a. &r3hite3t/re for Te3hnolo9: U,e4

i9/re 2.1 O5er5ie< of Spee3h Re3o9nition 1. En9ine State,

1ew >ngine

Allocating 2esource

>ngine Allocated

)elocated >ngine )eallocator )elocating 2esource >ngine 2esumed (aused >ngine (aused i9/re 2.2 C:3le of En9ine State,

Allocate >ngine )eallocating resources 2esumed

%%

b. Spee3h Re3o9nition pro3e,, &r3hite3t/re

Java Framework

Code Generation JSGF Token Separation IBMJS IBMJS

I/P Speech

IBM Via Voice Speech Engine

i9/re 2.A &r3hite3t/re for Spee3h Re3o9intion S:nta8 for >S$ Br/le1C rule# open TopenU 33333333 33333333 33333333 D open EopenFG 2ule name To!en representing what can be spo!en 2ule 7dentifier to the application

2.1.1 Interfa3e De,i9n


1. Na5i9ation "i,t 1. 2. rom >a5a &ppli3ation (i?ar4 to >a5a Te8t pa4. ;or Iiewing of Source $ode. rom >a5a Te8t pa4 to >a5a &ppli3ation (i?ar4. ;or $reating A T $ontrols through Speech and )rag 9 )rop (rocess and to connect )ataFase. 2. Error Me,,a9e, #. %. &. hile compiling we have to select only .java file if not shows HPlea,e ,ele3t the file <ith .Ia5a e8ten,ionJ hile >xecution we have to select only .class file if not shows HPlea,e ,ele3t the file <ith .3la,, e8ten,ionJ hile >xecution of Applet we have to select only .javaH.html file if not shows HPlea,e ,ele3t the file <ith .Ia5a e8ten,ion H

%&

0.

Help Pro5i4e4 1. &bo/t (i?ar4 To !now how wor! with Java Application )eveloper. 2. &bo/t Compan: To !now about the $ompany )eveloped. 0. >a5a Help To !now about the constructors and methods defined in the selected Applet classes. 1. >a5a8 Help To !now about the constructors and methods defined in the selected Swing classes.

%+

Chapter % A

PSEUDO CODE
A.1 Spee3h Re3o9nition Co4e
Des!ain."ava class SpeechToText extends 2esultAdapter T static 2ecogni"er recQ static String spQ public void Fegin5String gramfile6 T try T recV$entral.create2ecogni"er5new >ngineMode)esc5Cocale.>1=C7SL66Q rec.allocate56Q ;ile2eader reader V new ;ile2eader5gramfile6Q 2ule=rammar gram V rec.loadJS=;5reader6Q gram.set>nabled5true6Q U catch 5>xception e6 T e.printStac!Trace56Q U U public void resultAccepted52esult>vent e6 T spVDDQ 2esult r V 52esult65e.getSource566Q 2esultTo!en to!ensJK V r.getFestTo!ens56Q for 5int i V BQ i R to!ens.lengthQ iWW6 spVspWto!ensJiK.getSpo!enText56WD DQ U public void 4ill56 T System.exit5B6Q U public String MainMethod56 T try T spVDDQ rec.add2esultCistener5new SpeechToText566Q rec.commit$hanges56Q rec.reEuest;ocus56Q rec.resume56Q

%,

System.out.println5D2eady go...D6Q while5sp.eEuals5DD66Q return spQ U catch 5>xception e6 T e.printStac!Trace56Q U return spQ U class Java)es extends ;rame implements ActionCistener, MouseMotionCistener ,7temCistener,2unnable T String ;ile1ame,$lass1ameQ FuttonJ K b V new FuttonJ#BBKQ Text;ieldJ K t V new Text;ieldJ#BBKQ CabelJ K l V new CabelJ#BBKQ $hec!boxJ K c V new $hec!boxJ#BBKQ CistJ K ltV new CistJ#BBKQ $hoiceJ K chV new $hoiceJ#BBKQ ScrollbarJ K hsV new ScrollbarJ#BBKQ ScrollbarJ K vsV new ScrollbarJ#BBKQ $hec!box=roupJ K cbg V new $hec!box=roupJ#BBKQ $hec!boxJ K rb V new $hec!boxJ#BBKQ String strQ (anel p# V new (anel56Q int bi,ti,li,ci,lii,chi,hsi,vsi,cbgi,riQ int scrollXflagVBQ (oint pQ 2ectangle rQ $ompX)etJ K $) V new $ompX)etJ,BKQ *bject*utputStream *utQ *bject7nputStream 7nQ int $onnectX;lagVBQ private Thread t#VnullQ public void start56 T if5t#VVnull6 T stVnew SpeechToText56Q st.Fegin5D)emo.gramD6Q setTitle5DSpeech >ngine StartedD6Q t#Vnew Thread5this6Q

%.

t#.start56Q U U public void stop56 T if5t#YVnull6 T t#.stop56Q t#VnullQ U U public void run56 T while5true6 T strVst.MainMethod56Q if 5str.eEuals5Dradio D6 ZZ str.eEuals5Dchec! box group D6 ZZ str.eEuals5DI scroll D6 ZZ str.eEuals5DL scroll D6 ZZ str.eEuals5Dchoice D6 ZZ str.eEuals5Dlist D6 ZZ str.eEuals5Dchec! box D6 ZZ str.eEuals5Dlabel D6 ZZ str.eEuals5Dbutton D6ZZ str.eEuals5Dtext box D6 ZZ str.eEuals5Dstop D66 T if5str.eEuals5Dbutton D66 T $reateXTool5#6Q U if5str.eEuals5Dtext box D66 T $reateXTool5%6Q U if5str.eEuals5Dlabel D66 T $reateXTool5&6Q U if5str.eEuals5Dchec! box D66 T $reateXTool5+6Q U if5str.eEuals5Dlist D66 T $reateXTool5,6Q U if5str.eEuals5Dchoice D66 T $reateXTool5.6Q U if5str.eEuals5DL scroll D66 T $reateXTool5/6Q U if5str.eEuals5DI scroll D66 T $reateXTool506Q U if5str.eEuals5Dchec! box group D66 T $reateXTool586Q U if5str.eEuals5Dradio D66 T $reateXTool5#B6Q U if5str.eEuals5Dstop D66 T st.4ill56Q hide56Q U U try T Thread.sleep5#6Q Ucatch57nterrupted>xception ie6TU U U

%/

public void 7nitX7ndex56 T mh V new MouseLandler56Q biVBQ tiVBQ liVBQ ciVBQ liiVBQ chiVBQ hsiVBQ vsiVBQ cbgiVBQ riVBQ U public void AddX;ontCist56 T fc V new $hoice56Q fc.add7temCistener5this6Q StringJK flQ U U

A.2 Creatin9 of Control on (i?ar4


Des!ain."ava public void $reateXTool5int *pt6 T System.out.println5*pt6Q switch 5*pt6 T case #N bJbiK V new Futton5DFuttonD W String.value*f5bi66Q bJbiK.setSi"e5,B,%B6Q bJbiK.setCocation5#BB,#BB6Q mh.addMouseLandler55$omponent6bJbiK6Q pa.add5bJbiK6Q mh.c V 5$omponent6bJbiKQ biWWQ brea!Q case %N tJtiK V new Text;ield5DText;ieldD W String.value*f5ti66Q tJtiK.setSi"e5,B,%B6Q tJtiK.setCocation5#BB,#BB6Q mh.addMouseLandler55$omponent6tJtiK6Q pa.add5tJtiK6Q mh.c V 5$omponent6tJtiKQ tiWWQ brea!Q case &N lJliK V new Cabel5DCabelD W String.value*f5li66Q lJliK.setSi"e5,B,%B6Q lJliK.setCocation5#BB,#BB6Q mh.addMouseLandler55$omponent6lJliK6Q pa.add5lJliK6Q mh.c V 5$omponent6lJliKQ liWWQ brea!Q %0

case +N cJciK V new $hec!box5D$hec!boxD W String.value*f5ci66Q cJciK.setSi"e50B,%B6Q cJciK.setCocation5#BB,#BB6Q mh.addMouseLandler55$omponent6cJciK6Q pa.add5cJciK6Q mh.c V 5$omponent6cJciKQ ciWWQ brea!Q case ,N ltJliiK V new Cist5+6Q ltJliiK.setSi"e5,B,%B6Q ltJliiK.setCocation5#BB,#BB6Q mh.addMouseLandler55$omponent6ltJliiK6Q pa.add5ltJliiK6Q mh.c V 5$omponent6ltJliiKQ liiWWQ brea!Q case .N chJchiK V new $hoice56Q chJchiK.setSi"e5,B,%B6Q chJchiK.setCocation5#BB,#BB6Q mh.addMouseLandler55$omponent6chJchiK6Q mh.c V 5$omponent6chJchiKQ pa.add5chJchiK6Q chiWWQ brea!Q case /N hsJhsiK V new Scrollbar5B,#,#,#,##6Q hsJhsiK.setSi"e5,B,%B6Q hsJhsiK.setCocation5#BB,#BB6Q mh.addMouseLandler55$omponent6hsJhsiK6Q pa.add5hsJhsiK6Q mh.c V 5$omponent6hsJhsiKQ hsiWWQ brea!Q case 0N vsJvsiK V new Scrollbar5#,#,#,#,##6Q vsJvsiK.setSi"e5%B,,B6Q vsJvsiK.setCocation5#BB,#BB6Q mh.addMouseLandler55$omponent6vsJvsiK6Q pa.add5vsJvsiK6Q mh.c V 5$omponent6vsJvsiKQ vsiWWQ brea!Q case 8N cbgJcbgiK V new $hec!box=roup56Q cbgiWWQ brea!Q

%8

case #BN if 5cbgi YV B6 T rd V new 2adioX)ialog5this,cbgi6Q System.out.println5Dind V D W rd.ind6Q if 5rd.ind YV 3#6 T rbJriK V new $hec!box5D$F=D W String.value*f5rd.ind6 W D2adioD W String.value*f5ri6,false,cbgJrd.indK6Q rbJriK.setSi"e50B,%B6Q rbJriK.setCocation5#BB,#BB6Q mh.addMouseLandler55$omponent6rbJriK6Q pa.add5rbJriK6Q mh.c V 5$omponent6rbJriKQ riWWQ U U else System.out.println5D(lease Select $hec!box=roup in Tools menu ...D6Q brea!Q U U

A.0 &/tomati3 Co4e $eneration


Des!ain."ava public void Save;ile5int S*pt6 T try T =et;ile1ame5#6Q if 5Y5;ile1ame.eEuals5DD666 T *ut V new *bject*utputStream5new ;ile*utputStream 5;ile1ame W D.datD66Q rite wf V new rite5;ile1ameWD.javaD6Q 2ectangle rQ String $ap,;1Q int ;F,;7,;AQ int rc,gc,bcQ $olor F$ol,;$olQ wf.Append5Dimport java.awt.[Q\nD6Q wf.Append5Dimport java.awt.event.[Q\nD6Q if 5S*pt VV %6 &B

wf.Append5Dimport java.applet.[Q\nD6Q String CistStrVDD,$ommaVDDQ int contVBQ if 5bi YV B6 T CistStr V D ActionCistenerDQ $ommaVD,DQ U if 5ti YV B6 T CistStr V CistStr W $omma W D TextCistenerDQ $ommaVD,DQ U if 55ci YV B6 ZZ 5lii YV B6 ZZ 5chi YV B6 ZZ 5ri YV B66 T CistStr V CistStr W $omma W D 7temCistenerDQ $ommaVD,DQ U if 55hsi YV B6 ZZ 5vsi YV B66 T CistStr V CistStr W $omma W D AdjustmentCistenerDQ $ommaVD,DQ U if 5S*pt VV %6 wf.Append5Dpublic class D W $lass1ame W D extends Applet implements D W CistStr W D\nT\n\tD6Q else wf.Append5Dpublic class D W $lass1ame W D extends ;rame implements D W CistStr W D\nT\n\tD6Q if 5bi YV B6 wf.Append5DFutton FutJK V new FuttonJD W bi W DKQ\n\tD6Q if 5ti YV B6 wf.Append5DText;ield TexJK V new Text;ieldJD W ti W DKQ\n\tD6Q if 5li YV B6 wf.Append5DCabel CabJK V new CabelJD W li W DKQ\n\tD6Q if 5ci YV B6 wf.Append5D$hec!box $FJK V new $hec!boxJD W ci W DKQ\n\tD6Q if 5lii YV B6 wf.Append5DCist CisJK V new CistJD W lii W DKQ\n\tD6Q if 5chi YV B6 wf.Append5D$hoice $hoJK V new $hoiceJD W chi W DKQ\n\tD6Q if 5hsi YV B6 wf.Append5DScrollbar hsJK V new ScrollbarJD W hsi W DKQ\n\tD6Q if 5vsi YV B6 wf.Append5DScrollbar vsJK V new ScrollbarJD W vsi W DKQ\n\tD6Q

&#

if 5cbgi YV B6 wf.Append5D$hec!box=roup $F=JK V new $hec!box=roupJD W cbgi W DKQ\n\tD6Q if 5ri YV B6 wf.Append5D$hec!box 2FJK V new $hec!boxJD W ri W DKQ\n\tD6Q wf.Append5Dint iQ\nD6Q if 5S*pt VV %6 wf.Append5D\tpublic void init56 \nD6Q else wf.Append5D\tD W $lass1ame W D56 \nD6Q wf.Append5D\tT \nD6Q )imension diQ lab V getTitle56Q di V getSi"e56Q widVString.value*f5di.width6Q heiVString.value*f5di.height6Q if 5S*pt VV #6 T wf.Append5D\t\tsuper5\DD W $lass1ame W D ;rame\D6Q\nD6Q wf.Append5D\t\tsetSi"e5D W String.value*f5wid6 W D,D W String.value*f5hei6 W D6Q\nD6Q wf.Append5D\t\tsetCocation5#,#6Q\nD6Q U rc V 5getFac!ground566.get2ed56Q gc V 5getFac!ground566.get=reen56Q bc V 5getFac!ground566.getFlue56Q wf.Append5D\t\tsetFac!ground5new $olor5D WrcWD,DWgcWD,DWbcW D66Q\nD6Q wf.Append5D\t\tsetCayout5null6Q\nD6Q int coiVBQ $olor F$Q StringJK items V nullQ for 5int iVBQiRbiQiWW6 T $ap V bJiK.getCabel56Q wf.Append5D\t\tFutJD W i W DK V new Futton5\DD W $ap WD\D6Q\nD6Q r V bJiK.getFounds56Q wf.Append5D\t\tFutJD W i W DK.setFounds5D W r.x W D,D W r.y W D,D W r.width W D,D W r.height W D6Q\nD6Q wf.Append5D\t\tFutJD W i W DK.addActionCistener5this6Q\nD6Q wf.Append5D\t\tFutJD W i W DK.set;ont5new ;ont5\DD W 5bJiK.get;ont566.get1ame56 W D\D,D W 5bJiK.get;ont566.getStyle56 W D,D W 5bJiK.get;ont566.getSi"e56 W D66Q\nD6Q rc V 5bJiK.getFac!ground566.get2ed56Q gc V 5bJiK.getFac!ground566.get=reen56Q

&%

bc V 5bJiK.getFac!ground566.getFlue56Q wf.Append5D\t\tFutJD W i W DK.setFac!ground5new $olor5D WrcWD,DWgcWD,DWbcW D66Q\nD6Q rc V 5bJiK.get;oreground566.get2ed56Q gc V 5bJiK.get;oreground566.get=reen56Q bc V 5bJiK.get;oreground566.getFlue56Q wf.Append5D\t\tFutJD W i W DK.set;oreground5new $olor5D WrcWD,DWgcWD,DWbcW D66Q\nD6Q wf.Append5D\t\tadd5FutJD W i W DK6Q\nD6Q F$ol V bJiK.getFac!ground56Q ;$ol V bJiK.get;oreground56Q $)JcoiK V new $ompX)et5DFuttonD,$ap,r.x,r.y,r.width, r.height, 5bJiK.get;ont566.get1ame56,5bJiK.get;ont566.getStyle56, F$ol, ;$ol,B,items,B,B,B,B,B,B,B,B6Q coiWWQ U for 5int iVBQiRtiQiWW6 T $ap V tJiK.getText56Q wf.Append5D\t\tTexJD W i W DK V new Text;ield5\DD W $ap W \D6Q\nD6Q r V tJiK.getFounds56Q wf.Append5D\t\tTexJD W i W DK.setFounds5D W r.x W D,D W r.y W D,D W r.width W D,D W r.height W D6Q\nD6Q wf.Append5D\t\tTexJD W i W DK.addTextCistener5this6Q\nD6Q wf.Append5D\t\tTexJD W i W DK.set;ont5new ;ont5\DD W 5tJiK.get;ont566.get1ame56W D\D,D W 5tJiK.get;ont566.getStyle56 W D,D W 5tJiK.get;ont566.getSi"e56 W D66Q\nD6Q rc V 5tJiK.getFac!ground566.get2ed56Q gc V 5tJiK.getFac!ground566.get=reen56Q bc V 5tJiK.getFac!ground566.getFlue56Q wf.Append5D\t\tTexJD W i W DK.setFac!ground5new $olor5D WrcWD,DWgcWD,DWbcW D66Q\nD6Q rc V 5tJiK.get;oreground566.get2ed56Q gc V 5tJiK.get;oreground566.get=reen56Q bc V 5tJiK.get;oreground566.getFlue56Q wf.Append5D\t\tTexJD W i W DK.set;oreground5new $olor5D WrcWD,DWgcWD,DWbcWD66Q\nD6Q wf.Append5D\t\tadd5TexJD W i W DK6Q\nD6Q F$ol V tJiK.getFac!ground56Q ;$ol V tJiK.get;oreground56Q $)JcoiK V new $ompX)et5DText;ieldD,$ap,r.x,r.y,r.width,r.height,5tJiK.get;ont566. get1ame56,5tJiK.get;ont566.getStyle56,F$ol,;$ol,B,items,B,B,B,B,B,B,B,B6Q coiWWQ U for 5int iVBQiRliQiWW6 T $ap V lJiK.getText56Q wf.Append5D\t\tCabJD W i W DK V new Cabel5\DD W $ap W D\D6Q\nD6Q

&&

r V lJiK.getFounds56Q wf.Append5D\t\tCabJD W i W DK.setFounds5D W r.x W D,D W r.y W D,D W r.width W D,D W r.height W D6Q\nD6Q wf.Append5D\t\tCabJD W i W DK.set;ont5new ;ont5\DD W 5lJiK.get;ont566.get1ame56 W D\D,D W 5lJiK.get;ont566.getStyle56 W D,D W 5lJiK.get;ont566.getSi"e56 W D66Q\nD6Q rc V 5lJiK.getFac!ground566.get2ed56Q gc V 5lJiK.getFac!ground566.get=reen56Q bc V 5lJiK.getFac!ground566.getFlue56Q wf.Append5D\t\tCabJD W i W DK.setFac!ground5new $olor5D WrcWD,DWgcWD,DWbcW D66Q\nD6Q rc V 5lJiK.get;oreground566.get2ed56Q gc V 5lJiK.get;oreground566.get=reen56Q bc V 5lJiK.get;oreground566.getFlue56Q wf.Append5D\t\tCabJD W i W DK.set;oreground5new $olor5D WrcWD,DWgcWD,DWbcWD66Q\nD6Q wf.Append5D\t\tCabJD W i W DK.setAlignment5D W lJiK.getAlignment56 W D6Q\nD6Q wf.Append5D\t\tadd5CabJD W i W DK6Q\nD6Q F$ol V lJiK.getFac!ground56Q ;$ol V lJiK.get;oreground56Q $)JcoiK V new $ompX)et5DCabelD,$ap,r.x,r.y,r.width,r.height,5lJiK.get;ont566.get1ame56, lJiK.get;ont566.getStyle56,F$ol,;$ol,lJiK.getAlignment56,items,B,B,B,B,B,B,B6Q coiWWQ U for 5int iVBQiRciQiWW6 T $ap V cJiK.getCabel56Q wf.Append5D\t\t$FJD W i W DK V new $hec!box5\DD W $ap W D\D6Q\nD6Q r V cJiK.getFounds56Q wf.Append5D\t\t$FJD W i W DK.setFounds5D W r.x W D,D W r.y W D,D W r.width W D,DW r.height W D6Q\nD6Q wf.Append5D\t\t$FJD W i W DK.set;ont5new ;ont5\DD W 5cJiK.get;ont566.get1ame56 W D\D,D W 5cJiK.get;ont566.getStyle56 W D,D W 5cJiK.get;ont566.getSi"e56 W D66Q\nD6Q rc V 5cJiK.getFac!ground566.get2ed56Q gc V 5cJiK.getFac!ground566.get=reen56Q bc V 5cJiK.getFac!ground566.getFlue56Q wf.Append5D\t\t$FJD W i W DK.setFac!ground5new $olor5D WrcWD,DWgcWD,DWbcWA66Q\nD6Q rc V 5cJiK.get;oreground566.get2ed56Q gc V 5cJiK.get;oreground566.get=reen56Q bc V 5cJiK.get;oreground566.getFlue56Q wf.Append5D\t\t$FJD W i W DK.set;oreground5new $olor5D WrcWD,DWgcWD,DWbcWD66Q\nD6Q wf.Append5D\t\tadd5$FJD W i W DK6Q\nD6Q F$ol V cJiK.getFac!ground56Q

&+

;$ol V cJiK.get;oreground56Q $)JcoiK V new $ompX)et5D$hec!boxD,$ap,r.x,r.y,r.width,r.height,5cJiK.get;ont566 .get1ame56,5cJiK.get;ont566.getStyle56,F$ol,;$ol,B,items,B,B,B,B,B,B,B6Q coiWWQ U for 5int iVBQiRliiQiWW6 T $ap V DDQ r V ltJiK.getFounds56Q wf.Append5D\t\tCisJD W i W DK.setFounds5D W r.x W D,D W r.y W D,D W r.width W D,DW r.height W D6Q\nD6Q wf.Append5D\t\tCisJD W i W DK.set;ont5new ;ont5\DD W 5ltJiK.get;ont566.get1ame56 W D\D,D W 5ltJiK.get;ont566.getStyle56 W D,D W 5ltJiK.get;ont566.getSi"e56 W D66Q\nD6Q rc V 5ltJiK.getFac!ground566.get2ed56Q gc V 5ltJiK.getFac!ground566.get=reen56Q bc V 5ltJiK.getFac!ground566.getFlue56Q wf.Append5D\t\tCisJD W i W DK.setFac!ground5new $olor5D WrcWD,DWgcWD,DWbcWD66Q\nD6Q rc V 5ltJiK.get;oreground566.get2ed56Q gc V 5ltJiK.get;oreground566.get=reen56Q bc V 5ltJiK.get;oreground566.getFlue56Q wf.Append5D\t\tCisJD W i W DK.set;oreground5new $olor5D WrcWD,DWgcWD,DWbcWD66Q\nD6Q wf.Append5D\t\tadd5CisJD W i W DK6Q\nD6Q F$ol V ltJiK.getFac!ground56Q ;$ol V ltJiK.get;oreground56Q HH Cist Add Lere items V new StringJltJiK.get7tem$ount56KQ for 5int jVBQjRltJiK.get7tem$ount56QjWW6 T itemsJjKVltJiK.get7tem5j6Q wf.Append5D\t\tCisJD W i W DK.add5\DD W ltJiK.get7tem5j6 W D\D6Q\nD6Q U $)JcoiK V new $ompX)et5DCistD,$ap,r.x,r.y,r.width,r.height, 5ltJiK.get;ont566 .get1ame56,5ltJiK.get;ont566.getStyle56,F$ol,;$ol,B,items,B,B,B,B,B,B,B,B6Q coiWWQ U for 5int iVBQiRchiQiWW6 T $ap V DDQ r V chJiK.getFounds56Q wf.Append5D\t\t$hoJD W i W DK.setFounds5D W r.x W D,D W r.y W D,D W r.width W D,D W r.height W D6Q\nD6Q wf.Append5D\t\t$hoJD W i W DK.set;ont5new ;ont5\DD W 5chJiK.get;ont566.get1ame56 W D\D,D W 5chJiK.get;ont566.getStyle56 W D,D W

&,

5chJiK.get;ont566.getSi"e56 W D66Q\nD6Q rc V 5chJiK.getFac!ground566.get2ed56Q gc V 5chJiK.getFac!ground566.get=reen56Q bc V 5chJiK.getFac!ground566.getFlue56Q wf.Append5D\t\t$hoJD W i W DK.setFac!ground5new $olor5D WrcWD,DWgcWD,DWbcW D66Q\nD6Q rc V 5chJiK.get;oreground566.get2ed56Q gc V 5chJiK.get;oreground566.get=reen56Q bc V 5chJiK.get;oreground566.getFlue56Q wf.Append5D\t\t$hoJD W i W DK.set;oreground5new $olor5D WrcWD,DWgcWD,DWbcWA66Q\nD6Q wf.Append5D\t\tadd5$hoJD W i W DK6Q\nD6Q F$ol V chJiK.getFac!ground56Q ;$ol V chJiK.get;oreground56Q HH Add Lere items V new StringJchJiK.get7tem$ount56KQ for 5int jVBQjRchJiK.get7tem$ount56QjWW6 T itemsJjKVchJiK.get7tem5j6Q wf.Append5D\t\t$hoJD W i W DK.add5\DD W chJiK.get7tem5j6 W D\D6Q\nD6Q U $)JcoiK V new $ompX)et5D$hoiceD,$ap,r.x,r.y,r.width,r.height,5chJiK. get;ont566.get1ame56, 5chJiK.get;ont566.getStyle56,F$ol,;$ol,B,items, ,B,B,B,B,B,B,B, B6Q coiWWQ U for 5int iVBQiRcbgiQiWW6 T wf.Append5D\t\t$F=JD W i W DK V new $hec!box=roup56Q\nD6Q F$ol V $olor.grayQ ;$ol V $olor.grayQ $)JcoiK V new $ompX)et5D$hec!box=roupD,DD,B,B,B,B,DD,B,F$ol,;$ol,B,items, B,B,B,B,B,B,B,B6Q coiWWQ U for 5int iVBQiRriQiWW6 T int cbgindVBQ for 5int jVBQjRcbgiQjWW6 if 5rbJiK.get$hec!box=roup56 VV cbgJjK6 cbgind V jQ $ap V rbJiK.getCabel56Q wf.Append5D\t\t2FJD W i W DK V new $hec!box5\DD W $ap W D\D,$F=JD W cbgind W DK,false6Q\nD6Q r V rbJiK.getFounds56Q wf.Append5D\t\t2FJD W i W DK.setFounds5D W r.x W D,D W r.y W D,D W r.width W

&.

D,D W r.height W D6Q\nD6Q wf.Append5D\t\t2FJD W i W DK.set;ont5new ;ont5\DD W 5rbJiK.get;ont566.get1ame56 W D\D,D W 5rbJiK.get;ont566.getStyle56 W D,D W 5rbJiK.get;ont566.getSi"e56 W D66Q\nD6Q rc V 5rbJiK.getFac!ground566.get2ed56Q gc V 5rbJiK.getFac!ground566.get=reen56Q bc V 5rbJiK.getFac!ground566.getFlue56Q wf.Append5D\t\t2FJD W i W DK.setFac!ground5new $olor5D WrcWD,DWgcWD,DWbcWD66Q\nD6Q rc V 5rbJiK.get;oreground566.get2ed56Q gc V 5rbJiK.get;oreground566.get=reen56Q bc V 5rbJiK.get;oreground566.getFlue56Q wf.Append5D\t\t2FJD W i W DK.set;oreground5new $olor5D WrcWD,DWgcWD,DWbcWD66Q\nD6Q wf.Append5D\t\tadd52FJD W i W DK6Q\nD6Q F$ol V rbJiK.getFac!ground56Q ;$ol V rbJiK.get;oreground56Q $)JcoiK V new $ompX)et5D2adioD,$ap,r.x,r.y,r.width,r.height,5rbJiK.get;ont566. get1ame56,5rbJiK.get;ont566.getStyle56,F$ol,;$ol,B,items,B,B,B,B,B,B,B, cbgind6Q coiWWQ U for 5int iVBQiRvsiQiWW6 T int ori,iv,va,min,max,uni,bliQ $apVDDQ ori V vsJiK.get*rientation56Q iv V vsJiK.getIalue56Q va V vsJiK.getIisibleAmount56Q min V vsJiK.getMinimum56Q max V vsJiK.getMaximum56Q uni V vsJiK.get'nit7ncrement56Q bli V vsJiK.getFloc!7ncrement56Q wf.Append5D\t\tvsJD W i W DK V new Scrollbar5D W ori W D,D W iv WD,D W va W D,D Wmin W D,D W max W D6Q\nD6Q r V vsJiK.getFounds56Q wf.Append5D\t\tvsJD W i W DK.setFounds5D W r.x W D,D W r.y W D,D W r.width W D,DW r.height W D6Q\nD6Q rc V 5vsJiK.getFac!ground566.get2ed56Q gc V 5vsJiK.getFac!ground566.get=reen56Q bc V 5vsJiK.getFac!ground566.getFlue56Q wf.Append5D\t\tvsJD W i W DK.setFac!ground5new $olor5D WrcWD,DWgcWD,DWbcWD66Q\nD6Q rc V 5vsJiK.get;oreground566.get2ed56Q gc V 5vsJiK.get;oreground566.get=reen56Q bc V 5vsJiK.get;oreground566.getFlue56Q wf.Append5D\t\tvsJD W i W DK.set;oreground5new $olor5D

&/

WrcWD,DWgcWD,DWbcWD66Q\nD6Q wf.Append5D\t\tadd5vsJD W i W DK6Q\nD6Q F$ol V vsJiK.getFac!ground56Q ;$ol V vsJiK.get;oreground56Q $)JcoiK V new $ompX)et5DIScrollbarD,$ap,r.x,r.y,r.width,r.height,5lJiK.get;ont566. get1ame56,5lJiK.get;ont566.getStyle56,F$ol,;$ol,B,items,ori,iv,va,min, max,uni,bli,B6Q coiWWQ U for 5int iVBQiRhsiQiWW6 T int ori,iv,va,min,max,uni,bliQ $apVDDQ ori V hsJiK.get*rientation56Q iv V hsJiK.getIalue56Q va V hsJiK.getIisibleAmount56Q min V hsJiK.getMinimum56Q max V hsJiK.getMaximum56Q uni V hsJiK.get'nit7ncrement56Q bli V hsJiK.getFloc!7ncrement56Q wf.Append5D\t\thsJD W i W DK V new Scrollbar5D W ori W D,D W iv WD,D W va W D,D Wmin W D,D W max W D6Q\nD6Q r V hsJiK.getFounds56Q wf.Append5D\t\thsJD W i W DK.setFounds5D W r.x W D,D W r.y W D,D W r.width W D,DW r.height W D6Q\nD6Q rc V 5hsJiK.getFac!ground566.get2ed56Q gc V 5hsJiK.getFac!ground566.get=reen56Q bc V 5hsJiK.getFac!ground566.getFlue56Q wf.Append5D\t\thsJD W i W DK.setFac!ground5new $olor5D WrcWD,DWgcWD,DWbcWD66Q\nD6Q rc V 5hsJiK.get;oreground566.get2ed56Q gc V 5hsJiK.get;oreground566.get=reen56Q bc V 5hsJiK.get;oreground566.getFlue56Q wf.Append5D\t\thsJD W i W DK.set;oreground5new $olor5D WrcWD,DWgcWD,DWbcWD66Q\nD6Q wf.Append5D\t\tadd5hsJD W i W DK6Q\nD6Q F$ol V hsJiK.getFac!ground56Q ;$ol V hsJiK.get;oreground56Q $)JcoiK V new $ompX)et5DLScrollbarD,$ap,r.x,r.y,r.width,r.height, 5lJiK.get;ont566.get1ame56,5lJiK.get;ont566.getStyle56,F$ol,;$ol,B,items, ori,iv,va,min,max,uni,bli,B6Q coiWWQ U *ut.write*bject5$)6Q *ut.close56Q if 5S*pt VV #6 T wf.Append5Dadd indowCistener5new indowAdapter56\nD6Q

&0

wf.Append5DT\nD6Q wf.Append5D\tpublic void window$losing5 indow>vent e6\nD6Q wf.Append5D\tT\nD6Q wf.Append5D\t\tSystem.exit5B6Q\nD6Q wf.Append5D\tU\nD6Q wf.Append5DU6Q\nD6Q wf.Append5D\tshow56Q\nD6Q U wf.Append5D\tU\nD6Q if 5S*pt VV #6 T wf.Append5D\tpublic static void main5String argvJK6\nD6Q wf.Append5D\tT\nD6Q wf.Append5D\t\tD W $lass1ame W D *bj V new D W $lass1ame W D56Q\nD6Q wf.Append5D\t\tU\nD6Q U if 5bi YV B6 T wf.Append5D\tpublic void action(erformed5Action>vent e6\nD6Q wf.Append5D\tT\nD6Q wf.Append5D\t\tU\nD6Q U if 5ti YV B6 T wf.Append5D\tpublic void textIalue$hanged5Text>vent e6\nD6Q wf.Append5D\tT\nD6Q wf.Append5D\t\tU\nD6Q U if 55ci YV B6 ZZ 5lii YV B6 ZZ 5chi YV B6 ZZ 5ri YV B66 T wf.Append5D\tpublic void itemState$hanged57tem>vent e6\nD6Q wf.Append5D\tT\nD6Q wf.Append5D\t\tU\nD6Q U if 55hsi YV B6 ZZ 5vsi YV B66 T wf.Append5D\tpublic void adjustmentIalue$hanged5Adjustment>vent e6\nD6Q wf.Append5D\tT\nD6Q wf.Append5D\t\tU\nD6Q U wf.Append5D\tU\nD6Q if 5S*pt VV %6 T Lwrite hf V new Lwrite5;ile1ameWD.htmlD6Q hf.Append#5DRhtmlS\nD6Q hf.Append#5DRheadS\nD6Q hf.Append#5DRtitleS D W lab W D Applet \nD6Q hf.Append#5DRHtitleS\nD6Q hf.Append#5DRHheadS\nD6Q hf.Append#5DRbodyS\nD6Q

&8

hf.Append#5DRpS D W $lass1ame W D Says N\nD6Q hf.Append#5DRapplet code V D W $lass1ame W D.class widthVD W wid W D heightVD W hei W DS\nD6Q hf.Append#5DRHappletS\nD6Q hf.Append#5DRHbodyS\nD6Q hf.Append#5DRHhtmlS\nD6Q hf.$lose56Q U wf.$lose56Q U U catch5>xception e6 T System.exit5#6Q U U public void *pen;ile56 T try T String fnameQ =et;ile1ame5B6Q System.out.println5;ile1ame6Q if 5Y5;ile1ame.eEuals5DD666 T $ompX)etJK 1$ V new $ompX)etJ,BKQ 7n V new *bject7nputStream5new ;ile7nputStream5;ile1ame66Q 1$ V 5$ompX)etJK6 7n.read*bject56Q biVBQ liVBQ tiVBQ ciVBQ chiVBQ liiVBQ System.out.println5DCength N D W 1$.length6Q for 5int iVBQiR1$.lengthQiWW6 T if 51$JiK VV null6 brea!Q 1$JiK.print56Q if 51$JiK.1ame.eEuals5DFuttonD66 T bJbiK V new Futton51$JiK.$aption6Q mh.addMouseLandler55$omponent6bJbiK6Q bJbiK.setFounds51$JiK.@,1$JiK.P,1$JiK. ,1$JiK.L6Q bJbiK.set;ont5new ;ont51$JiK.;ont1ame,1$JiK.;S,#,66Q bJbiK.setFac!ground51$JiK.F$6Q bJbiK.set;oreground51$JiK.;$6Q pa.add5bJbiK6Q

+B

biWWQ U if 51$JiK.1ame.eEuals5DText;ieldD66 T tJtiK V new Text;ield51$JiK.$aption,%B6Q mh.addMouseLandler55$omponent6tJtiK6Q tJtiK.setFounds51$JiK.@,1$JiK.P,1$JiK. ,1$JiK.L6Q tJtiK.set;ont5new ;ont51$JiK.;ont1ame,1$JiK.;S,#,66Q tJtiK.setFac!ground51$JiK.F$6Q tJtiK.set;oreground51$JiK.;$6Q pa.add5tJtiK6Q tiWWQ U if 51$JiK.1ame.eEuals5DCabelD66 T lJliK V new Cabel51$JiK.$aption6Q mh.addMouseLandler55$omponent6lJliK6Q lJliK.setFounds51$JiK.@,1$JiK.P,1$JiK. ,1$JiK.L6Q lJliK.set;ont5new ;ont51$JiK.;ont1ame,1$JiK.;S,#,66Q lJliK.setFac!ground51$JiK.F$6Q lJliK.set;oreground51$JiK.;$6Q lJliK.setAlignment51$JiK.;A6Q pa.add5lJliK6Q liWWQ U if 51$JiK.1ame.eEuals5D$hec!boxD66 T cJciK V new $hec!box51$JiK.$aption6Q mh.addMouseLandler55$omponent6cJciK6Q cJciK.setFounds51$JiK.@,1$JiK.P,1$JiK. ,1$JiK.L6Q cJciK.set;ont5new ;ont51$JiK.;ont1ame,1$JiK.;S,#,66Q cJciK.setFac!ground51$JiK.F$6Q cJciK.set;oreground51$JiK.;$6Q pa.add5cJciK6Q ciWWQ U if 51$JiK.1ame.eEuals5DCistD66 T ltJliiK V new Cist56Q mh.addMouseLandler55$omponent6ltJliiK6Q ltJliiK.setFounds51$JiK.@,1$JiK.P,1$JiK. ,1$JiK.L6Q ltJliiK.set;ont5new ;ont51$JiK.;ont1ame,1$JiK.;S,#,66Q ltJliiK.setFac!ground51$JiK.F$6Q ltJliiK.set;oreground51$JiK.;$6Q for 5int jVBQjR1$JiK.items.lengthQjWW6 ltJliiK.add51$JiK.itemsJjK6Q pa.add5ltJliiK6Q liiWWQ U

+#

if 51$JiK.1ame.eEuals5D$hoiceD66 T chJchiK V new $hoice56Q mh.addMouseLandler55$omponent6chJchiK6Q chJchiK.setFounds51$JiK.@,1$JiK.P,1$JiK. ,1$JiK.L6Q chJchiK.set;ont5new ;ont51$JiK.;ont1ame,1$JiK.;S,#,66Q chJchiK.setFac!ground51$JiK.F$6Q chJchiK.set;oreground51$JiK.;$6Q System.out.println5D$ount N D W 1$JiK.items.length6Q for 5int jVBQjR1$JiK.items.lengthQjWW6 chJchiK.add51$JiK.itemsJjK6Q pa.add5chJchiK6Q chiWWQ U if 51$JiK.1ame.eEuals5DIScrollbarD66 T vsJvsiK V new Scrollbar51$JiK.*ri,1$JiK.7niXIal,1$JiK.IA,1$JiK.Min,1$JiK.Max6Q vsJvsiK.set'nit7ncrement51$JiK.'7nc6Q vsJvsiK.setFloc!7ncrement51$JiK.F7nc6Q mh.addMouseLandler55$omponent6vsJvsiK6Q vsJvsiK.setFounds51$JiK.@,1$JiK.P,1$JiK. ,1$JiK.L6Q vsJvsiK.setFac!ground51$JiK.F$6Q vsJvsiK.set;oreground51$JiK.;$6Q pa.add5vsJvsiK6Q vsiWWQ U if 51$JiK.1ame.eEuals5DLScrollbarD66 T hsJhsiK V new Scrollbar51$JiK.*ri,1$JiK.7niXIal,1$JiK.IA,1$JiK.Min,1$JiK.Max6Q hsJhsiK.set'nit7ncrement51$JiK.'7nc6Q hsJhsiK.setFloc!7ncrement51$JiK.F7nc6Q mh.addMouseLandler55$omponent6hsJhsiK6Q hsJhsiK.setFounds51$JiK.@,1$JiK.P,1$JiK. ,1$JiK.L6Q hsJhsiK.setFac!ground51$JiK.F$6Q hsJhsiK.set;oreground51$JiK.;$6Q pa.add5hsJhsiK6Q hsiWWQ U if 51$JiK.1ame.eEuals5D$hec!box=roupD66 T cbgJcbgiK V new $hec!box=roup56Q cbgiWWQ U if 51$JiK.1ame.eEuals5D2adioD66 T rbJriK V new $hec!box51$JiK.$aption,cbgJ1$JiK.$F=7ndK,false6Q mh.addMouseLandler55$omponent6rbJriK6Q

+%

rbJriK.setFounds51$JiK.@,1$JiK.P,1$JiK. ,1$JiK.L6Q rbJriK.set;ont5new ;ont51$JiK.;ont1ame,1$JiK.;S,#,66Q rbJriK.setFac!ground51$JiK.F$6Q rbJriK.set;oreground51$JiK.;$6Q pa.add5rbJriK6Q riWWQ U U show56Q U U catch5>xception e6 T e.printStac!Trace56Q U U public static void main5String argvJK6 T Java)es jd V new Java)es56Q U U class MouseLandler T $omponent cQ String $ontrolQ public void addMouseLandler5$omponent co6 T co.addMouseCistener5new MouseAdapter56 T public void mouse(ressed5Mouse>vent e6 T String s V e.get$omponent56.get1ame56Q System.out.println5s6Q c V e.get$omponent56Q if 5e.getSource56 instanceof ;rame6 $ontrol V D;rameDQ if 5e.getSource56 instanceof Futton6 $ontrol V DFuttonDQ if 5e.getSource56 instanceof Cabel6 $ontrol V DCabelDQ if 5e.getSource56 instanceof Text;ield6 $ontrol V DText;ieldDQ if 5e.getSource56 instanceof TextArea6 $ontrol V DTextAreaDQ if 5e.getSource56 instanceof $hec!box6 $ontrol V D$hec!boxDQ if 5e.getSource56 instanceof Cist6 $ontrol V DCistDQ if 5e.getSource56 instanceof $hoice6

+&

$ontrol V D$hoiceDQ if 5e.getSource56 instanceof Scrollbar6 $ontrol V DScrollbarDQ U U6Q U U class 2adioX)ialog extends )ialog implements ActionCistener T Cist lQ Futton bQ int indQ 2adioX)ialog5;rame p,int cbgi6 T super5p,DSelect $hec!box=roupD,true6Q setSi"e5%BB,%BB6Q setCocation5%BB,%BB6Q setCayout5new ForderCayout566Q l V new Cist5+6Q for 5int iVBQiRcbgiQiWW6 l.add5D$hec!box=roupD W String.value*f5i66Q add5l,D$enterD6Q b V new Futton5D*!D6Q b.addActionCistener5this6Q add5b,DSouthD6Q new )ialogLandler5this6Q show56Q U public void action(erformed5Action>vent e6 T System.out.println5l.getSelected7tem566Q ind V l.getSelected7ndex56Q dispose56Q U U U

A.1 Dra9-an4-Drop Pro3e,,


Des!ain."ava class Tool)lg extends )ialog implements ActionCistener T JFuttonJK b V new JFuttonJ#BKQ 7mage7conJK ii V new 7mage7conJ#BKQ StringJK butXlabel V TDFuttonD,DText;ieldD,DCabelD,D$hec!boxD,DCistD, D$hoiceD,DLScrollbarD,DIScrollbarD,D$hec!box=roupD,D2adioFuttonDUQ int iQ int Tool7dQ ++

Tool)lg5;rame f6 T super5f,DTool FarD6Q setSi"e5#,B,%,B6Q setCocation5#,/B6Q Tool!it t!% V getTool!it56Q f.set7con7mage5t!%.get7mage5Dicon.gifD66Q setFac!ground5$olor.gray6Q setCayout5new =ridCayout5,,%66Q for5iVBQiR#BQiWW6 T iiJiK V new 7mage7con5D uicon#.gifD6Q bJiK V new JFutton5butXlabelJiK,iiJiK6Q bJiK.setToolTipText5butXlabelJiK6Q bJiK.setSi"e5/B,&B6Q add5bJiK6Q bJiK.addActionCistener5this6Q U show56Q new )ialogLandler5this6Q U public void action(erformed5Action>vent e6 T if5e.getSource56 VV bJBK6 T Tool7d V #Q System.out.println5Tool7d6Q U if5e.getSource56 VV bJ#K6 T Tool7d V %Q System.out.println5Tool7d6Q U if5e.getSource56 VV bJ%K6 T Tool7d V &Q System.out.println5Tool7d6Q U if5e.getSource56 VV bJ&K6 T Tool7d V +Q System.out.println5Tool7d6Q U if5e.getSource56 VV bJ+K6 T Tool7d V ,Q System.out.println5Tool7d6Q

+,

U if5e.getSource56 VV bJ,K6 T Tool7d V .Q System.out.println5Tool7d6Q U if5e.getSource56 VV bJ.K6 T Tool7d V /Q System.out.println5Tool7d6Q U if5e.getSource56 VV bJ/K6 T Tool7d V 0Q System.out.println5Tool7d6Q U if5e.getSource56 VV bJ0K6 T Tool7d V 8Q System.out.println5Tool7d6Q U if5e.getSource56 VV bJ8K6 T Tool7d V #BQ System.out.println5Tool7d6Q U U U

A.2 Propret: Sheet


Des!ain."ava class (roperty)ialog extends )ialog implements TextCistener,7temCistener T (roperties p V new (roperties56Q StringJK gpnames V TDCeftD,DTopD,D idthD,DLeightDUQ StringJK bpnames V TDTextDUQ StringJK cpnames V TDIalueDUQ StringJK lpnames V TD7temsDUQ StringJK spnames V TDMinD,DMaxD,D7ni.IalueD,D'ni.7ncD,DFloc!.7ncDUQ StringJK gpvalues V TDBD,DBD,DBD,DBDUQ StringJK bpvalues V TDDUQ StringJK cpvalues V TDTrueD,D;alseDUQ StringJK lpvalues V TDDUQ StringJK spvalues V TDBD,DBD,DBD,DBD,DBDUQ CabelJK l V new CabelJ#,KQ Text;ieldJK t V new Text;ieldJ#BKQ $hoice c V new $hoice56Q +.

TextArea ta V new TextArea5,,%B6Q $omponent $ompQ int $TypeQ (roperty)ialog5;rame pf,int type,$omponent $o6 T super5pf,D(roperty SheetD,true6Q setSi"e5#,B,%BB6Q setCocation5%BB,%BB6Q Tool!it t!% V getTool!it56Q pf.set7con7mage5t!%.get7mage5Dicon.gifD66Q $omp V $oQ $Type V typeQ 2ectangle rec V $o.getFounds56Q gpvaluesJBK V String.value*f5rec.x6Q gpvaluesJ#K V String.value*f5rec.y6Q gpvaluesJ%K V String.value*f5rec.width6Q gpvaluesJ&K V String.value*f5rec.height6Q int i,rVB,jQ for 5iVBQiRgpnames.lengthQiWW6 p.put5gpnamesJiK,gpvaluesJiK6Q rVgpnames.lengthQ switch5type6 T case #N bpvaluesJBK V 55Futton6$o6.getCabel56Q for 5iVBQiRbpnames.lengthQiWW6 p.put5bpnamesJiK,bpvaluesJiK6Q rWVbpnames.lengthQ brea!Q case %N bpvaluesJBK V 55Text;ield6$o6.getText56Q for 5iVBQiRbpnames.lengthQiWW6 p.put5bpnamesJiK,bpvaluesJiK6Q rWVbpnames.lengthQ brea!Q case &N bpvaluesJBK V 55Cabel6$o6.getText56Q for 5iVBQiRbpnames.lengthQiWW6 p.put5bpnamesJiK,bpvaluesJiK6Q rWVbpnames.lengthQ brea!Q case +N bpvaluesJBK V 55$hec!box6$o6.getCabel56Q for 5iVBQiRbpnames.lengthQiWW6

+/

p.put5bpnamesJiK,bpvaluesJiK6Q rWVbpnames.lengthQ for 5iVBQiRcpnames.lengthQiWW6 p.put5cpnamesJiK,cpvaluesJiK6Q rWVcpnames.lengthQ brea!Q case ,N int ic V 55Cist6$o6.get7tem$ount56Q String tasVDDQ for 5iVBQiRicQiWW6 tasWV55Cist6$o6.get7tem5i6WDQ\nDQ System.out.println5Dtas N D W tas6Q lpvaluesJBK V tasQ System.out.println5Dlpnames N D W lpnames.length6Q for 5iVBQiRlpnames.lengthQiWW6 p.put5lpnamesJiK,lpvaluesJiK6Q System.out.println5DAfterD6Q rWVlpnames.lengthQ brea!Q case .N ic V 55$hoice6$o6.get7tem$ount56Q tasVDDQ for 5iVBQiRic3#QiWW6 tasWV55$hoice6$o6.get7tem5i6WDQ\nDQ System.out.println5tas6Q lpvaluesJBK V tasQ for 5iVBQiRlpnames.lengthQiWW6 p.put5lpnamesJiK,lpvaluesJiK6Q rWVlpnames.lengthQ brea!Q case /N spvaluesJBK V String.value*f555Scrollbar6$o6.getMinimum566Q spvaluesJ#K V String.value*f555Scrollbar6$o6.getMaximum566Q spvaluesJ%K V String.value*f555Scrollbar6$o6.getIalue566Q spvaluesJ&K V String.value*f555Scrollbar6$o6.get'nit7ncrement566Q spvaluesJ+K V String.value*f555Scrollbar6$o6.getFloc!7ncrement566Q for 5iVBQiRspnames.lengthQiWW6 p.put5spnamesJiK,spvaluesJiK6Q rWVspnames.lengthQ brea!Q case 0N spvaluesJBK V String.value*f555Scrollbar6$o6.getMinimum566Q spvaluesJ#K V String.value*f555Scrollbar6$o6.getMaximum566Q spvaluesJ%K V String.value*f555Scrollbar6$o6.getIalue566Q spvaluesJ&K V String.value*f555Scrollbar6$o6.get'nit7ncrement566Q spvaluesJ+K V String.value*f555Scrollbar6$o6.getFloc!7ncrement566Q for 5iVBQiRspnames.lengthQiWW6 p.put5spnamesJiK,spvaluesJiK6Q rWVspnames.lengthQ brea!Q

+0

case 8N brea!Q case #BN bpvaluesJBK V 55$hec!box6$o6.getCabel56Q for 5iVBQiRbpnames.lengthQiWW6 p.put5bpnamesJiK,bpvaluesJiK6Q rWVbpnames.lengthQ for 5iVBQiRcpnames.lengthQiWW6 p.put5cpnamesJiK,cpvaluesJiK6Q rWVcpnames.lengthQ U iVBQ setCayout5new =ridCayout5r,%66Q >numeration eQ e V p.property1ames56Q jVBQ while 5e.hasMore>lements566 T String pr V 5String6e.next>lement56Q String v V p.get(roperty5pr6Q lJjK V new Cabel5pr6Q add5lJjK6Q if 5pr.eEuals5DIalueD66 T for 5iVBQiRcpvalues.lengthQiWW6 c.add5cpvaluesJiK6Q c.add7temCistener5this6Q add5c6Q U else if 5pr.eEuals5D7temsD66 T ta.setText5lpvaluesJBK6Q add5ta6Q U else T tJiK V new Text;ield5v6Q tJiK.addTextCistener5this6Q add5tJiK6Q iWWQ U jWWQ U add indowCistener5new indowAdapter56 T public void window$losing5 indow>vent e6 T

+8

if 55$Type VV ,6 ZZ 5$Type VV .66 T String text V ta.getText56Q StringTo!eni"er st V new StringTo!eni"er5text,DQD6Q if 5$Type VV ,6 55Cist6$omp6.removeAll56Q else 55$hoice6$omp6.removeAll56Q while 5st.hasMoreTo!ens566 T String s V st.nextTo!en56Q s V s.trim56Q if 5$Type VV ,6 55Cist6$omp6.add5s6Q else 55$hoice6$omp6.add5s6Q U U dispose56Q U U6Q show56Q U public void textIalue$hanged5Text>vent e6 T int widthVB,heightVB,xposVB,yposVB,minVB,maxVB,valueVB,uincVB,bincVBQ String captionVDDQ if 55$Type YV ,6 99 5$Type YV .66 for 5int iVBQiRl.lengthQiWW6 if 5lJiK YV null6 T if 5lJiK.getText56.eEuals5D idthD66 width V 7nteger.parse7nt5tJiK.getText566Q else if 5lJiK.getText56.eEuals5DLeightD66 height V 7nteger.parse7nt5tJiK.getText566Q else if 5lJiK.getText56.eEuals5DCeftD66 xpos V 7nteger.parse7nt5tJiK.getText566Q else if 5lJiK.getText56.eEuals5DTopD66 ypos V 7nteger.parse7nt5tJiK.getText566Q else if 55lJiK.getText56.eEuals5DTextD66 ZZ 5lJiK.getText56.eEuals5DCabelD666 caption V tJiK.getText56Q else if 5lJiK.getText56.eEuals5DMinD66

,B

min V 7nteger.parse7nt5tJiK.getText566Q else if 5lJiK.getText56.eEuals5DMaxD66 max V 7nteger.parse7nt5tJiK.getText566Q else if 5lJiK.getText56.eEuals5D7ni.IalueD66 value V 7nteger.parse7nt5tJiK.getText566Q else if 5lJiK.getText56.eEuals5D'ni.7ncD66 uinc V 7nteger.parse7nt5tJiK.getText566Q else if 5lJiK.getText56.eEuals5DFloc!.7ncD66 binc V 7nteger.parse7nt5tJiK.getText566Q U if 55$Type SV#6 99 5$Type RV+66 $omp.setFounds5xpos,ypos,width,height6Q if 55$Type SV,6 99 5$Type RV.66 $omp.setFounds57nteger.parse7nt5tJBK.getText566,7nteger.parse7nt5tJ#K.getText566, 7nteger.parse7nt5tJ&K.getText566,7nteger.parse7nt5tJ%K.getText5666Q if 55$Type VV /6 ZZ 5$Type VV 066 T $omp.setFounds57nteger.parse7nt5tJ&K.getText566,7nteger.parse7nt5tJ+K.getText566, 7nteger.parse7nt5tJ0K.getText566,7nteger.parse7nt5tJ/K.getText5666Q $omp.setFounds5xpos,ypos,width,height6Q 55Scrollbar6$omp6.setMinimum5min6Q 55Scrollbar6$omp6.setIalue5value6Q 55Scrollbar6$omp6.setMaximum5max6Q 55Scrollbar6$omp6.set'nit7ncrement5uinc6Q 55Scrollbar6$omp6.setFloc!7ncrement5binc6Q U switch 5$Type6 T case #N 55Futton6$omp6.setCabel5caption6Q brea!Q case %N 55Text;ield6$omp6.setText5caption6Q brea!Q case &N 55Cabel6$omp6.setText5caption6Q brea!Q case +N 55$hec!box6$omp6.setCabel5caption6Q brea!Q case #BN 55$hec!box6$omp6.setCabel5caption6Q brea!Q U U

,#

public void itemState$hanged57tem>vent e6 T if 5c.getSelected7tem56.eEuals5DTrueD66 55$hec!box6$omp6.setState5true6Q else 55$hec!box6$omp6.setState5false6Q U U class )ialogLandler T )ialog mdQ )ialogLandler5)ialog d6 T mdVdQ d.add indowCistener5new indowAdapter56 T public void window$losing5 indow>vent e6 T md.dispose56Q U U6Q U U class Assign(rop T public String $aptionQ public int $om@,$omP,$om ,$omLQ Assign(rop5String C,int @,int P,int ,int L6 T $aption V CQ $om@ V @Q $omP V PQ $om V Q $omL V LQ U U class $ompX)et implements Seriali"able T public String 1ame,$aption,;ont1ameQ public int @,P, ,L,;S,;AQ public $olor F$,;$Q public int *ri,IA,Min,Max,7niXIal,'7nc,F7nc,$F=7ndQ StringJK itemsQ public $ompX)et5String 1,String $,int $x,int $y,int $w,int $h,String ;1,int ;S#,$olor,F$#,$olor ;$#,int ;A#,StringJK items, int *ri,int 7niXIal,int IA,int Min,int Max,int '7nc,int F7nc,int $F=7nd6 T 1ame V 1Q $aption V $Q

,%

@ V $xQ P V $yQ V $wQ L V $hQ ;ont1ame V ;1Q ;S V ;S#Q ;A V ;A#Q F$ V F$#Q ;$ V ;$#Q this.itemsVitemsQ this.*ri V *riQ this.7niXIal V 7niXIalQ this.IA V IAQ this.Min V MinQ this.Max V MaxQ this.'7nc V '7ncQ this.F7nc V F7ncQ this.$F=7nd V$F=7ndQ U public void print56 T System.out.println51ame W $aption W @ W P W ;$ W ;A6 U U

W L W ;ont1ame W ;S W F$ W

A.A Databa,e Conne3tion


Des!ain."ava class TableCist extends ;rame implements 7temCistener, ActionCistener T Cabel l#,l%,l&Q Text;ield t#,t%,t&Q Futton b#,b%,b&,b+Q Cist tlQ $olumnCist clQ String )S,'7),( )Q public void paint5=raphics g6 T Tool!it t!% V getTool!it56Q set7con7mage5t!%.get7mage5Dicon.gifD66Q U TableCist56 throws >xception T super5DTable CistD6Q setSi"e5&BB,&BB6Q setCocation5#BB,#BB6Q setCayout5new ForderCayout566Q $lass.for1ame5Dsun.jdbc.odbc.Jdbc*dbc)riverD6Q )esignXScreen56Q U ,&

public void AddXTablesXtoCist5String )S,String '7),String ( )6 throws >xception T $onnection con V )riverManager.get$onnection5DjdbcNodbcNDW)S,'7),( )6Q StringJK type V TDTAFC>DUQ )atabaseMeta)ata dm V con.getMeta)ata56Q 2esultSet res V dm.getTables5null,null,D]D,type6Q 2esultSetMeta)ata rm V res.getMeta)ata56Q int cc V rm.get$olumn$ount56Q tl.removeAll56Q while 5res.next566 tl.add5res.getString5&66Q U public void itemState$hanged57tem>vent e6 T if 5e.getSource56 VV tl6 if 5tl.getSelected7ndex56 YV 3#6 System.out.println5tl.getSelected7tem566Q U public void action(erformed5Action>vent e6 T try T if 5e.getSource56 VV b#6 T )S Vt#.getText56Q '7)Vt%.getText56Q ( )Vt&.getText56Q AddXTablesXtoCist5)S,'7),( )6Q U if 5e.getSource56 VV b%6 T t#.setText5DD6Q t%.setText5DD6Q t&.setText5DD6Q U if 55e.getSource56 VV b&6 99 5tl.getSelected7ndex56 YV 3#66 T System.out.println5tl.getSelected7tem566Q cl V new $olumnCist5this,tl.getSelected7tem56,)S,'7),( )6Q U if 5e.getSource56 VV b+6 dispose56Q U catch5>xception e#6 T e#.printStac!Trace56Q U

,+

U public static void main5String argvJK6 throws >xception T TableCist t V new TableCist56Q U U class Lelp)lg extends )ialog T TextArea taQ Lelp)lg5;rame fp,String ;ile1ame6 throws >xception T super5fp,DLelp )ialogD,true6Q setSi"e5.BB,+BB6Q setCocation5#B,#B6Q setCayout5new ForderCayout566Q ta V new TextArea56Q ta.setFac!ground5$olor.gray6Q ta.set;oreground5$olor.blue6Q ta.set;ont5new ;ont5DTimes2omanD,;ont.F*C),#,66Q ta.set>ditable5false6Q add5ta,D$enterD6Q ;ile7nputStream fi V new ;ile7nputStream5;ile1ame6Q byteJK buff V new byteJfi.available56KQ fi.read5buff,B,buff.length6Q String info V new String5buff,B,buff.length6Q ta.setText5info6Q add indowCistener5new indowAdapter56 T public void window$losing5 indow>vent e6 T dispose56Q U U6Q show56Q U U A.K >a5a Help Des!ain."ava class JLelp extends ;rame implements ActionCistener,7temCistener T Futton Fut V new Futton5DLelpD6Q Cabel Cab V new Cabel5DSelect Pou $lass 1ame N D6Q $hoice $ho V new $hoice56Q TextArea taQ String classnameVDDQ HH )esign code public void itemState$hanged57tem>vent e6 T classnameV5String6e.get7tem56Q

,,

U public void action(erformed5Action>vent e6 T if5e.getSource56VVFut6 T ta.setText5DD6Q try T classnameVDjava.DWclassnameQ System.out.println5classname6Q String dupli V classnameQ $lass c V $lass.for1ame5classname6Q $onstructor constructorsJK V c.get$onstructors56Q ta.append5D\t\t$CASS (ATL N DWdupli6Q String fuliduVD$CASS (ATL N DWdupliQ ta.append5D\n\t\tD6Q for5int tyhVBQtyhRfulidu.length56QtyhWW6 ta.append5D^D6Q ta.append5D\n\n$onstructors N \n^^^^^^^^^^^^^^D W D\n\nD6Q for5int iVBQiRconstructors.lengthQiWW6 T classname V constructorsJiK.toString56Q ta.append5classname W D\nD6Q U ta.append5D\n\nD6Q ;ield fieldsJK V c.get;ields56Q ta.append5D;ields N \n^^^^^^^^D W D\n\nD6Q for5int iVBQiRfields.lengthQiWW6 T classname V fieldsJiK.toString56Q ta.append5classname W D\nD6Q U ta.append5D\n\nD6Q Method methodsJK V c.getMethods56Q ta.append5DMethods N \n^^^^^^^^^D W D\n\nD6Q for5int iVBQiRmethods.lengthQiWW6 T classname V methodsJiK.toString56Q ta.append5classname W D\nD6Q U Ucatch5>xception ee6TU U U U class J@Lelp extends ;rame implements ActionCistener,7temCistener T Futton Fut V new Futton5DLelpD6Q Cabel Cab V new Cabel5DSelect Pou $lass 1ame N D6Q $hoice $ho V new $hoice56Q

,.

TextArea taQ String classnameVDDQ HH )esign $ode public void itemState$hanged57tem>vent e6 T classnameV5String6e.get7tem56Q U public void action(erformed5Action>vent e6 T if5e.getSource56VVFut6 T ta.setText5DD6Q try T classnameVDjavax.DWclassnameQ System.out.println5classname6Q String dupli V classnameQ $lass c V $lass.for1ame5classname6Q $onstructor constructorsJK V c.get$onstructors56Q ta.append5D\t\t$CASS (ATL N DWdupli6Q String fuliduVD$CASS (ATL N DWdupliQ ta.append5D\n\t\tD6Q for5int tyhVBQtyhRfulidu.length56QtyhWW6 ta.append5D^D6Q ta.append5D\n\n$onstructors N \n^^^^^^^^^^^^^^D W D\n\nD6Q for5int iVBQiRconstructors.lengthQiWW6 T classname V constructorsJiK.toString56Q ta.append5classname W D\nD6Q U ta.append5D\n\nD6Q ;ield fieldsJK V c.get;ields56Q ta.append5D;ields N \n^^^^^^^^D W D\n\nD6Q for5int iVBQiRfields.lengthQiWW6 T classname V fieldsJiK.toString56Q ta.append5classname W D\nD6Q U ta.append5D\n\nD6Q Method methodsJK V c.getMethods56Q ta.append5DMethods N \n^^^^^^^^^D W D\n\nD6Q for5int iVBQiRmethods.lengthQiWW6 T classname V methodsJiK.toString56Q ta.append5classname W D\nD6Q U Ucatch5>xception ee6TU

,/

Chapter % K

S'STEM TESTIN$
K.1 Intro4/3tion
Software Testing is the process used to help identify the correctness, completeness, security, and Euality of developed computer software. Testing is a process of technical investigation, performed on behalf of sta!eholders, that is intended to reveal Euality3related information about the product with respect to the context in which it is intended to operate. This includes, but is not limited to, the process of executing a program or application with the intent of finding errors. Ouality is not an absoluteQ it is value to some person. ith that in mind, testing can never completely establish the correctness of arbitrary computer softwareQ testing furnishes a criticism or comparison that compares the state and behavior of the product against a specification. An important point is that software testing should be distinguished from the separate discipline of Software Ouality Assurance 5SOA6, which encompasses all business process areas, not just testing. There are many approaches to software testing, but effective testing of complex products is essentially a process of investigation, not merely a matter of creating and following routine procedure. *ne definition of testing is Dthe process of Euestioning a product in order to evaluate itD, where the DEuestionsD are operations the tester attempts to execute with the product, and the product answers with its behavior in reaction to the probing of the testerJcitation neededK. Although most of the intellectual processes of testing are nearly identical to that of review or inspection, the word testing is connoted to mean the dynamic analysis of the product_putting the product through its paces. Some of the common Euality attributes include capability, reliability, efficiency, portability, maintainability, compatibility and usability. A good test is sometimes described as one which reveals an errorQ however, more recent thin!ing suggests that a good test is one which reveals information of interest to someone who matters within the project community. Software testing may be viewed as a sub3field of Software Ouality Assurance but typically exists independently 5and there may be no SOA areas in some companies6. 7n SOA, software process specialists and auditors ta!e a broader view on

,0

software and its development. They examine and change the software engineering process itself to reduce the amount of faults that end up in the code or deliver faster. 2egardless of the methods used or level of formality involved the desired result of testing is a level of confidence in the software so that the organi"ation is confident that the software has an acceptable defect rate. hat constitutes an acceptable defect rate depends on the nature of the software. An arcade video game designed to simulate flying an airplane would presumably have a much higher tolerance for defects than software used to control an actual airliner. A problem with software testing is that the number of defects in a software product can be very large, and the number of configurations of the product larger still. Fugs that occur infreEuently are difficult to find in testing. A rule of thumb is that a system that is expected to function without faults for a certain length of time must have already been tested for at least that length of time. This has severe conseEuences for projects to write long3lived reliable software. A common practice of software testing is that it is performed by an independent group of testers after the functionality is developed but before it is shipped to the customer. This practice often results in the testing phase being used as project buffer to compensate for project delays. Another practice is to start software testing at the same moment the project starts and it is a continuous process until the project finishes. Another common practice is for test suites to be developed during technical support escalation procedures. Such tests are then maintained in regression testing suites to ensure that future updates to the software don:t repeat any of the !nown mista!es. 7t is commonly believed that the earlier a defect is found the cheaper it is to fix it. Test #eve#s 'nit testing tests the minimal software component and sub3component or modules by the programmers.

7ntegration testing exposes defects in the interfaces and interaction between integrated components 5modules6. ;unctional testing tests the product according to programmable wor!. System testing tests an integrated system to verifyHvalidate that it meets its reEuirements. Acceptance testing testing can be conducted by the client. 7t allows the end3user or customer or client to decide whether or not to accept the product. Acceptance ,8

testing may be performed after the testing and before the implementation phase. See also )evelopment stage
o

Alpha testing is simulated or actual operational testing by potential usersHcustomers or an independent test team at the developers: site. Alpha testing is often employed for off3the3shelf software as a form of internal acceptance testing, before the software goes to beta testing. Feta testing comes after alpha testing. Iersions of the software, !nown as beta versions, are released to a limited audience outside of the company. 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 feedbac! field to a maximal number of future users. 7t should be noted that although both Alpha and Feta are referred to as

testing it is in fact use emersion. The rigors that are applied are often unsystematic and many of the basic tenets of testing process are not used. The Alpha and Feta period provides insight into environmental and utili"ation conditions that can impact the software. After modifying software, either for a change in functionality or to fix defects, a regression test re3runs previously passing tests on the modified software to ensure that the modifications haven:t unintentionally caused a regression of previous functionality.

K.2 Te,t Ca,e Preparation K.2.1 Te,t Ca,e De,i9n


*nce source code has been generated, software must be tested to uncover as many errors as possible before delivery of the developed software. The goal is to design a series of test cases that have a high li!elihood of finding errors. Software is tested for two different perspectivesN #. 7nternal program logic is exercised using ?white3boxA test case design techniEues. %. Software reEuirements are exercised using ?bloc!3box test case design techniEues. .B

1. (hite-!o8 Te,tin9 hite3box testing focuses on the specified function that a product has been designed to perform, tests can be conducted that demonstrates each function is silly operation, at the same time searching for errors in each function. 'sing white3box testing methods, the software engineer can drive test cases that #. =uarantee that all independent paths within a module has been exercised at least once3basic3path testing. %. >xercise all logical decisions on their true and false sides3condition testing. &. >xercise all loops at their boundaries and within their operational bounds3loop testing. +. >xercise internal data structure to assure that validity3data flow testing.

2. !la3@-!o8 Te,tin9 Flac!3box testing focuses on functional reEuirements of the software. Flac!3box testing attempts to find errors in the following categoriesN #. 7ncorrect or missing functions. %. 7nterface errors. &. >rrors in data structures or external database access. +. (erformance errors. ,. 7nitiali"ation and termination errors. Testing of the debugging programs is one of the most critical aspects of the computer programming triggers, without programs that wor!s, the system would never produce the output for which it was designed. Testing is best performed when user development are as!ed to assist in identifying all errors and bugs. The sample data are used for testing. 7t is not Euantity but Euality of the data used the matters of testing. Testing is aimed at ensuring that the system was accurately an efficiently before live operation commands.

.#

K.2.2 Te,t Ca,e $eneration The test procedure used in the testing process is !la3@ bo8 te,tin9. Test cases are analy"ed accordingly. This test involves the manual evaluation of the Speech 2ecognition process, Menu *ption performance, Automatic $ode generation flow from one module to the other and chec! accordingly for the process flow.

Ca,e $eneration Report a. Main S3reen


&3t/al Inp/t *n$lic! of ?*pen with Java Application i"ardA Futton E8pe3te4 o/tp/t )isplay Java Application i"ard

*n$lic! of ?*pen with Java Text(adA Futton )isplay Java Text(ad *n$lic! of ?>xit Java Application )eveloperA >xit out of the Java Application )eveloper Futton

b. >a5a &ppli3ation (i?ar4 1. Spee3h Re3o9nition


Actual 7nput given in the form of speech i.e., a file. &3t/al Inp/t Futton Textfield Cabel $hec!box Cist $hoice Lori"ontal Scroll Far Iertical Scroll Far $hec!box =roup 2adioFutton E8pe3te4 o/tp/t )isplay a Futton on the wi"ard and code generation. )isplay a Textfield on the wi"ard and code generation. )isplay a Cabel on the wi"ard and code generation. )isplay a $hec!box on the wi"ard and code generation. )isplay a Cist box on the wi"ard and code generation. )isplay a $hoice box on the wi"ard and code generation. )isplay a Lori"ontal Scroll Far on the wi"ard and code generation. )isplay a Iertical Scroll Far on the wi"ard and code generation. )isplay a $hec!box =roup on the wi"ard and code generation. $onvert $hec!box =roup to 2adio Futton on the wi"ard and code generation. ave form, the >xpected output is

display of that particular control on the screen and automatic code generation for that control in

.%

2. Men/ Option,
&3t/al Inp/t *n$lic! of ?;ileA Menu *n$lic! of ?1ew i"ardA option *n$lic! of ?Java Text(adA option *n$lic! of ?CoadA option E8pe3te4 o/tp/t )isplay ;ile Menu )isplay a 1ew i"ard to develop another 7nterface S!ip control to Java Text(ad Module )isplay ?*pen ;ile )ialog`A to load already $reated ? .datA file *n$lic! of ?Save ;rameAppA option)isplay ?Save ;ile )ialog`A to save the designed interface as ;rame application i.e.,?.datA 9 A.javaA file *n$lic! of ?Save AppletA option )isplay ?Save ;ile )ialog`A to save the designed interface as Applet application i.e., ?.datA, A.javaA 9 ?.htmlA file *n$lic! of ?$onnectA option )isplay ?Table CistA dialog box to process )atabase connection. *n$lic! of ?>xitA option >xit from Java Application i"ard *n$lic! of ?>ditA Menu )isplay >dit Menu *n$lic! of ?'ndoA option $ancel the previous action *n$lic! of ?$utA option $ut the control to move or to delete *n$lic! of ?$opyA option $opy the control *n$lic! of ?(asteA option (aste the control wherever desired *n$lic! of ?IiewA Menu )isplay Iiew Menu *n$lic! of ?Tool )ialogA option )isplay ToolFar with #B $ontrols. *n$lic! of each control create a instance of that control *n$lic! of ?(ropertiesA option )isplay (roperty Sheet with appropriate (roperties of selected control to set properties *n$lic! of ?;oregroundA option )isplay ;ore =round $olor $hooser *n$lic! of ?Fac!groundA option )isplay Fac! =round $olor $hooser *n$lic! of ?SourceA option )isplay Source code of selected file *n$lic! of ?ToolA Menu )isplay #B $ontrols, *n$lic! of each control create a instance of that control *n$lic! of ?2unA Menu )isplay 2un Menu *n$lic! of ?$ompileA option )isplay ?$ompile ;ile..A )ialog box to select file to be compiled i.e., to execute javac *n$lic! of ?2unA option )isplay ?2un ;ile..A )ialog box to select .class file to execute it. *n$lic! of ?2un AppletA option )isplay ?2un Applet ;ile..A )ialog box to select .html file to execute it *n$lic! of ?LelpA Menu )isplay Lelp Menu *n$lic! of ?About i"ardA option )isplay content about wi"ard *n$lic! of ?2unA option )isplay $ompany (rofile *n$lic! of ;ont $hoice )isplay drop3down menu to select font type of control tile *n$lic! of Si"e $hoice )isplay drop3down menu to select font si"e of control tile *n$lic! of ?;bA Futton Ma!e selected control title Fold *n$lic! of ?;iA Futton Ma!e selected control title 7talic *n$lic! of ?;pA Futton Ma!e selected control title (lain text *n$lic! of ?;biA Futton Ma!e selected control title Fold 9 7talic .&

3. >a5a Te8tPa4
&3t/al Inp/t *n$lic! of ?;ileA Menu *n$lic! of ?$lear Text(adA option *n$lic! of ?1ew i"ard IiewA option *n$lic! of ?*pen ;ileA option *n$lic! of ?Save ;ileA option *n$lic! of ?Save ;ile As..A option *n$lic! of ?>xit Text(adA option *n$lic! of ?>ditA Menu *n$lic! of ?;ormatA Menu *n$lic! of ?;ontA option *n$lic! of ?;oregroundA option *n$lic! of ?Fac!groundA option *n$lic! of ?FuildA Menu *n$lic! of ?$ompileA option *n$lic! of ?2unA option *n$lic! of ?2un AppletA option *n$lic! of ?LelpA Menu *n$lic! of ?Java LelpA option *n$lic! of ?Javax LelpA option *n$lic! of ;ont $hoice *n$lic! of Si"e $hoice *n$lic! of ?;bA Futton *n$lic! of ?;iA Futton *n$lic! of ?;pA Futton *n$lic! of ?;bAi Futton Te,t Ca,e &nal:,i, All the above validations on buttons have been verified and they are successfully executed. The flow is tested at different possible conditions by means of this testing. E8pe3te4 o/tp/t )isplay ;ile Menu $lear whatever text on the Text(ad S!ip control to Java Application i"ard Module )isplay ?*pen ;ile..A )ialog box to load already $reated ? .javaA or ?.htmlA file )isplay ?Save ;ile..A )ialog box to save the code as A.javaA file )isplay ?Save ;ile As`A )ialog box to save another copy of the file >xit from Java Text(ad )isplay options to $ut, $opy 9 (aste )isplay ;ormat Menu )isplay ?;ontA )ialog box to set ;ont Type, Si"e 9 Style. )isplay ;ore =round $olor $hooser )isplay Fac! =round $olor $hooser )isplay Fuild Menu )isplay ?$ompile ;ile`A )ialog box to select .java file to be compiled i.e., to execute javac )isplay ?2un ;ile`A )ialog box to select .class file to execute it. )isplay ?2un Applet ;ile..A )ialog box to select .html file to execute it )isplay Lelp Menu )isplay Java Lelp dialog box to display class 9 method description available in java Applet. )isplay Javax Lelp dialog box to display class 9 method description available in Java Swing. )isplay drop3down menu to select font type of code in Text(ad )isplay drop3down menu to select font si"e of code in Text(ad Ma!e code in Text(ad Fold Ma!e code in Text(ad 7talic Ma!e code in Text(ad (lain text Ma!e code in Text(ad Fold 9 7talic

.+

K.0 Te,t Ca,e #erifi3ation Test cases can be verified by using either unit testing, integration testing, validation testing or output testing. Unit Te,tin9 7n this testing we test each module individually and integrate with the overall system. 'nit testing focuses verification efforts on the smallest unit of software design in the module. This is also !nown as module testing. The module of the system is tested separately. This testing is carried out during programming stage itself. 7n this testing step each module is found to wor!ing satisfactorily as regard to the expected output from the module. There are some validation chec!s for fields also. 7t is very easy to find error debut in the system. Inte9ration Te,tin9 )ata can be lost across an interfaceQ one module can have an adverse effort on the other sub functions when combined may not produces the desired major functions. 7ntegrated testing is the systematic testing for constructing the uncover errors with in the interface. The testing was done with sample data. The )eveloped system has run successfully for this sample data. The need for integrated test is to find the overall system performance. #ali4ation Te,tin9 At the culmination of the blac! box testing, software is completely assembled as a pac!age, interfacing errors have been uncovered and corrected and a final series of software tests. That is, validation tests begin, validation testing can be defined many ways but a simple definition is that validation succeeds when the software functions in manner that can be reasonably expected be the customer. After validation test has been conducted one of the two possible conditions exists. The functions or performance characteristics confirm to specification and are accepted. O/tp/t Te,tin9 After performance of the validation testing, the next step is output testing of the proposed system since no system could be useful if it does not produce the reEuired output in the specific format. As!ing the user about the format reEuired by system tests the output displayed or generated by the system under consideration. Lere the output format is considered the of screen display. The output format on the screen is found to be correct as the format was designed in the system phase

.,

according to the user need. ;or the hard copy also the output comes out as specified by the user. Lence the output testing does not result in any correction in the system. Te,t Data The proper choice of test data is as important as the test itself. The test data as input or not valid then the reliability of the output is suspected. Test data may be artificial or live.

Te,t Ca,e #erifi3ation


;irst of all, Main Screen is verified a. Main S3reen &3t/al Inp/t #erifi3ation ?*pen with Java Application i"ardA Futton *n $lic!ing Java Application i"ard displayed ?*pen with Java Text(adA Futton *n $lic!ing Java Text(ad displayed ?>xit Java Application )eveloperA Futton b.>a5a &ppli3ation (i?ar4 1. Spee3h Re3o9nition &3t/al Inp/t Futton Textfield Cabel $hec!box Cist $hoice Lori"ontal Scroll Far Iertical Scroll Far $hec!box =roup 2adioFutton #erifi3ation A Futton displayed on the wi"ard and code generated. ATextfield displayed on the wi"ard and code generated. A Cabel displayed on the wi"ard and code generated. A $hec!box displayed on the wi"ard and code generated. A Cist box displayed on the wi"ard and code generated. A $hoice box displayed on the wi"ard and code generated. A Lori"ontal Scroll Far displayed on the wi"ard and code generated. A Iertical Scroll Far displayed on the wi"ard and code generated. A $hec!box =roup displayed on the wi"ard and code generated. $hec!box =roup converted in to 2adio Futton on the wi"ard and code generated *n $lic!ing existed out of the Java Application )eveloper

..

#erifi3ation *n $lic!ing ;ile Menu options displayed *n $lic!ing a 1ew i"ard displayed 9 used to develop another 7nterface ?Java Text(adA option *n $lic!ing control s!ipped to Java Text(ad Module ?CoadA option *n $lic!ing ?*pen ;ile )ialog`A displayed and a already created ? .datA file loaded ?Save ;rameAppA option *n $lic!ing ?Save ;ile )ialog`A displayed and designed interface saved as ;rame application i.e.,as ?.datA 9 A.javaA ?Save AppletA option *n $lic!ing ?Save ;ile )ialog`A displayed and designed interface saved as Applet application i.e., as ?.datA, A.javaA 9 ?.htmlA file ?$onnectA option *n $lic!ing ?Table CistA dialog box displayed and )atabase connection processed. ?>xitA option *n clic!ing >xited from Java Application i"ard ?>ditA Menu *n $lic!ing >dit Menu options displayed ?'ndoA option *n $lic!ing $anceled the previous action ?$utA option *n $lic!ing cued the control to move or to delete ?$opyA option *n $lic!ing $opied the control ?(asteA option *n $lic!ing (asted the control wherever desired ?IiewA Menu *n $lic!ing Iiew Menu options displayed ?Tool )ialogA option *n $lic!ing Toolbar displayed with #B $ontrols. *n $lic!ing of each control a instance of that control created ?(ropertiesA option *n $lic!ing (roperty Sheet displayed with appropriate (roperties of selected control and set properties setted. ?;oregroundA option *n $lic!ing ;ore =round $olor $hooser displayed and fore ground color changed ?Fac!groundA option *n $lic!ing Fac! =round $olor $hooser displayed and bac! ground color changed ?SourceA option *n $lic!ing Source code displayed for selected ;ile ?ToolA Menu *n $lic!ing #B $ontrols displayed.*n $lic!ing of each control a instance of that control created ?2unA Menu *n $lic!ing 2un Menu options displayed ?$ompileA option *n $lic!ing ?$ompile ;ile..A )ialog box displayed and selected file compiled. ?2unA option *n $lic!ing ?2un ;ile..A )ialog box displayed and select .class file executed. ?2un AppletA option *n $lic!ing ?2un Applet ;ile..A )ialog box displayed and selected .html file executed ?LelpA Menu *n $lic!ing Lelp Menu options displayed ?About i"ardA option *n $lic!ing content about wi"ard displayed ?2unA option *n $lic!ing $ompany (rofile displayed ;ont $hoice *n $lic!ing drop3down menu displayed and title of selected control changed to that font. Si"e $hoice *n $lic!ing drop3down menu displayed and title of selected control changed to that font si"e. ?;bA Futton *n $lic!ing selected control title changed to Fold ?;iA Futton *n $lic!ing selected control title changed to 7talic ./

2. Men/ Option, &3t/al Inp/t ?;ileA Menu ?1ew i"ardA option

?;pA Futton ?;biA Futton 3. >a5a Te8tPa4 &3t/al Inp/t ?;ileA Menu ?$lear Text(adA option ?1ew i"ard IiewA option ?*pen ;ileA option ?Save ;ileA option ?Save ;ile As..A option ?>xit Text(adA option ?>ditA Menu ?;ormatA Menu ?;ontA option ?;oregroundA option ?Fac!groundA option ?FuildA Menu ?$ompileA option ?2unA option ?2un AppletA option ?LelpA Menu ?Java LelpA option ?Javax LelpA option ;ont $hoice Si"e $hoice ?;bA Futton ?;iA Futton ?;pA Futton ?;biA Futton

*n $lic!ing selected control title changed to (lain text *n $lic!ing selected control title changed to Fold 9 7talic

E8pe3te4 o/tp/t *n $lic!ing ;ile Menu options displayed *n $lic!ing cleared whatever text on the Text(ad *n $lic!ing S!iped control to Java Application i"ard *n $lic!ing ?*pen ;ile..A )ialog box displayed and a already created ? .javaA or ?.htmlA file loaded *n $lic!ing ?Save ;ile..A )ialog box displayed and code saved as A.javaA file *n $lic!ing ?Save ;ile As`A )ialog box displayed and another copy of that file created *n $lic!ing >xited from Java Text(ad *n $lic!ing options to $ut, $opy 9 (aste displayed *n $lic!ing ;ormat Menu options displayed *n $lic!ing ?;ontA )ialog box displayed and Seleted ;ont Type, Si"e 9 Style setted. *n $lic!ing ;ore =round $olor $hooser displayed and fore ground color changed *n $lic!ing Fac! =round $olor $hooser displayed and bac! ground color changed *n $lic!ing Fuild Menu options displayed *n $lic!ing ?$ompile ;ile..A )ialog box displayed and selected .java file compiled. *n $lic!ing ?2un ;ile..A )ialog box displayed and select .class file executed. *n $lic!ing ?2un Applet ;ile..A )ialog box displayed and selected .html file executed *n $lic!ing Lelp Menu options displayed *n $lic!ing Java Lelp dialog box displayed with class 9 method description available in java Applet. *n $lic!ing Javax Lelp dialog box displayed with class 9 method description available in Java Swing. *n $lic!ing drop3down menu displayed and title of selected control changed to that font. *n $lic!ing drop3down menu displayed and title of selected control changed to that font si"e. *n $lic!ing selected control title changed to Fold *n $lic!ing selected control title changed to 7talic *n $lic!ing selected control title changed to (lain Text *n $lic!ing selected control title changed to Fold 9 7talic

Inte9ration
Modules are designed as different classes and integrated by creating a object of the class and by invo!ing show56 through the object. .0

Chapter % L

S'STEM IMP"EMENTION
System 7mplemention can be summari"ed as ma!ing the new system available for usage. The following are reEuirements to implement the new systemJ#.&K.

L.1 Soft<are Re=/irement,


7FM Iia Ioice =old edition 5speech engine6 7FM JS J)4 #., indows *perating System %BBB and above

L.2 Har4<are Re=/irement,


$(' Type 2AM Memory ;or 7nput process N N N (entium 77 and above ,#% MF Mic!

L.0 Metho4olo9: U,e4 to Implement


The Methodlogy used to implement this project is Soft<are De5elopment "ife C:3le 3 5S)C$6. A logical process used by a systems analyst to develop an information system, including reEuirements, validation, training, and user ownership. An S)C$ result in a high Euality system that meets or exceeds customer expectations, within time and cost estimates, wor!s effectively and efficiently in the current and planned 7nformation Technology infrastructure, and is cheap to maintain and cost3 effective to enhanceJ%.%K.

L.1 Soft<are De,3ription


Java language has been used to develop this project. >&#& Java is a networ!3oriented programming language designed to allow programmers to create applications that can be downloaded from a networ! and run safely on almost any computing platform. Fut add the orld ide eb and corporate intranets to that and you get the Loly =rail of networ! computingN a distributed, object3oriented programming language that allows any computer anywhere to access applications on a networ! J#.#K.

.8

As they say in the business, Java is bu""word3compliant. 'nli!e other programming languages that may be two decades old, Java incorporates all the recent, major advances made in computer science. Java can be used to create two types of programmingN #. Application programming. %. Applet programming. The most common Java programs are applications and applets. Applications are standalone programs, such as the Lot Java browser. Applets are similar to applications, but they don:t run standalone. 7nstead, applets adhere to a set of conventions that lets them run within a Java3compatible browser. &45anta9e, of Ia5a =et started Euic!ly rite less rite better code )evelop programs faster Avoid platform dependencies with #BB] (ure anywhereN )istribute software more easily The follo<in9 are ,ome of the Cla,,e, /,e4 in thi, S:,tem 1. p/bli3 ab,tra3t 3la,, $raphi3,En5ironment e8ten4, ObIe3t The =raphics>nvironment class describes the collection of =raphics)evice objects and ;ont objects available to a Java5tm6 application on a particular platform. The resources in this =raphics>nvironment might be local or on a remote machine. =raphics)evice objects can be screens, printers or image buffers and are the destination of =raphics%) drawing methods. >ach =raphics)evice has a number of =raphics$onfiguration objects associated with it. These objects specify the different configurations in which the =raphics)evice can be used J%.#K. 2 . p/bli3 3la,, ileO/tp/tStream e8ten4, O/tp/tStream A file output stream is an output stream for writing data to a File or to a
FileDescriptor.

rite once, run

hether or not a file is available or may be created depends upon the

underlying platform. Some platforms, in particular, allow a file to be opened for writing by

/B

only one ;ile*utputStream 5or other file3writing object6 at a time. 7n such situations the constructors in this class will fail if the file involved is already open J%.#K. 0. p/bli3 3la,, ileInp/tStream e8ten4, Inp/tStream A FileInputStream obtains input bytes from a file in a file system. reading streams of raw bytes such as image data J%.#K. 1. p/bli3 ab,tra3t 3la,, Inp/tStream e8ten4, ObIe3t This abstract class is the superclass of all classes representing an input stream of bytes. Applications that need to define a subclass of InputStream must always provide a method that returns the next byte of input J%.#K. 2. p/bli3 ab,tra3t 3la,, O/tp/tStream e8ten4, ObIe3t This abstract class is the superclass of all classes representing an output stream of bytes. An output stream accepts output bytes and sends them to some sin!. Applications that need to define a subclass of OutputStream must always provide at least a method that writes one byte of output J%.#K. A. p/bli3 3la,, ObIe3tInp/tStream e8ten4, Inp/tStream implement, ObIe3tInp/tObIe3tStreamCon,tant, An *bject7nputStream deseriali"es primitive data and objects previously written using an *bject*utputStream. *bject*utputStream and *bject7nputStream can provide an application with persistent storage for graphs of objects when used with a ;ile*utputStream and ;ile7nputStream respectively. *bject7nputStream is used to recover those objects previously seriali"ed. *ther uses include passing objects between hosts using a soc!et stream or for marshaling and unmarshaling arguments and parameters in a remote communication system J%.#K. /. p/bli3 3la,, ObIe3tO/tp/tStream e8ten4, O/tp/tStream implement, ObIe3tO/tp/t- ObIe3tStreamCon,tant, An *bject*utputStream writes primitive data types and graphs of Java objects to an *utputStream. The objects can be read 5reconstituted6 using an /# hat

files are available depends on the host environment. FileInputStream is meant for

*bject7nputStream. (ersistent storage of objects can be accomplished by using a file for the stream. 7f the stream is a networ! soc!et stream, the objects can be reconsituted on another host or in another process. *nly objects that support the java.io.Seriali"able interface can be written to streams. The class of each seriali"able object is encoded including the class name and signature of the class, the values of the object:s fields and arrays, and the closure of any other objects referenced from the initial objects J%.#K. L. p/bli3 ab,tra3t 3la,, Pro3e,, e8ten4, ObIe3t The (rocessFuilder.start56 and 2untime.exec methods create a native process and return an instance of a subclass of (rocess that can be used to control the process and obtain information about it. The class (rocess provides methods for performing input from the process, performing output to the process, waiting for the process to complete, chec!ing the exit status of the process, and destroying 5!illing6 the process. The methods that create processes may not wor! well for special processes on certain native platforms, such as native windowing processes, daemon processes, in#.H)*S processes on Microsoft operations will be redirected to indows, or shell scripts. The created subprocess the parent process through three streams does not have its own terminal or console. All its standard io 5i.e. stdin, stdout, stderr6 5getOutputStream(), getInputStream(), getErrorStream()6. The parent process uses these streams to feed input to and get output from the subprocess. Fecause some native platforms only provide limited buffer si"e for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to bloc!, and even deadloc!. The subprocess is not !illed when there are no more references to the
Process

object, but rather the subprocess continues executing asynchronously. There is no reEuirement that a process represented by a Process object

execute asynchronously or concurrently with respect to the Java process that owns the
Process

object J%.#K.

/%

S(IN$ Swing is a set of classes that provides more powerful and flexible components than are possible with the A T. 7n addition to that the familiar components such as buttons, chec! box and labels swings supplies several exciting additions including tabbed panes, scroll panes, trees and tables. >ven familiar components such as buttons have more capabilities in swing. ;or example a button may have both an image and text string associated with it. Also the image can be changed as the state of button changes. 'nli!e A T components swing components are not implemented by platform specific code instead they are return entirely in JAIA and, therefore, are platform3independent. The term lightweight is used to describe such elements. The number of classes and interfaces in the swing pac!ages is substantial J#.#K. The S<in9 3omponent 3la,,e, are $lass Abstract Futton Futton =roup 7mage7con JApplet JFutton J$hec!Fox J$omboF*x JCabel J2adioFutton JScroll(ane JTabbed(ane JTable JText;ield JTree )escription Abstract super class for Swing Futtons >ncapsulates a mutually exclusive set of Futtons >ncapsulates an 7con The Swing version of Applet The Swing (ush Futton $lass The Swing $hec!Fox class >ncapsulates a combobox The swing version of a Cabel The Swing version of a 2adioFutton >ncapsulates a scrollabel window >ncapsulates a Tabbed window >ncapsulates a Table3based control The swing version of a text3field >ncapsulates a Tree3based control

Chapter % M

S'STEM M&INTEN&NCE
M.1 U,er Man/al

/&

'ser Manual is a document for novice users that explains how to use or operate software. 7t contains instructions about how to navigate through the application J%.%K.

M.1.1 >a5a &ppli3ation (i?ar4


i"ard is meant to design 'ser 7nterface i.e., placing of A T controls at desired place. #. Pou can provide )atabase connection also to the controls placed. %. The controls can be created in two ways N a. Through Speech 2ecognition b. Through )rag3and3)rop (rocess from Tool )ialog or from Tools Menu. &. The properties for the $ontrols can be set through (roperty Sheet.

a. Spee3h Re3o9nition
Actual 7nput given in the form of speech i.e., that control in a file. Spee3h Inp/t Futton Textfield Cabel $hec!box Cist $hoice Lori"ontal Scroll Far Iertical Scroll Far $hec!box =roup 2adioFutton It, o/tp/t )isplays a Futton on the wi"ard. )isplays a Textfield on the wi"ard. )isplays a Cabel on the wi"ard. )isplays a $hec!box on the wi"ard. )isplay a Cist box on the wi"ard. )isplay a $hoice box on the wi"ard. )isplay a Lori"ontal Scroll Far on the wi"ard. )isplay a Iertical Scroll Far on the wi"ard. )isplay a $hec!box =roup on the wi"ard. $onvert $hec!box =roup to 2adio Futton on the wi"ard. ave form, the >xpected output is display of that particular control on the screen and automatic code generation for

b. Men/ Option,
OnCli3@ ?;ileA Menu ?1ew i"ardA option ?Java Text(adA option It, O/tp/t )isplays ;ile Menu )isplays a 1ew i"ard to develop another 7nterface S!ips control to Java Text(ad Module

/+

?CoadA option ?Save ;rameAppA option ?Save AppletA option ?$onnectA option ?>xitA option ?>ditA Menu ?'ndoA option ?$utA option ?$opyA option ?(asteA option ?IiewA Menu ?Tool )ialogA option ?(ropertiesA option ?;oregroundA option ?Fac!groundA option ?SourceA option ?ToolA Menu ?2unA Menu ?$ompileA option ?2unA option ?2un AppletA option ?LelpA Menu ?About i"ardA option ?2unA option ;ont $hoice Si"e $hoice ?;bA Futton ?;iA Futton ?;pA Futton ?;biA Futton

)isplays ?*pen ;ile )ialog`A to load already $reated ? .datA file )isplays ?Save ;ile )ialog`A to save the designed interface as ;rame application i.e., ?.datA 9 A.javaA file )isplays ?Save ;ile )ialog`A to save the designed interface as Applet application i.e., ?.datA, A.javaA 9 ?.htmlA file )isplays ?Table CistA dialog box to process )atabase connection. >xits from Java Application i"ard )isplays >dit Menu $ancels the previous action $uts the control to move or to delete $opies the control (aste the control wherever desired )isplays Iiew Menu )isplays ToolFar with #B $ontrols. *n$lic! of each control create a instance of that control )isplays (roperty Sheet with appropriate (roperties of selected control to set properties )isplays ;ore =round $olor $hooser )isplays Fac! =round $olor $hooser )isplays Source code of selected file )isplays #B $ontrols, *n$lic! of each control create a instance of that control )isplays 2un Menu )isplays ?$ompile ;ile..A )ialog box to select file to be compiled i.e., to execute javac )isplays ?2un ;ile..A )ialog box to select .class file to execute it. )isplays ?2un Applet ;ile..A )ialog box to select .html file to execute it )isplays Lelp Menu )isplays content about wi"ard )isplays $ompany (rofile )isplays drop3down menu to select font type of control tile )isplays drop3down menu to select font si"e of control tile Ma!es selected control title Fold Ma!es selected control title 7talic Ma!es selected control title (lain text Ma!es selected control title Fold 9 7talic

M.1.2 >a5a Te8tPa4


OnCli3@ ?;ileA Menu ?$lear Text(adA option It, o/tp/t )isplays ;ile Menu $lear whatever text on the Text(ad

/,

?1ew i"ard IiewA option ?*pen ;ileA option ?Save ;ileA option ?Save ;ile As..A option ?>xit Text(adA option ?>ditA Menu ?;ormatA Menu ?;ontA option ?;oregroundA option ?Fac!groundA option ?FuildA Menu ?$ompileA option ?2unA option ?2un AppletA option ?LelpA Menu ?Java LelpA option ?Javax LelpA option ;ont $hoice Si"e $hoice ?;bA Futton ?;iA Futton ?;pA Futton ?;bAi Futton

S!ip control to Java Application i"ard Module )isplays ?*pen ;ile..A )ialog box to load already $reated ? .javaA or ?.htmlA file )isplays ?Save ;ile..A )ialog box to save the code as A.javaA file )isplays ?Save ;ile As`A )ialog box to save another copy of the file >xit from Java Text(ad )isplays options to $ut, $opy 9 (aste )isplays ;ormat Menu )isplays ?;ontA )ialog box to set ;ont Type, Si"e 9 Style. )isplay ;ore =round $olor $hooser )isplay Fac! =round $olor $hooser )isplay Fuild Menu )isplays ?$ompile ;ile`A )ialog box to select .java file to be compiled i.e., to execute javac )isplays ?2un ;ile`A )ialog box to select .class file to execute it. )isplays ?2un Applet ;ile..A )ialog box to select .html file to execute it )isplays Lelp Menu )isplays Java Lelp dialog box to display class 9 method description available in java Applet. )isplays Javax Lelp dialog box to display class 9method description available in Java Swing. )isplays drop3down menu to select font type of code in Text(ad )isplays drop3down menu to select font si"e of code in Text(ad Ma!es code in Text(ad Fold Ma!es code in Text(ad 7talic Ma!es code in Text(ad (lain text Ma!es code in Text(ad Fold 9 7talic

CONC"USION

/.

A ;ramewor! for creation of all A T controls through secure speech 2ecognition in Java )evelopment facilities in Java. The future enhancement are Automatic updation of code on any change in property sheet, (roviding Speech recognition for other facilities in Java for example, if user say ?*penA a file has to be opened etc., *1H*;; of Speech engine according to the need of user, (roviding Speech 2ecognition through other languages also. i"ard has been provided it can be enhanced for all

!I!"IO$R&PH'
//

1. !oo@,
#. $ay S. Lortsman and =ary $ornell, $ore Javaa % Iolume 7 < ;undamentals /th >dition, (earson >ducation < Sun Microsystems %. Joshua Floch, >ffective Java (rograming Canguage =uid, (earson >ducation < Sun Microsystems &. 2. (ressman, Sofware >ngineering < A (ractitioner-s Approach, Tata Mc=raw3 Lill +. Lerbert Schildt, The $omplete 2eference Java %, Tata Mc=raw3Lill.

2. (eb,ite,
#. www.java.sun.comHproductsHjava3classses %. www.encyclopedia%.thefreedictionary.com &. www.java.sun.comHproductsHjava3mediaHspeech

0. & rame<or@ for Se3/re Spee3h Reo9nition


7>>> Transactions on Audio, Speech and Canguage (rocessing Iol #,, 1o. +. May %BB/

/0

&PPENDIN - &

SCREEN SHOTS

&1 Main S3reen for enterin9 in to the S:,tem

/8

&2 >a5a &ppli3ation (i?ar4

0B

&0 Interfa3e De,i9n thro/9h Spee3h Re3o9nition

0#

&1 & U,er Interfa3e De,i9n Thro/9h Dra9-an4-Drop Pro3e,,

0%

&2 Databa,e Conne3tion (i?ar4

0&

&A Tool Dialo9 an4 it, Propert: Sheet

0+

&K >a5a Te8tPa4

0,

&L &/tomati3 Co4e $eneration

0.

&M Color Choo,er

0/

&1O

ile Dialo9 !o8

00

&11 Help S3reen

&PPENDIN % !
08

C&SE STUD' ON SPEECH RECO$ITION THROU$H I!M #I& #OICE


Automatic Speech 2ecognition 5AS26 is technology that allows a computer to identify the words that a person spea!s into a microphone or telephone. Speech recognition is the process of converting an acoustic signal, captured by a microphone or a telephone, to a set of words. The recogni"ed words can be the final results, as for applications such as commands 9 control, data entry, and document preparation. The Dholy grailD of AS2 research is to allow a computer to recogni"e in real3time with #BB] accuracy all words that are intelligibly spo!en by any person, independent of vocabulary si"e, noise, spea!er characteristics and accent, or channel conditions. )espite several decades of research in this area, accuracy greater than 8B] is only attained when the tas! is constrained in some way. )epending on how the tas! is constrained, different levels of performance can be attainedQ for example, recognition of continuous digits over a microphone channel 5small vocabulary, no noise6 can be greater than 88]. 7f the system is trained to learn an individual spea!er:s voice, then much larger vocabularies are possible, although accuracy drops to somewhere between 8B] and 8,] for commercially3available systems. ;or large3vocabulary speech recognition of different spea!ers over different channels, accuracy is no greater than 0/], and processing can ta!e hundreds of times real3 time. Speech is the part of a domain for communication between humans and machines Speech recognition is the tas! of mapping from a digitally encoded acoustic signal to a string of words. Speech understanding is the tas! of mapping from the acoustic signal to an interpretation of the meaning of the alterance. 7n this system, a attempt has been made to create A T controls on a specified wi"ard through speech recognition using 7FM Iia Ioice Speech 2ecognition >ngine. I!M #ia#oi3e is a range of language3specific continuous speech recognition software products offered by 7FM. 7t is 7FM:s award3winning Speech 2ecognition technology that enables a computer to respond to the human voice in place of a !eyboard mouse. 7t allows you to interact with machines in the same way you interact with people 3 through natural speech. ... 7t can deliver true large3vocabulary continuous speech recognition

8B

This Ioice recognition software is an extremely helpful tool when you have multiple projects to complete. The software can be used to dictate text to your computer, which can be a great way to enter text without using the !eyboard. 7FM IiaIoice voice recognition software can also allow you to control other computer applications Euic!ly and easily, leaving your hands free for other things. Pro3e4/re to U,e the Soft<are Step # >nsure your computer meets the minimum system reEuirements. 7FM IiaIoice software will wor! on any 80 to are only ,#% MF for use on Step % 7nstall the 7FM IiaIoice software. 7nsert the IiaIoice $) into your computer and follow the instructions in the installer. 7f the installer doesn:t automatically start, you can start it manually by going to Start 3S 2un, typing D)N\setupD 5where )N is your $)32*M drive6 and pressing D>nter.D Step & Start the 7FM IiaIoice Ioice$enter software. 7t should open automatically after the installer is finished, but if it doesn:t, clic! on Start 3S (rograms 3S 7FM IiaIoice Ioice$enter. Step + ;ollow the 'ser i"ard dialog to set up a profile. ith the 7FM IiaIoice software, each individual user must set up his own profile. Step , Set up your microphone, using the Audio Setup normal voice. i"ard 5it will begin automatically6. ;ollowing the directions on the screen, read the provided paragraph in a indows operating system, ranging from indows indows Iista, and on any $(' that is .BBML" or faster. The 2AM reEuirements indows @(

8#

Step . $reate a voice model. 2eading the paragraph out loud will train the 7FM IiaIoice software to recogni"e your voice. As the program recogni"es words, it will turn your on3 screen words from blac! to gray. 7f it doesn:t recogni"e a word, !eep saying it until it is recogni"ed. Step / 2ecord your voice. 2ecording about #B to &B minutes of your voice can help train the 7FM IiaIoice software. 7t allows the software to do an in3depth analysis that:s not possible to complete in real time. This System is develop based on 1C(H72 concept. 1C( 51atural Canguage (rocessing6 is a subfield of Artificial 7ntelligene and computational linguistics. 7t studies the problems of automated generation and understanding of natural human languages. 1atural3Canguage generation systems convert information from computer databases into normal3sounding human language. 1atural3language understanding system convert samples of human language into more formal representations that are easier for computer programs to manipulate. 7t is a very attractive method of human3computer interaction. This process is done through 7FM via voice software which has been discussed above. 7nformation 2etrieval5726 is the science of searching for information in documents, searching for documents themselves, searching for metadata which describe documents, or searching within databases, whether relational stand3lone databases or hypertextually < networ!ed databases such as the www. Lere, databases is nothing but a command set which is !ept in a separate folder. ;irst of all, spo!en words are captured by the 7FM via voice engine. The captured data is converted into Streams 9 to!eni"ed. The to!ens are validated using the grammer file which is defined using JS=;5Java Speech =rammer ;ile6, this is the process of 1atural Canguage (rocessing. The valid to!ens are verified whether they match with any element of the command set, this is the process of 7nformation 2etrieval.

8%

S-ar putea să vă placă și