Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Data Structure Expert

1.     For all assignments, always use comments to explain your program.

2.      You must use the names given to name your program. 

Objectives:

1.     To gain experience with string objects.

2.     To gain experience with generic algorithms.

3.     To gain experience with files - opening for input and output.

Documentation:

1.     Explain the purpose of the program as detail as possible

2.     Develop a solution for the problem and mention algorithms to be used

3.     List data structures to be used in solution.

4.     Give a description of how to use the program and expected input/output

5.     Explain the purpose of each class you develop in the program.

Programming:

1.     For each method, give the pre and post conditions and invariant, if any

2.     Program execution according to the requirements given 

3.     Naming of program as required

4.     Print out of source code

Description of program:

You are to write a program name wordcount.java that prompt the user for a user input file name, reads the input words and do the following with those words:

1.     Count the amount of words in the file. A word can end with a --- space, EOLN character or a punctuation mark (which will be part of the word).

2.     Count the amount of lines in the file.

3.     Count the amount of alphanumeric characters in the file.

4.     Count the number of sentences in the file.

5.     Count the amount of vowels in the file - only a, e, i, o, u are vowels.(This includes upper case also...A, E, I, O, U)

6.     Count the amount of punctuations in the file.

You must output the above information both on the screen as well as an output file name "output.txt".

Here are some requirements for the program:

The program must work even if the input file is empty. If this is the case print a message saying that "the input file is empty" and then terminate the program.

Implementation:

Use as many generic algorithms as possible so that the size of the program can be reduced.

Data Structure, Computer Science

  • Category:- Data Structure
  • Reference No.:- M9892116
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Data Structure

Problem regarding the management program

Problem: Looks like its just adding a save and load feature to the same file you sent me for python 3.5 Until now, you have had to leave your team management program running on your computer indefinitely since you did no ...

Data Communication Delivering Information anywhere

Topic: Data Communication Delivering Information anywhere. Write a 9-12 pages paper in which you: Present an overview of the origin and history of the concept. Describe the current use of and attitude toward the concept. ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As