training report on j2se

33
Page 1 | 33 A TRAINING REPORT ON NOTEPAD-TEXT EDITORSUBMITTED FOR THE PARTIAL FULFILLMENT OF THE REQUIREMENT OF THE DEGREE OF BACHLOR OF TECHNOLOGY IN COMPUTER SCIENCE AND ENGINEERING (RAJASTHAN TECHNICAL UNIVERSITY) DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Submitted To: Submitted By: Prof. RITURAJ JAIN CHHATRAPAL CHOUDHARY HOD (CSE) B.Tech. 6 th Sem. 12EVECS007 VYAS INSTITUTE OF ENGINEERING AND TECHNOLOGY NH. 65, NEAR KUDI HAUD, PALI ROAD, JODHPUR- 342001

Upload: chhatrapal-choudhary

Post on 10-Jul-2016

229 views

Category:

Documents


0 download

DESCRIPTION

This is training report on J2SE , here we develop notepad type text editor.

TRANSCRIPT

Page 1: Training Report on J2SE

P a g e 1 | 33

A

TRAINING REPORT

ON

“NOTEPAD-TEXT EDITOR”

SUBMITTED FOR THE PARTIAL FULFILLMENT OF THE

REQUIREMENT OF THE

DEGREE

OF

BACHLOR OF TECHNOLOGY

IN

COMPUTER SCIENCE AND ENGINEERING

(RAJASTHAN TECHNICAL UNIVERSITY)

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Submitted To: Submitted By: Prof. RITURAJ JAIN CHHATRAPAL CHOUDHARY

HOD (CSE) B.Tech. 6th Sem.

12EVECS007

VYAS INSTITUTE OF ENGINEERING AND TECHNOLOGY

NH. 65, NEAR KUDI HAUD, PALI ROAD,

JODHPUR- 342001

Page 2: Training Report on J2SE

P a g e 2 | 33

VYAS INSTITUTE OF ENGINEERING AND TECHNOLOGY

Department of Computer Science & Engineering

CERTIFICATE

This is to certify that this Training report “Notepad- Text Editor” is the

excellence work of “ CHHATRAPAL CHOUDHARY ” Roll No.

“12EVECS007” carried out in partial fulfillment for the award of degree

of B.TECH of RAJASTHAN TECHNICAL UNIVERSITY under my

supervision.

Signature

Prof. RITURAJ JAIN

HOD (CSE)

Vyas Institute of Engineering

and Technology

Page 3: Training Report on J2SE

P a g e 3 | 33

ACKNOWLEDGEMENT

I sincerely express my gratitude to my guide “S. Alfozen” for his benevolent

guidance in completing the report on “NOTEPAD-TEXT EDITOR”. His kindness

and help have been the source of encouragement for me.

I am grateful to him for the guidance, inspiration and constructive suggestions

which were helpful in the preparation of this Project.

CHHATRAPAL CHOUDHARY

B.Tech. 6th Sem.

12EVECS007

Page 4: Training Report on J2SE

P a g e 4 | 33

ABSTRACT

This report describes the implementation of “Notepad- Text Editor”. It uses the

java swings to design its user interface, java.io package for perform the input

functionality and buffer is used to store the data in memory. The system can be

used to create text and perform all the functionality like copy, cut, paste, save, etc.

We can further develop the system and make it a large functionality based text

editor. We can also add coding area for developers.

Page 5: Training Report on J2SE

P a g e 5 | 33

COMPANY PROFILE

DMatics, the IT Learning Solutions Corporation, is known for its pioneering work

in the fields of IT education and training. Our strong research has helped us

continuously innovate in the areas of instructional design methodologies, and

curricula development that is cutting-edge and most advanced.

DMatics, the brainchild of S Alfozen, it’s CEO, pioneered and nurtured the

concept of Extreme Programming Expertise. Set up in 1999, DMatics has given

a new meaning to IT Education. Committed to providing advanced IT skills to

students and professionals, DMatics has evolved into a Training Powerhouse.

The institute provides a comprehensive education environment to individuals and

enterprises, offering training that is customized to the varied needs of audiences

with diverse backgrounds.

Over the last 16 years, DMatics has enabled young engineers to become familiar

with the key tools of emerging IT and Internet age. Our initiatives, aimed at

narrowing the digital divide, have helped young engineers gain access to advanced

programming skills and enjoy programming expertise.

