Junior — Middle+
Develop a class with a set of methods for text analysis
livecode
Task condition
Create a class that takes a string of text as input. The class should contain the following methods:
- A method that outputs the longest word from the given text.
- A method that finds and outputs the word that occurs the most times in the text.
- A method that counts the number of special characters (e.g., periods, commas, exclamation marks, etc.) and outputs this number.
- A method that collects all palindromic words and outputs them in a single string separated by commas.
All methods work with the same text that was passed when creating an instance of the class.