6513 Shares

Please help me write this program in Java?

Please help me write this program in Java? Topic: Designs of writing alphabets letter
July 17, 2019 / By Charlton
Question: Design a class Document with a state (attribute) String str. The constructor of this class accepts a file name as a passed parameter and then opens a text file and reads the text on that file onto the String str. This class contains set and get methods in addition to the following methods: Count, LetterOcc, WordLength, and WordOcc. Count: Produces the following summary, depending on the passed arguments. * How many sentences are in this text? * How many words are in this text? LetterOcc: Takes a string as an argument and prints a table indicating the number of occurrences of each letter of the alphabet in the text. For example, the sentence "Computer Science Department" contains one "a", three "c's", etc. WordLength: Takes a string as an argument and prints a table indicating the number of one-letter words, two-letter words, three-letter words, etc. appearing in the text. WordOcc: Takes a string as an argument and prints a table indicating the number of occurrences of each different word in the text. Write a Driver class that creates a Document object and accesses its methods.
Best Answer

Best Answers: Please help me write this program in Java?

Alven Alven | 1 day ago
Make a class name Document. Provide a constructor, basically a method named Document without a return value. Use input methods to get the file. Here is a tutorial on using input: http://java.sun.com/docs/books/tutorial/... Here is a tutorial on how to make classes if that is what you need. http://java.sun.com/docs/books/tutorial/...
👍 170 | 👎 1
Did you like the answer? Please help me write this program in Java? Share with your friends

We found more questions related to the topic: Designs of writing alphabets letter


Alven Originally Answered: How to write a Java program that writes its own source code without a file reader?
This kind of program is called a quine. There are a number of approaches to making one. You can read about them here: http://en.wikipedia.org/wiki/Quine_%28co... I tried to write an example for you, but I ran into some stupid problem with escape sequences. Java doesn't strike me as a particularly elegant language for trying to write quines.
Alven Originally Answered: How to write a Java program that writes its own source code without a file reader?
Quote "writes" next time... Anyways if you are not to use FileReader, use FileOutputStream, BufferedOutputStream and DataOutputStream.... This is complicated then FIleReader but it should do the task. If you need help using these mail me on [email protected]

Theresa Theresa
Use Eclipse IDE to run programs. I recommend it because it helps you focus on the program design rather than on the syntax (you learn syntax as you program). JDK is where you write the programs(such as Eclipse). You compile it by making sure you have JRE (java runtime environment)
👍 70 | 👎 -7

Theresa Originally Answered: How to write a program in java to extract email addresses from microsoft outlook express in my computer?
I'm assuming that when you say "I just wanted to create a web page" you are implying that you want to write this as an applet. An applet shouldn't have access to your address book for security reasons. If it does, then it's just one more reason to disable Java!!!... Rawlyn.
Theresa Originally Answered: How to write a program in java to extract email addresses from microsoft outlook express in my computer?
Quote from Yahoo! Mail help: "the skill to get right of entry to Yahoo! Mail by utilising a POP3 e mail customer (which includes Outlook or Outlook convey) is only available to purchasers of our top rate Yahoo! Mail Plus provider. " consult with source link for greater tips

If you have your own answer to the question designs of writing alphabets letter, then you can write your own version, using the form below for an extended answer.