We have a responsibility beyond simply providing education. Research, neutrality,

developing tomorrow’s leaders, cultivating a breadth of learning… all these

endeavors and more are important components, when our philosophy and vision is

‘EXPERTISE’.

From a technical perspective DMatics has done outstanding work. We are quite

happy with the way our trainings look and operate. Most impressive has been

DMatics’s ability to make its training programs fully compliant with the

demanding standards of the industry.

Research and Development is central to DMatics’ IT learning philosophy. It is a

core strength that helps us identify the emerging market needs, leads us to create

new learning methodologies and techniques, helps us refine our curriculum,

making it cutting edge, and enables us to improve our education delivery. Our

pioneering efforts in the understanding of human cognition have added to the

learning effectiveness of our offerings.

Page 6: Training Report on J2SE

P a g e 6 | 33

INDEX

S No. Title Page

1 INTRODUCTION 7-22

1.1 What is Java

1.1.a History of Java

1.1.b The Java “White Paper” Buzzwords

1.2 Lexical issues

1.3 Standard Organization of Java SDK

1.4 Constructors

1.5 Inheritance

1.6 Packages

1.7 Interfaces

1.8 Exception Handling

1.9 String Class

1.10 Multithreading

1.11 Applets

1.12 Event Handling

1.13 AWT

1.14 Swings

2. PROJECT OVERVIEW 23.

3. FUNCTIONAL DESCRIPTION 24

4. OPERATIONAL SUPPORT 25

5. DESIGNING PROCESS 26-30

6. FEASIBLITY ANALYSIS 31

7. CONCLUSION 32

8. BIBLOGRAPHY/ REFERENCESS 33

Page 7: Training Report on J2SE

P a g e 7 | 33

1. INTRODUCTION TO JAVA

1.1 WHAT IS JAVA

Java was conceived by James gosling, Patrick Naughton, Chris Warth,

Ed Frank, and Mike Sheridan at Sun Microsystems, Inc. In 1991. It took 18

months to develop the first working version. This language was initially called the

“OAK”, but was renamed “JAVA” in 1995. Because of the similarities between

Java and C++, it is tempting to think of Java as simply the “Internet version of

C++”.

Dig 1 . Java Process

JVM:

JAVA

Application

(Console based) Applet (Window based)

Page 8: Training Report on J2SE

P a g e 8 | 33

Bytecode is a highly optimized set of instruction designed to be executed by the

Java run time System, which is called the “Java Virtual Machine (JVM)”. It is

an interpreter for bytecode.

JDK:

JDK stands for Java Development kit. It provides the Environment to run Java

programs. There are three JDK editions:

Java Standard Edition (J2SE)

J2SE can be used to develop client-side standalone applications

or applets.

Java Enterprise Edition (J2EE)

J2EE can be used to develop server-side applications such as

Java servlets and Java Server Pages.

Java Micro Edition (J2ME)

J2ME can be used to develop applications for mobile devices

such as cell phones.

1.1.1 History:

Since 1995, Java has changed our world . . . and our expectations. Today, with technology such a part of our daily lives, we take it for granted that we can be connected and access applications and content anywhere, anytime. Because of Java, we expect digital devices to be smarter, more functional, and way more entertaining.

In the early 90s, extending the power of network computing to the activities of everyday life was a radical vision. In 1991, a small group of Sun engineers called the "Green Team" believed that the next wave in computing was the union of digital consumer devices and computers. Led by James Gosling, the team worked around the clock and created the programming language that would revolutionize our world – Java.

Page 9: Training Report on J2SE

P a g e 9 | 33

The Green Team demonstrated their new language with an interactive, handheld home-entertainment controller that was originally targeted at the digital cable television industry. Unfortunately, the concept was much too advanced for the them at the time. But it was just right for the Internet, which was just starting to take off. In 1995, the team announced that the Netscape Navigator Internet browser would incorporate Java technology.

Today, Java not only permeates the Internet, but also is the invisible force behind many of the applications and devices that power our day-to-day lives. From mobile phones to handheld devices, games and navigation systems to e-business solutions, Java is everywhere!

1.1.2 The Java “White Paper” Buzzwords

The authors of Java have written an influential white paper that explains their

design, goals and accomplishments. The white paper is organized along the

following Buzzwords:

Simple Portable Object Oriented

Interpreted Distributed High

Performance

Robust Multi-Threaded Secure

