asked 9.4k views
0 votes
Design a class called Sentence that has a constructor that takes a string representing the sentence as input. The class should have the following methods: get_first_word): returns the first word as a string get al_wordsl): returns all words in a list. replacelindex, new_word) Changes a word at a particular index to "new_word". For example, if sentences is "I'm going back", then replace[2, "home"] results in "l'm going home". If the index is not valid, the method does not do anything.

asked
User Siger
by
8.4k points

1 Answer

4 votes

Answer: b

Step-by-step explanation:

answered
User Tanika
by
8.6k points