Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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:
Prof. RITURAJ JAIN
HOD (CSE)
Submitted By:
CHHATRAPAL CHOUDHARY
B.Tech. 6th Sem.
12EVECS007
P a g e 1 | 33
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
P a g e 2 | 33
ACKNOWLEDGEMENT
CHHATRAPAL CHOUDHARY
B.Tech. 6th Sem.
12EVECS007
P a g e 3 | 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.
P a g e 4 | 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, its 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 tomorrows 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
DMaticss 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.
P a g e 5 | 33
INDEX
S No.
Title
Page
INTRODUCTION
7-22
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
P a g e 6 | 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++.
JAVA
Application
(Console based)
Applet
(Window based)
JVM:
P a g e 7 | 33
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.
P a g e 8 | 33
Portable
Object Oriented
Interpreted
Performance
Distributed
High
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.
P a g e 9 | 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
P a g e 10 | 33
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.
P a g e 11 | 33
//
/*
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
Demo
Lib
Src
P a g e 12 | 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.
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:
P a g e 13 | 33
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.
P a g e 14 | 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 instantiatedthey can only be implemented by classes or extended by
other interfaces.
P a g e 15 | 33
There are many function which are used in string class methods:
int length()
character charAt()
Boolean equalsIgnoreCase(str)
P a g e 16 | 33
Boolean endsWith(str)
Boolean startsWith(str)
int indexOf(char)
int lastIndexOf(char)
string concat(string)
String replace()
String trim()
String toLowerCase()
String toUpperCase()
int length()
int capacity()
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.
P a g e 17 | 33
By Thread class
By Runnable class
Thread currentThread()
String getName()
int getPriority()
void setName(String)
void setPriority(int)
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 wellsuited 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 crossplatform command-line interface to some remote system. If needed, an applet
P a g e 18 | 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.
P a g e 19 | 33
ActionListener
Window Listener
MouseListener, etc.
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:
P a g e 20 | 33
BorderLayout
Button
CheckBox
Frame etc.
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.
P a g e 21 | 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 features:
P a g e 22 | 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 days 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.
P a g e 23 | 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.
P a g e 24 | 33
4. OPERATIONAL SUPPORT
Our text editor supports the following functionality.
P a g e 25 | 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
P a g e 26 | 33
P a g e 27 | 33
P a g e 28 | 33
P a g e 29 | 33
3. Format
Menu Items:
1. Filea. 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.
P a g e 30 | 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.
P a g e 31 | 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
P a g e 32 | 33
8. REFERENCES
1. Dmatics Courseware
2. History of java :
http://www.oracle.com/technetwork/java/javase/overview/javahistoryindex-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
P a g e 33 | 33