Professional Documents
Culture Documents
AJP PROJECT (1) - Merged
AJP PROJECT (1) - Merged
2023-2024
A PROJECT REPORT ON
“WORD COUNTER”
SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE
AWARD
OF
DIPLOMA IN
DEPARTMENT OF COMPUTER ENGINEERING
SUBMITTED TO
YOUGESH PATIL
The said work has been assessed by meand I satisfied with same is up to
the standard envisaged for the course. The said work may be presented to
the external examiner.
:GUIDEDBY:
Submit that I have completed this micro project by my own skill and study
between the period from 2023-2024 as per the Instruction guidance of PROF. S.
H. BAILMARE
YOGESH PATIL
I have not copied the report or it’s any appreciable part from any
This project is done as a semester micro project ,as a part course titled WORD
COUNTER. We are thankful to our Principal Prof .A.G.RAUT and the HOD Prof. S.H.
BAILMARE, Computer Engineering Department, Government Polytechnic,
Achalpur, for his invaluable guidance and assistance, without which the
accomplishment of the task would have never been possible. We thank Prof.
S.H. BAILMARE giving this opportunity to explore into the real world and realize
the inter relation without which a project can never progress. In our present
project we have chosen the topic “WORD COUNTER”. We are also thankful to our
friends and all our staff of Computer Engineering Department, for providing us
relevant information and necessary clarifications, and great support
INDEX
1. INTRODUCTION 1.
2. REQUIREMENTS 2.
3. SOURCE CODE 3.
4. OUTPUT 6
ADVANTAGES AND
5. 8
DISADVANTAGES
6. FEATURES 9
7. CONCLUSION 10
REFERENCES
WORD COUNTER
INTRODUCTION
SYSTEM REQUIREMENTS
SOURCE CODE
import javax.swing.*;
import java.awt.event.*;
import java.awt.Font;
class Main {
public static void main(String args[]) {
JFrame f = new JFrame("Character Count");
JLabel l2, l3, l4;
JTextArea
text;
JLabel l1;
JButton submit, clear;
text = new
JTextArea("");
submit = new JButton("SUBMIT");
clear = new JButton("CLEAR");
l1 = new JLabel("Enter Your string Here : ");
l2 = new JLabel("Character with Spaces : ");
l3 = new JLabel("Character Without Spaces : ");
l4 = new JLabel("Words : ");
Font txtFont = new Font(Font.SERIF, Font.PLAIN, 16);
l1.setFont(txtFont);
l2.setFont(txtFont);
l3.setFont(txtFont);
l4.setFont(txtFont);
l1.setBounds(10, 25, 200, 30);
text.setBounds(18, 60, 450, 300);
l2.setBounds(10, 370, 400, 30);
l3.setBounds(10, 400, 400, 30);
f.add(l3);
f.add(l4);
f.add(submit);
f.add(clear);
f.setSize(500, 570);
f.setResizable(false);
f.setLayout(null);
f.setLocationRelativeTo(null);
f.setVisible(true);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
OUTPUT
Figure 1
Figure 2
ADVANTAGES
Efficiency: Word counters in Java can efficiently process large text documents and count
words within them. Java's performance and memory management capabilities make it
well- suited for handling substantial amounts of text.
Accuracy: Java word counters can provide accurate word counts, as Java's string
manipulation and regular expression capabilities enable precise parsing of text. This is
important in applications where word count accuracy is crucial, such as academic writing
or legal documents.
Automation: Word counters in Java can be integrated into automated content
management systems and text analysis tools, allowing for streamlined and consistent
word counting in various applications, from websites to publishing platforms.
Customization: Java allows developers to create highly customizable word counters.
You can tailor the counting algorithm to account for specific needs, such as excluding or
including certain characters, handling different languages, or applying custom rules for
counting.
DISADVANTAGES
Learning Curve: If you're not familiar with Java, there may be a learning curve to develop a
word counter in the language. This could be a disadvantage if you need a word counter
quickly and don't have experience with Java.
FEATURES
Word Counting: The primary feature is, of course, the ability to accurately count the
number of words in a given text or document. This includes handling different languages,
character encodings, and counting words based on user-defined rules.
Character Count: In addition to word count, the word counter can provide a character
count, which is useful in scenarios where character limits are important, such as in social
media posts or SMS messages.
Line Count: The ability to count the number of lines in a document can be useful for
assessing document structure and readability.
Sentence Count: Some word counters can go a step further by counting sentences, which
can be helpful for assessing the complexity of a text.
Paragraph Count: Counting paragraphs can provide insights into the document's
structure and organization
CONCLUSION
In short, a word counter in Java is a valuable tool for accurately counting words and
offering additional text analysis features. It aids writers and professionals in various
fields, but the choice to use it should consider factors like development time and resource
usage. It streamlines content management, helps meet word limits, and enhances
readability.
https://www.tutorialspoint.com/awt/index.htm
https://www.javatpoint.com/
www.chatgpt.com
www.bard.com