Dynamic Architecture Neutral

1. Simple

The syntax of Java is a cleaned-up version of the syntax for C++. There is

no need for header files, pointer, structures, unions, operator overloading, virtual

base classes, and so on. The another aspect of being simple is being small. One of

the goals of Java is to enable the construction of software that can run stand alone

in small machines.

2. Portable

In Java, there are no implementation-dependent aspects of the

specification. The libraries that are part of the system define portable interfaces.

For e.g. there is an abstract window class and implementation of it for Unix,

Windows, Macintosh.

Page 10: Training Report on J2SE

P a g e 10 | 33

3. Object-Oriented

Object Oriented design is a technique for programming that focuses

primarily on the data (Objects) and on the interfaces to that object.

4. Interpreted

The Java interpreter can execute Java Bytecodes directly on any machine

to which the interpreted has been ported.

5. Distributed

Java has an extensive library of routines for coping with TCP/IP protocols

like HTTP and FTP. Java applications can open and access objects across the Net

via URLs with the same ease as when accessing a local file system.

6. High Performance

While the performance of interpreted bytecodes is usually more than

adequate, there are situations where higher performance is required. The

bytecodes can be translated on the fly (at run time) into machine code for the

particular CPU the application is running on.

7. Robust

Java is intended for writing programs that must be reliable in a variety of

ways. Java puts a lot of emphasis on early checking for possible problems, later

dynamic (run-time) checking, and eliminating situations that are error-prone.…

The single biggest difference between Java and C/C++ is that Java has a pointer

model that eliminates the possibility of overwriting memory and corrupting data.

8. Multi-Threaded

Page 11: Training Report on J2SE

P a g e 11 | 33

The benefits of multithreading are better interactive responsiveness and real-time

behavior. If you have ever tried to do multithreading in another language, you will

be pleasantly surprised at how easy it is in Java. Threads in Java also can take

advantage of multiprocessor systems if the base operating system does so. On the

downside, thread implementations on the major platforms differ widely, and Java

makes no effort to be platform independent in this regard

9. Secure

Java is intended to be used in networked/distributed environments. Toward

that end, a lot of emphasis has been placed on security. Java enables the

construction of virus-free, tamper-free systems.

10. Dynamic

In a number of ways, Java is a more dynamic language than C or C++. It

was designed to adapt to an evolving environment. Libraries can freely add new

methods and instance variables without any effect on their clients. In Java, finding

out run time type information is straightforward.

1) Static binding in Java occurs during Compile time while Dynamic

binding occurs during Runtime. 2) private, final and static methods and variables

uses static binding and bonded by compiler while virtual methods are bonded

during runtime based upon runtime object.

11. Architecture Neutral

The compiler generates an architecture-neutral object file format—the

compiled code is executable on many processors, given the presence of the Java

runtime system.

To enable a Java application to execute anywhere on the network, the

compiler generates an architecture-neutral object file format--the compiled code is

executable on many processors, given the presence of the Java runtime system.

Page 12: Training Report on J2SE

P a g e 12 | 33

1.2 Lexical Issues

1. white spaces

Space bar, new-line, tab.

2. identifier

Variables name, methods name, and class name are called identifiers.

3. literals

15, 18.1, ‘X’, “Hello World”.

4. comments

1. Line Comment using //

2. Block Comment using /* */

3. Documentation Comment /** */

5. separators

() {} [] , . ;

6. keywords

There are 49 keywords in java. These keywords cannot be used as

identifiers.

1.3 Standard Organization of Java SDK

\jdk

Docs Contains Library Documentation in HTML format

Bin Contains Application Development Tools

Demo Contains Demonstration Programs

Lib Contains Library Files

Src Contains Library Source

Page 13: Training Report on J2SE

P a g e 13 | 33

1.4 Constructor

In class-based object-oriented programming, a constructor (abbreviation:

ctor) in a class is a special type of subroutine called to create an object. It

prepares the new object for use, often accepting arguments that the

constructor uses to set required member variables.

It is the same name as that of a class.

It looks like a method but it is not exactly a method.

There is no return type.

Constructor should be public type.

It is called implicitly or automatically at the time of class

instantiation.

It is a first block that is called by a java.

Types of constructor:

1. Default Constructor

2. Argumented Constructor

3. Copy Constructor

1.5 Inheritance

A class that is derived from another class is called subclass and inherits all fields

and methods of its superclass. In Java, only single inheritance is allowed and thus,

every class can have at most one direct superclass. A class can be derived from

another class that is derived from another class and so on.

Types of Inheritance in JAVA:

1. Single Inheritance:

Page 14: Training Report on J2SE

P a g e 14 | 33

Single inheritance is damn easy to understand. When a class extends

another one class only then we call it a single inheritance. The below flow

diagram shows that class B extends only one class which is A. Here A is a

parent class of B and B would be a child class of A.

2. Multilevel Inheritance:

Multilevel inheritance refers to a mechanism in OO technology where one

can inherit from a derived class, thereby making this derived class the base

class for the new class. As you can see in below flow diagram C is

subclass or child class of B and B is a child class of A. For more details

and example refer

3. Hierarchical Inheritance:

In such kind of inheritance one class is inherited by many sub classes. In

below example class B, C and D inherits the same class A. A is parent

class (or base class) of B, C & D.

In Java Parent Class are known as Super class and child class is known as Sub

class.

1.6 Packages

It is a folder which contains subfolders and .class files or, in another words

Package is a collection of .class files and sub packages.

A package is a grouping of related types providing access protection and

name space management. Note that types refer to classes, interfaces,

enumerations, and annotation types. Enumerations and annotation types

are special kinds of classes and interfaces, respectively, so types are often

referred to in this lesson simply as classes and interfaces

To import a package in another class, the syntax is:

Import package-name.classname

Page 15: Training Report on J2SE

P a g e 15 | 33

1.7 Interface

It is an abstract class. we declare the methods in an abstract class and the

definition of all methods declare in an Interface must be defined in its child class.

Java does not support multiple inheritance using extends keyword but it is

possible with the help of interface. Here we use the implements keyword. an

interface is a reference type, similar to a class, that can contain only constants,

method signatures, and nested types. There are no method bodies. Interfaces

cannot be instantiated—they can only be implemented by classes or extended by

other interfaces.

1.8 Exception handling

Run time errors are called Exception Handling. Exceptions are generating when

an abnormal condition are existing and execution of the program stop. Even

programmer doesn’t know which type of error can be generated to handle these

type of errors we use Exception handling.

An exception is a representation of an error condition or a situation

that is not the expected result of a method.

Exceptions are built into the Java language and are available to all

program code.

Exceptions isolate the code that deals with the error condition from

regular program logic.

Types of Exception Handling

Checked (Reported Exception)

o Checked exceptions include errors such as “array index out of

bounds”, “file not found” and “number format conversion”.

Unchecked (Un Reported Exception)

Page 16: Training Report on J2SE

P a g e 16 | 33

o Unchecked exceptions include errors such as “null pointer”, “class

not found”, “Interrupted Exception”.

To handle exception:

o To handle the exception, you write a “try-catch” block. To pass the

exception “up the chain”, you declare a throws clause in your method or

class declaration.

o If the method contains code that may cause a checked exception, you

MUST handle the exception OR pass the exception to the parent class

(remember, every class has Object as the ultimate)

7

Example

try {

… normal program code

}

catch(Exception e) {

… exception handling code

}

1.9 String Class

Java Implements string through a class called ‘String’. The ‘String’ class is

defined in the package ‘java.lang’, which is automatically imported in all java

programs The ‘String’ class is declared as final hence it cannot be sub-classed.

The 'String’ object represents a fixed length immutable character.

There are many function which are used in string class methods:

int length()

character charAt()

Boolean equalsIgnoreCase(str)

Page 17: Training Report on J2SE

P a g e 17 | 33

Boolean endsWith(str)

Boolean startsWith(str)

int indexOf(char)

int lastIndexOf(char)

string concat(string)

String replace()

String trim()

String toLowerCase()

String toUpperCase()

Function which are used in string buffer class:

int length()

int capacity()

char charAt(int where)

string insert()

string reverse()

string delete()

string substring()

1.10 Multithreading

The benefits of multithreading are better interactive responsiveness and

real-time behavior. If you have ever tried to do multithreading in another

language, you will be pleasantly surprised at how easy it is in Java. Threads in

Java also can take advantage of multiprocessor systems if the base operating

system does so. On the downside, thread implementations on the major platforms

differ widely, and Java makes no effort to be platform independent in this regard.

it is smallest part of a program.

Page 18: Training Report on J2SE

P a g e 18 | 33

