Beruflich Dokumente
Kultur Dokumente
….for beginners
A
Project Report
Submitted
In partial fulfillment
For the award of the Degree of
Bachelors of Technology
In Department of Computer Science Engineering
Alwar
Page0
We hereby declare that the work, which is being presented in this report, entitled
“Multi-Language-Editor …for beginners” in partial fulfillment for the award of Degree
of “Bachelor of Technology” in department of Computer Science Engineering,
Institute of Engineering and Technology affiliated to, Rajasthan Technical University
is a record of my own investigations carried under the Guidance of Shri Ashish
Vashistha Department of Computer Science Engineering, IET Alwar.
I have not submitted the matter presented in this report any where for the award
of any other Degree.
Submitted By:
Counter Signed by
Name of Supervisor
Ashish Vashistha
Lect. Of C.S. Dept. Page0
Preface
Page0
In the present scenario we have so many editors which support multi-languages
like C, C++, JAVA, Pascal etc. Each editor has its own significance but we are going to
develop an editor which is helpful for user and very easy to implement programs as
compared to others editors.
. There are so many editors which provide very advance features then why we are
developing our editor? There are some important reasons behind it -
At the low level of programming, user want to learn the basic programming
languages(C, C++, and JAVA) and make some small levels programs and it is very hard
to compile and run the code for him. In our editor we provide easy interface which can
be easily understood by user without any help.
We provide the all basic function as provided in the other editors and some other
extra features which are helpful for programming point of view. We have some different
features like mergers, splitter and time and date.
So user can work in a notepad file or program file (as per user choice) at a single
time and they can easily use this.
Acknowledgement
Page0
We are indebted to many people for the successful completion of this minor
project. We have received the enormous help, guidance and advice from many people
and we feel that it will not be right to mention a line about at least some of them. We are
grateful to our college chairman Dr. V.K. Agrawal for providing us opportunity to study
in this institution as well as providing us with all necessary facilities.
Our principal Prof. G.K. Joshi has been source of inspiration to us in our work
sincerely.
We are really thankful to many of the people who really helped us to create our
project. Our deepest thank to Mr. Ashish Vashistha the guide of our project for guiding
and correcting various documents of us with attention, care and constantly encouraging
us with their valuable suggestions and enthused thought us project work.
We are highly indebted to our respected HOD Mr. Anoop Vashistha and Mr.
Mohit Khandelwal and all faculty members of computer engineering department for
their guidance and kind co-operations.
A special mention needs to be made to our friends who have helped us with their
valuable suggestions.
Page0
Page 1
1. Introduction
1.1 Background Study
Before some time we were suffering with the problems of present Notepad and
• Microsoft Text Editor (Notepad): -In the present Microsoft Text pad Editor we
are not able to save a file which is having the size more than 64 KB through the
shortcut key. Sometimes this can happen with the file having the size just
smaller than 64 KB.
So we are also building the same functions that are given in the Microsoft
Text Editor like File, Edit etc. We will remove the restriction is in Notepad.
• JEdit and JCreator: - JEdit and JCreator only support the Java language and
these are complex to understand.
Our Multi-Language Editor will support three basic languages that are C, C+
+, and Java. We are also adding the Merger and Splitter.
• NetBeans and Notepad++:- These both the editors provide the facility to make
the programs in the Multiple Languages but these are very complex. A beginner
is not able to compile and run the programs easily and their GUI is not user
interactive.
Our Multi-Language Editor is having the GUI which is very user interactive
and its size is also small. User can easily compile and run the programs in our
Editor.
Generally we have a simple editor for the user but whenever we want to build a
program of any of the basic programming language then we have to work in the separate
language editor as per the language. So here we will develop an editor which supports
Page
multiple languages with some additional features for the beginners which will be 2
very
helpful for the new programmers.
1.2 Project Scope
We are going to develop an editor which will support multiple languages like C, C+
+, and JAVA. We will provide a facility in the starting of the editor that in which language
the user wants to build the program. According to his/her requirement he/she can choose
the language or simple notepad.
In our notepad we will provide the simple feature as well as some additional facility
of merger, splitter. Through the splitter user can splitter we can break our file into more
than one part according to the specified size by user and in the merger we can merge
more than one file.
Here in this project we will provide all the notepad editor features as well as some
other features. We are providing our separate program output window on which the user
can see the errors and the kind of error and if the program is correct then he/she can see
the output of the program.
In the output window there is no feature of auto hide because of providing the
simplicity in the editor because its hard for the beginner to use such type of features. User
can easily access this editor without any problem because all the features are provided as
simple as possible.
It covers all the perspective about the product like what type of features we are
providing in the product, what hardware and software environment we are using, the
hierarchy of the components and their interconnection. So it is divided into subcomponents
which are explained below -
In present scenario so many editors are available but we use a particular editor for a
particular language at a small level. We cannot ignore those editors which support the
multi languages but these editors are so complicated to understand for the beginner or
fresher. So, we developed an editor which also supports the functionality and some extra
features. In our software there are some other important features like merger, splitter, time
and date etc.
One more important thing about our project is that it require only small amount ofPage 4
memory where as other editor consume a lot of amount of memory. So it saves the
memory and time for the other use. All the features are accessible easily by the users and
beginners.
The hierarchical structure of the editor is given below –
Hierarchical Structure:-
System
At first we will provide the facility to the user whether he wants to access the
Notepad or any language Editor as per his requirement.
The main features which we are going to develop are:-
Simple Editor: - Here we will provide simple features like File (new, open, save, save as,
exit), Edit (cut, copy, paste, undo, redo, delete, go to line and select all), View (line
number, find, find & replace), Format (word wrap, font).
Language Editor: - In the language editor we will provide all the facility of simple editor as
well as some special features like Tool (Merger, Splitter, Compile, Run) for all three
languages.
1.3.3 User Classes and Characteristics
Developer Environment:-
• Hardware Platform
Hard Disk : 80 GB
RAM : 512 MB
Visual Display Unit : Super VGA Monitor
Keyboard : Standard 102 keys
Mouse : Serial Mouse
• Software Platform
Software Tools : JCreator, JDK, Turbo_C
Operating System : Windows XP/Vista
Page 6
User Environment:-
• Hardware Platform
Hard Disk : 20 GB
RAM : 256 MB
Visual Display Unit : Super VGA Monitor
Keyboard : Standard 102 keys
Mouse : Serial Mouse
• Software Platform
The multi-language editor which we will develop will support only C, C++, and JAVA
language. It means user will only build the programs of only given languages. At a time the
user will only be able to work in the one platform. We are using JDK version 1.6 for
supporting our java programs. Here we require at least 80 GB of hard disk. We require at
least 256MB RAM Our product can only support mostly all the versions of windows like
Win 98, Win XP, Win Vista but it will not support the Linux operating system.
In this multi-language editor we will provide the basic help facility to the user. This
help feature will contain the information related to the notepad like developer names,
version number etc.
Page 7
1.3.7 Assumptions and Dependencies
The software JDK (Java Development Toolkit) should be installed properly and its
path (both user path and system path) must be set correctly. Our product will support only
C, C++, and Java languages for the programmers. JVM (Java Virtual Machine) should be
there in the user’s system. Our product is only for the beginners because it will have only
the basic features which should be needed to compile and run the program. So our
product totally depends upon the installation of all software tools and the provided
hardware platform.
2. The library. The Java class library is available on any machine with a Java
runtime system, because a portable program is of no use if you cannot use the
same class library on every platform.
3. The byte code. The Java runtime system does not compile your source
code directly into machine language, an inflexible and nonportable
representation of your program. Instead, Java programs are translated into
machine-independent byte code. The byte code is easily interpreted and
therefore can be executed on any platform having a Java runtime system.
B ) Security
The Java language is secure in that it is very difficult to write incorrect
code or viruses that can corrupt/steal your data, or harm hardware such as
hard disks.
C )Robustness
The Java language is robust. It has several features designed to avoid
crashes during program execution, including:
• No pointer arithmetic
• Garbage collection--no bad addresses
• Array and string bounds checking
• No jumping to bad method addresses
So that is the basic program structure in the java. For compiling the java
program we use the command –
Javac ClassName.java
For running this program we use –
java ClassName
So in this way the programs in the java are compiled and run.
Swings
• platform independent
• customizable
• extensible
• configurable
• lightweight
we generally use the java.swing.* to use all the built in functions in the
swings. We are also using the actionLiateners in the project.
Software interface is the interface between the software part and the user. In our
project we only require JDK version 1.6 for supporting the java programs. It provides us all
the packages, in build functions, some of the classes. We also require the compilers of C
and C++ languages. Page 8
Our product will be safe as per the user perspective. Whatever the operations the
user wants to perform on the files by using our product, will be performed safely. Our
product will work properly after the proper installation. It will not be harmful for the
operating system or any other software. Page 9
Our product will perform all the operations which we will implement on it as per the
requirement of the user. It will be secure product for the user like a user wants to perform
the editing on the file, then he/she can edit the file and after this if he wants to save the
file then after clicking on save part the file will be saved in his/her storage device. So in
this way all the operations will be performed accurately on the file.
If we see the quality of our product then it will provide the sufficient knowledge
about our editor to the user. It will be having the adoptability feature which will adopt the
other new features that can be suggested by the user.
Our product will be flexible enough which can be edited as per the new user
requirement. It will be a portable product. It will be compatible with the other software
quality attributes like reliability etc.
2. Design Specifications
2.1 Assumptions
• User must install JDK (Java Development Toolkit), Windows operating system.
• User can create and run programs in our product only in C, C++, Java languages.
• Our product is only for the beginners because it will have only the basic features
which should be needed to compile and run the program.
• By default the user will get the Text Editor and if he wants to create a program file
Page 10
then he has to select the particular language of the program.
• User can work only on one platform at a time, it may be Text Editor or C compiler or
C++ compiler or Java compiler.
2.2 Constraints
Incremental model was given by MILLS whose approach was based on linear
sequential steps strategy (followed one by one) with the repetitive based technique. The
basic idea under its development is that the software should be developed in increments,
each increment will add some another function in our software. In this model we divide
overall software into number of functions which it will perform. Then on each increment
step we build one function and after creating each function we will test it to check its
functionality.
Page 12
1. Analysis – In this phase first of all the communication takes place between the
customer and the developer. After getting all the requirements the SRS (software
requirement specification) is created. This will work as the interface between the
customer and the developer.
2. Design – design phase contains two states. The first one is the system design we
creates the modules related to the function and in the detailed design phase we
develop the logic of that function. So here we just develop the different types of
models which represent the data flow like data flow diagram, architectural diagram
etc. So that it will be easy for the implementer to understand and generate the code.
3. Code - In the code part firstly the coder choose the programming language
according to the requirement of the user. Then he builds the code of the each
module separately from the module. He creates the proper front end GUI and back
end.
4. Test – In the testing phase we test our module by applying different testing
techniques like unit testing, integration testing, assurance testing. We apply various
test cases on the module. So we can remove the errors and make our software
reliable. We can make our product simpler
We divide overall process into the increments. The process of first increment will
quickly release some type of product. This first increment is called as core product. Once
one increment is completed and delivered, customer can put it into the operational later
versions of the current increment environment, they can test it practically to help to clarify
their requirements for later increment.
Page 13
Risk is the possibility that the defined, goal are not met. Risk involves change, such
as in changes of mind, opinion, action.
In our project risk can be of various types like our product will not work properly if
the required software will not get installed, user should have the proper resources. If user
uses the programming languages other than C, C++, Java then he might get any type of
problem.
Page 14
2.5 Architecture
The top level design view is shown here in which a user can user in four ways. He
can use it as a simple Notepad Editor or as a C language Editor, as a C++ language
Editor, as a Java language Editor. In the detailed design we will split the product according
to the two users, one for the Notepad user and for Language Programmers.
Multilanguage Editor
As As C As C++ As JAVA
Notepad Editor Editor Editor
2.5.1 Overview
Here the detailed diagram is shown which shows thee interaction of a user with our
Multi-Language Editor. This is very user friendly. A new programmer can use this very
easily. Here we will provide a GUI (graphical user interface) by using which a user can
perform the operations according to his requirement. We have divided the operations in
two parts – first one is Basic Operations which includes the file insertion, opening, saving,
closing and second one is Build which includes the Check Code, Compile and Run
functions through which programmer can compile and get the errors if they occur else after
running the program he will get the output.
Page 16
2.5.2 Module 1 …N
Here the DFD (Data Flow Diagrams) are shown which shows the components of
our Multi-Language Editor. From here we can understand the components and the flow.
0 LEVEL DFD:-
1-LEVEL DFD:-
2-LEVEL DFD:-
Mark Pos ition (if required)
Notepad User Find then Replace (if requied)
Check
Suggested Key words Code
1.4.3
Run
No Error Process
Here in the 0 Level DFD the basic diagram of the entity and process is shown which
shows that Notepad user and Programmer both can use our product and will get the output
according to the performed operations. In 1 Level DFD the functions are shown which will
be provided in our product. User can perform File and Edit operations on the file and will
get the output according to the performed operations and the programmer can compile the
program file if error occurs then he will get an error message and id program has no error
then we will get the program output after running the program.
2 Level DFD provided the sub functions of the Edit function. After creating or
opening the file user can find any word and he can also replace that word by any other
word if he wants. The build function also divided into three sub functions and these are
Check Code, Compile and Run. User can compile his program directly or after performing
the Check Code operation, if any error occurs then error message will be shown to the
user and after correcting the errors he will get the required output after performing the run
operation.
Incremental model: - This is based on linear sequential steps strategy with the repetitive
based technique. The basic idea under its development is that the software should be
developed in increments, each increment will add some another function in our software.
In this model we divide overall software into number of increments. Then on each
increment step we build one function and after creating each function we will test it to
check its functionality.
1. Analysis – In this phase first of all the communication takes place between the
customer and the developer. Then on the basis of the requirements we design the
SRS (Software Required Specification).
Page 20
2. Design – Design phase contains two states. The first one is the system design we
creates the modules related to the function and in the detailed design phase we
develop the logic of that function. So in this phase we create the DFD (Data Flow
Diagrams) and other architectural diagram.
3. Code - In the code part firstly the coder choose the programming language
according to the requirement of the user. Then he builds the code.
4. Test – In the testing phase we test our module by applying different testing
techniques like unit testing, integration testing, assurance testing. We apply various
test cases on the modules. So we can find the optimal way to build the product.
Other Methodologies –
Water Fall Model: - This model is used where requirement are clearly defined. This model
is specially used for the large products. This model is a sequential model. Its phases are –
• Concept Formation
• Developing the software specifications
• Software Design
• Coding and Testing
• Software Integration and Testing
• Release and Maintenance
The reason to refuse this model is that it is not the flexible model. We firstly have
Page 21
the over all requirements and it is quite difficult to mention the requirements at the
beginning stage. This model is inflexible and very complex that’s why we didn’t select this.
Spiral Model: - This model is the linear, sequential and step wise process model. This
model is represented in the form of spiral where each spiral will connect with the other
spiral to represent the various phases.
Each spiral will be divided into six task regions given below –
• Customer Evolution
• Planning
• Risk Analysis
• Engineering
• Construction and Delivery
• Customer Evolution
The reason to refuse this methodology is that this model has very low speed so it
can’t be used so frequently. This approach requires a risk analyst or expert to the risks
properly. If risks are not handled initially then they may arise at any time in later stages.
This is very complex model because we have four spirals and in each spiral we have to
follow six phases. So we didn’t use it.
Page 22
1. Use Case Diagram: - Use case diagrams model the dynamic aspect of a system. A
use case diagram depicts :
3. State chart diagram:- State chart diagram as well as activity diagram are
instrumental in modling the lifetime of an object. They model the dynamic aspect of
a system and activity diagram is a special case of state chart diagram in which all of
the states or most of the states are activity states. A state chart diagram show a
state machine.
Here we are showing the user interface of our Editor on which the user can perform
the given operations –
FILE MENU:-
.
Page 30
Fig 9.1: GUI of FILE MENU
Here the File Menu is shown in the screen which will support the features of New,
Open, Save, Save as, Print, and Exit. User can perform these operations on the file
through File Menu after clicking on the particular item. We have also designed their short
cut keys.
EDIT MENU:-
Here the Edit Menu is shown in the screen. User can perform the Undo, Redo, cut,
copy, paste, Delete in one part, File, File Next, Replace, Go To in second part, Select All,
Time/Date in last part. Here we have created the short cut keys of cut, copy, paste and
Select All operations.
FORMAT MENU:-
Page 32
Fig 9.3: GUI of FORMAT MENU
In the Format Menu we have developed two operations Word Wrap and Font. In
the Font Selector we can select the user specific font, font size and Style. On the same
time it will show the preview of Font.
VIEW MENU: -
Here the View Menu is shown where user can show the status bar and if he can
arrange the code by providing the line number to each line.
TOOL MENU:-
Page 33
Here TOOL MENU is shown here user can merge the files and splits the file
according to his requirement. As the merge Function is shown user can merge the file.
First of all he has to give the number of files to be merged then he will select the filesPage
from34
the dialogue box then finally all the files will be merged.
Merger
In the splitter we will select the file from the dialogue box then this file will be broken
up into the number of files. The file will be divided into many files on the basis of number of
classes in the file which is to be divided. So in this way we can perform split function.
Page 35
Appendix A: Glossary
Actor: Actor whose goal is being satisfied the use case and has the primary interest in the
outcome the use case.
Appendix B: References
• www.roseindia.net/
• http://java.sun.com/docs
• www.jcreator.com
• Software Studied –
Notepad++
NetBeans
JCreator
JEdit
Microsoft Textpad
• Complete Reference
Herbert Schildt
TMH Publication