Question: Create a java program that will count all words in a sentence. The program should have a minimum of two classes. 1.1 The first

Create a java program that will count all words in a sentence.

Create a java program that will count all words in a sentence. The program should have a minimum of two classes. 1.1 The first class should be named class1, this class will have the following: The main method (starting point) The object of class2 (5) 55 (5) Should also call the method count_words(String str) (5) 1.2 1.3 The second class should be named class2, this class should have the following: A field name str of a string type A constructor A method named count words(String str) Constract a flowchart for class1 and class2 both combined. (5) (10) (10)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!