C.P.U execute one thread at a time if we divide our program in

multiple threads that program is called Multithreaded program.

There are two process to create a thread

By Thread class

By Runnable class

Methods use for a single thread are:

Thread currentThread()

String getName()

int getPriority()

void setName(String)

void setPriority(int)

void sleep (long ms)

Methods use for a multithreading threads are:

void run()

void start()

1.11 Applets

A Java applet is a small application which is written in Java and delivered

to users in the form of bytecode. The user launches the Java applet from a web

page, and the applet is then executed within a Java Virtual Machine (JVM) in

a process separate from the web browser itself.

The Applets are used to provide interactive features to web applications that

cannot be provided by HTML alone. They can capture mouse input and also

have controls like buttons or check boxes. In response to user actions, an

applet can change the provided graphic content. This makes applets well-

suited for demonstration, visualization, and teaching. There are online applet

collections for studying various subjects, from physics to heart physiology.

An applet can also be a text area only; providing, for instance, a cross-

platform command-line interface to some remote system. If needed, an applet

Page 19: Training Report on J2SE

P a g e 19 | 33

can leave the dedicated area and run as a separate window. However, applets

have very little control over web page content outside the applet's dedicated

area, so they are less useful for improving the site appearance in general

(while applets like news tickers or WYSIWYG editors are also known).

Applets can also play media in formats that are not natively supported by the

browser.

1.12 Event Handling

• Every time a user types a character or pushes a mouse button, an event

occurs.

• Any object can be notified of an event by registering as an event listener

on the appropriate event source.

• Multiple listeners can register to be notified of events of a particular type

from a particular source.

Event handling process is describe below ( using diagram) : -

Dig. 2 Event Handling in AWT

Page 20: Training Report on J2SE

P a g e 20 | 33

Types of Event Listeners

ActionListener

Window Listener

MouseListener, etc.

Implement event handler

Implement a listener interface or extend a class that implements a listener

interface.

Register an instance of the event handler class as a listener upon one or

more components. Implement the methods in the listener interface to

handle the event

1.13 AWT

The classes and interfaces of the Abstract Windowing Toolkit (AWT) are used to

develop stand-alone applications and to implement the GUI controls used by

applets. These classes support all aspects of GUI development, including event

handling. The Component and Container classes are two of the most important

classes in the java.awt package. The Component class provides a common

superclass for all classes that implement GUI controls. The Container class is a

subclass of the component class and can contain other AWT components. The

Window class is a subclass of the Container class that provides a common set

of methods for implementing windows. The Window class has two subclasses,

Frame and Dialog, that are used to create Window objects. The Frame class

is used to create a main application window, and the Dialog class is used to

implement dialog boxes.

AWT classes:

Page 21: Training Report on J2SE

P a g e 21 | 33

BorderLayout

Button

CheckBox

Frame etc.

AWT support the following types of control:

Labels

Push buttons

Checkbox

Lists

Scroll bar

1.14 Swing

Java Swing is a part of Java Foundation Classes (JFC) that is used to create

window-based applications. It is built on the top of AWT (Abstract Windowing

Toolkit) API and entirely written in java.

Unlike AWT, Java Swing provides platform-independent and lightweight

components.

• Swing provides many standard GUI components such as buttons, lists,

menus, and text areas, which you combine to create your program's GUI.

• Swing provides containers such as windows and tool bars.

– top level: frames, dialogs

– intermediate level: panel, scroll pane, tabbed pane, ...

– other Swing components: buttons, labels, ...

Page 22: Training Report on J2SE

P a g e 22 | 33

• Every program that presents a Swing GUI contains at least one top-level

container.

• A Top level container provides the support that Swing components need to

perform their painting and event-handling.

Swing provides three top-level containers:

– JFrame (Main window)

– JDialog (Secondary window)

– JApplet (An applet display area within a browser window)

• Swing features:

– The Swing Components

• Dialog, Tabbed pane, Buttons, File Chooser, ... Pluggable

Look and Feel

Page 23: Training Report on J2SE

P a g e 23 | 33

2 PROJECT OVERVIEW

A Text editor is one, which allows one to write and create text documents, edit

them, save them, replace them, find certain words in them etc. In one word it is

one, which allows some body to edit texts. Text editors are one of the most

essential and important part of any computation and development process. It

allows somebody to edit text for either documentation or programming. Some of

