Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Generic Collections make a program that determines and prints the number of duplicate words in a sentence. The program should also display the words that

Generic Collections make a program that determines and prints the number of duplicate words in a sentence. The program should also display the words that were duplicates. Treat uppercase and lowercase letters the same and ignore punctuation. Use a Scanner object to prompt the user for the sentence they want to see the duplicates. Do not use any static data structure to determine the duplicates. Allow the user to run the program as many times as possible until a sentinel name value, "No" or "no", has been entered. All classes in this program must be public, non-static, and not nested in other classes. No input, processing or output should happen in the main method. All work should be delegated to other non-static methods. Every method in your program should be limited to performing a single, well-defined task, and the name of the method should express that task effectively. Compile your program and correct all syntax errors and warnings. You will not receive credit for the program if it does not compile successfully. Run your program and copy and paste the output to a file named Program3-output.txt. Do a folder named, _Program3. Copy your source code and the output file to the folder. Zip the folder and upload it to Blackboard. Before you upload your program to Blackboard: 


• Ensure that your code conforms to the style expectations set out in class and briefly discussed below.


• Make sure your variable names and methods are descriptive and follow standard capitalization conventions. 


• Put comments wherever necessary. Comments at the top of each module should include your name, file name, and a description of the module. Comments at the beginning of methods describe what the method does, what the parameters are, and what the return value is. See the Program-Template.java for more details. 


• Program readability and elegance are as important as correctness. After you have written your method, read and re-read it to eliminate any redundant lines of code, and to make sure variables and methods names are intuitive and relevant. Read the assignment very carefully to ensure that you have followed all instructions and satisfied all requirements. You will not get full credit for this program if it is not written as instructed even if it works as expected.

Step by Step Solution

3.43 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

import javautilArrayList import javautilList import javautilScanner import javautilStringTokenizer p... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Communication Essentials a skill based approach

Authors: Courtland L. Bovee, John V. Thill

6th edition

978-0132971324

More Books

Students also viewed these Programming questions

Question

d. Is it part of a concentration, minor, or major program?

Answered: 1 week ago

Question

What is the AIDA model, and what are its limitations?

Answered: 1 week ago