Question: Declare and implement a class named MyQuote. This class will have a string data member quote consisting of English words with special characters and the

Declare and implement a class named MyQuote. This class will have a string data member quote consisting of English words with special characters and the following methods: a. A constructor: initialize quote with the null string ("" is the null string). b. setMyQuote (): get a string as input parameter and assign it to quote. c. split(): pull out each word in quote , save it in string variable w, and print w using System.out.println() statement. For example, if quote = "Never give up. Today is hard, tomorrow will be worse, but the day after tomorrow will be sunshine!", this method will print: never give up Today is hard tomorrow will be worse but the day after tomorrow will be sunshine

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!