Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Miss.Jane, an experienced English professor, gives practice tests to her students to improve their written skills. Everyday students write an article and they submit it

Miss.Jane, an experienced English professor, gives practice tests to her students to improve their written skills. Everyday students write an article and they submit it to Jane. Jane is particular that the students use only special characters like , ; : . ? ! in the article.

She counts the total number of words used and the number of new words used by the students in the article. Based on the analysis done on the new words used by the students she gives her feedback to the students.

Jane finds it difficult when the number of students increase. So she wanted to automate the process in the following format. Help her to write a java program to display the new words using lower case and in alphabetical order.

Sample Input and Output - 1

Enter Student's Article

Hello Everybody, welcome to collection in JAVA. Collection, is like a container and powerful concept in Java!

Number of words 17

Number of unique words 14

The words are

1. a

2. and

3. collection

4. concept

5. container

6. everybody

7. hello

8. in

9. is

10. java

11. like

12. powerful

13. to

14. welcome

Sample Input and Output - 2

Enter Student's Article

hello Hello HEllo hi hi: hi! Welcome,welcome

Number of words 8

Number of unique words 3

The words are

1. hello

2. hi

3. welcome

Requested files

UniqueWords.java

 1 //import the necessary packages if needed 2 3 @SuppressWarnings("unchecked")//Do not delete this line 4 public class UniqueWords 5 { 6 7 } 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions