Introduction This program is meant to see how well a student can write a program starting from a (mostly) blank editor screen. It's also meant to see whether everyone is able to write a program that reads in text from a file as individual words, store those words in a data structure, and then perform some computations on that data structure. I assume that most will use Eclipse to create and run their programs. Because Eclipse insists on every program being in a package, create and place this program into a package called csc403. All of the programs you create this quarter will go into that package. There are several programs provided in the "Example programs" content module in D2L showing how to read data from a file. One of them shows how to fill a String array from a text file using the StdIn object and associated methods. Use that as a guide. Simple statistics on in a text file Write a program called WordSimpleStats that: 1. prints your name followed by three equal signs; 2. reads the words in a text file into a String array, where each array entry contains a word; 3. prints the number of words in the file; 4. computes and prints the average length of all of the words; keep in mind that an average is not an integer; 5. computes and prints the the length of the longest word; 6. counts and prints the number of seven-letter words; 7. counts and prints the number of words ending with a vowel (that is, 'a', 'e', 'i', 'o', or 'u'); Other requirements You must use the classes StdIn and stdout for input and output. Points will be deducted if this is not done. Use the data file tale.txt, which you will find in the data folder you downloaded as part of the instructions on how to set up Eclipse. In your program, specify the pathname data/tale.txt. Do not use a pathname specific to your computer. Only print what is specified above. When printing a value, don't simply print the value. Always provide explanatory text. For example, when printing the number of words in the file, print: Number of words in the file: 12345. Grading rubric The program is worth 26 points, broken down as follows: 4 for using StdIn and StdOut for input/output ⚫2 for creating and filling the array from the file correctly ⚫2 for printing the number of words ⚫4 for computing and printing the average length ⚫4 for printing the length of the longest word 4 for printing the number of seven-letter words 4 for printing the number of words ending with a vowel 2 for specifying the file pathname correctly Points may be deducted for not following the specifications above. For example, not having the program in the csc403 package. Points will be deducted if your name is not in a comment at the top of the program. A program that doesn't compile or that compiles and then crashes will be given o points. In this case, if you believe your program is supposed to compile and run, please make an appointment so that we can discuss the program. Keep in mind that, for any program, you may be required to meet with me to explain how your program works.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Introduction

This program is meant to see how well a student can write a program starting from a (mostly) blank editor screen. It's also meant to see whether everyone is able to write a program that reads in text from a file as individual words, store those words in a data structure, and then perform some computations on that data structure. I assume that most will use Eclipse to create and run their programs. Because Eclipse insists on every program being in a package, create and place this program into a package called csc403. All of the programs you create this quarter will go into that package.

There are several programs provided in the "Example programs" content module in D2L showing how to read data from a file. One of them shows how to fill a String array

from a text file using the StdIn object and associated methods. Use that as a guide.

Simple statistics on in a text file

Write a program called WordSimpleStats that:

1. prints your name followed by three equal signs;

2. reads the words in a text file into a String array, where each array entry contains a word;

3. prints the number of words in the file;

4. computes and prints the average length of all of the words; keep in mind that an average is not an integer;

5. computes and prints the the length of the longest word;

6. counts and prints the number of seven-letter words; 7. counts and prints the number of words ending with a vowel (that is, 'a', 'e', 'i', 'o', or 'u');

Other requirements

You must use the classes StdIn and stdout for input and output. Points will be deducted if this is not done.

Use the data file tale.txt, which you will find in the data folder you downloaded as part of the instructions on how to set up Eclipse. In your program, specify the pathname data/tale.txt. Do not use a pathname specific to your computer.

Only print what is specified above. When printing a value, don't simply print the value. Always provide explanatory text. For example, when printing the number of words in

the file, print:

Number of words in the file: 12345.

Grading rubric

The program is worth 26 points, broken down as follows:

4 for using StdIn and StdOut for input/output

⚫2 for creating and filling the array from the file correctly ⚫2 for printing the number of words

⚫4 for computing and printing the average length

⚫4 for printing the length of the longest word

4 for printing the number of seven-letter words

4 for printing the number of words ending with a vowel 2 for specifying the file pathname correctly

Points may be deducted for not following the specifications above. For example, not having the program in the csc403 package. Points will be deducted if your name is not in a comment at the top of the program. A program that doesn't compile or that compiles and then crashes will be given o points. In this case, if you believe your program is supposed to compile and run, please make an appointment so that we can discuss the program.

Keep in mind that, for any program, you may be required to meet with me to explain how your program works. 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education