the most used text editors are Notepad, WordPad, VI editor etc. All these text

editors have their own ways of functioning and facilities. Some of these works in

extensive graphics mode and support stuffs like images and hyperlink where the

others generally provide the users with the common function that allows them to

carry out common text related operation. If somebody needs to compare the

earlier day’s editor with the modern editors there are too many differences to be

listed out. The modern computation revolution has given birth to many text editors

whose responsibilities are much wider than only to be restricted to text related

operation. They support extreme graphics plug ins and real time email or internet

binding. But the older editors only used to work with command.

As we got the opportunity to build the text editor our concept was as simple as

that of VI editor. Keep the things as simple as possible. The simplicity wins over

the complexity in most time or not. We wanted to develop which takes as little

memory as one can imagine. Therefore, we entirely worked into a pure text mode

editor and wanted not to use any interrupt services. At the same time, we wanted

to provide the user with the options that would be sufficient for him to be work

with the editor flawlessly.

Page 24: Training Report on J2SE

P a g e 24 | 33

3. FUNCTIONAL DESCRIPTION

Text editor responsibilities can be summarizing as follows

1. Write documents

2. Open Documents

3. Save them

4. Save them is a different file

5. Copy a line or word and paste them is some other places

6. Insert words

7. Find and replace the words

8. Select proper directory to save the file

The user needs an editor where he can type the document with support for all the

keyboard keys and characters. As he enters the text he needs to save them. For

saving a directory needs to be selected. The directories are essentially file link lists,

hence for saving a new file node needs to be opened corresponding to the directory

and attach the document with the node. The user needs to open the file some time

else hence the options must be provided for him to be able to open the file. The

opening the file means caching the file in a buffer. This is done by dynamically

allocating the memory to a buffer and extracts the file characters in this buffer. This

buffer is then placed in the editor area. The most important part of editor is to

support the back editing.

Page 25: Training Report on J2SE

P a g e 25 | 33

4. OPERATIONAL SUPPORT

Our text editor supports the following functionality.

1. Create a new text file

2. Save the file

3. Save the file with a different name

4. Search and replace words in the document

5. Delete a particular line

6. Copy from a file and paste in other file

We have provided an editing area by initiating a character scanning operation. The

characters are subsequently placed in a buffer from this area. Whenever the user

wants to use any above-mentioned operation, a hot key combination is provided.

For saving the file the with a different name option is ctrl+a, whereas for saving

ctrl+s. For deleting a line ctrl+l. Once a line delete operation is requested the editor

asks the user for the line number which he wants to delete. Once the file is deleted

all the other lines are rearranged. For searching and replace ctrl+ is used. Thus only

by using some key combination the user can carry out all the required functionality.

The only disadvantage of this editor is that it does not support back editing. That is

whenever the user needs to change some intermediate values it is not allowed. It

may be a major setback considering all the modern editors. We wanted to justify

that all cannot be achieved at once. The editor is only 3kb and hence can be operated

from a floppy. This is such a huge advantage for micro systems for which a little

drawback can be considered. It is a platform independent editor also. That is, it can

be run on any platform, as it does not use file type of any specific type. Rather it

uses a general file handling method, which is supported by all the platforms.

Page 26: Training Report on J2SE

P a g e 26 | 33

5. DESIGNING PROCESS

A simple text editor can be designed by taking a huge buffer where the text would

be saved. This temporary buffer would contain the text. The text can be accepted

from the user one character at a time using getchar() or getc() functions. Once user

asks to save the document the file name must be asked from the user. A file is

opened in the write mode and the text would be written. Opening a file in read

mode and reading the file into the buffer can open Similarly document. The buffer

can be then displayed. The options can be asked from the user by any key

combinations like shortcut keys or the hot keys. The copy paste can be achieved

by asking the user to mention the line numbers whose enclosed text must be

copied. For copying ‘\n’ are counted first and then the first character

corresponding to the first copy line and the last line for the copy is find out. The

characters in that area are then extracted in a buffer. This buffer is appended in the

resultant file. Deleting a line is all about removing the characters of a particular

line and shifting all the post characters in that area.

Components are used the front end (GUI) of the application and project:

1. Button

2. Canvas

3. Checkbox

4. Choice

5. Label

6. List

7. Scrollbar

8. Text Component

Page 27: Training Report on J2SE

P a g e 27 | 33

Dig.3 Components used for front-end Application

Data Flow Diagram

A data flow diagram (DFD) is a graphical representation of the "flow" of data

through an information system, modelling its process aspects. A DFD is often

used as a preliminary step to create an overview of the system, which can later be

elaborated. DFDs can also be used for the visualization of data processing

(structured design).

A DFD shows what kind of information will be input to and output from the

system, where the data will come from and go to, and where the data will be

stored. It does not show information about the timing of process or information

about whether processes will operate in sequence or in parallel

Here we create a Data Flow Diagram (DFD) of Notepad- Text Editor, which

shows the data flow in Text Editor:

Page 28: Training Report on J2SE

P a g e 28 | 33

Dig 4. Data Flow Diagram

ERD Diagram (Entity Relationship Diagram)

In software engineering, an entity–relationship model (ER model) is a data model

for describing the data or information aspects of a business domain or its process

requirements, in an abstract way that lends itself to ultimately being implemented

in a database such as a relational database. The main components of ER models

are entities (things) and the relationships that can exist among them.

Entity–relationship modeling was developed by Peter Chen and published in a

1976 paper. However, variants of the idea existed previously, and have been

devised subsequently such as supertype and subtype data entities and

commonality relationships.

Page 29: Training Report on J2SE

P a g e 29 | 33

Dig.5 Entity Relationship diagram

Shortcut keys created in this project:

1. New- Clt+N

2. Open- Clt+O

3. Save- Clt+S

4. Exit- Clt+Q

5. Font- Clt+F

6. Replace- Clt+R

7. Text Color- Clt+T

Menu:

1. File

2. Edit

Page 30: Training Report on J2SE

P a g e 30 | 33

3. Format

Menu Items:

1. File-

a. New: For Creating New Files

b. Open: For Open Saved File

c. Save: For Save File in System

d. Save as: Save File with different Name

e. Exit: For Exit Text Editor

2. Edit-

a. Replace: For Replacing and Finding a Text

b. Text Color: For Changing Text Color

3. Format-

a. Font: For Selecting Text Font

Page 31: Training Report on J2SE

P a g e 31 | 33

6. FEASIBILITY ANALYSIS

Whatever we think need not be feasible. It is wise to think about the feasibility of

any problem we undertake. Feasibility is the study of impact, which happens in

the organization by the development of a system. The impact can be either

positive or negative. When the positives nominate the negatives, then the system

is considered feasible.

Technical Feasibility:

We can strongly say that it is technically feasible, since there will not be much

difficulty in getting required resources for the development and maintaining the

system as well. All the resources needed for the development of the software as

well as the maintenance of the same is available in the organization here we are

utilizing the resources which are available already.

Economic Feasibility

Development of this application is highly economically feasible. The organization

do not need to spend much money for the development of the system already

available. The only thing is to be done is making an environment for the

development with an effective supervision. If we are doing so, we can attain the

maximum usability of the corresponding resources. Even after the development,

the organization will not be in a condition to invest more in the organization.

Therefore, the system is economically feasible.

Page 32: Training Report on J2SE

P a g e 32 | 33

7. CONCLUSION

Our project is only a humble venture to satisfy the needs of Text Editor. The Text

Editor that can perform all the functionality that are required by client. All the

functions of this software are developed according to the SDLC (Software

Development Life Cycle). Coding and Testing are major part of this software

development process, these all are performed accurately. Several user friendly

coding have also adopted. This package shall prove to be a powerful package in

satisfying all the requirements of the organization. The objective of software

planning is to provide a frame work that enables the manger to make reasonable

estimates made within a limited time frame at the beginning of the software

project and should be updated regularly as the project progresses. Last but not

least it is not the work that played the ways to success but ALMIGHTY

Page 33: Training Report on J2SE

P a g e 33 | 33

8. REFERENCES

1. Dmatic’s Courseware

2. History of java :

http://www.oracle.com/technetwork/java/javase/overview/javahistory-

index-198355.html

3. Java White Paper Buzzwords:

https://docs.oracle.com/javase/tutorial/getStarted/intro/definition.html

4. Java Applet: https://en.wikipedia.org/wiki/Java_applet

5. Event Handling Image :

https://www3.ntu.edu.sg/home/ehchua/programming/java/J4a_GUI.html

6. The Complete Reference (Java Seventh Edition) by Herbert Schildt,

Mc Graw Hill Education.

7. www.HerbSchildt.com