input: Write a function to process a string by initializing it, counting the words, converting to uppercase, reversing, and removing whitespaces.
  assert StringProcessor("Hello World").num_words == 2
  assert StringProcessor("Hello World").uppercase == "HELLO WORLD"
  assert StringProcessor("Hello World").reverse_string() == "dlroW olleH"
  assert StringProcessor("Hello World").remove_whitespace() == "HelloWorld"
  assert StringProcessor("  Leading and trailing spaces   ").remove_whitespace() == "Leadingandtrailingspaces"
output: class StringProcessor:
      def __init__(self, input_string):
          self.input_string = input_string
          self.num_words = len(input_string.split())
          self.uppercase = input_string.upper()
  
      def reverse_string(self):
          return self.input_string[::-1]
  
      def remove_whitespace(self):
          return self.input_string.replace(" ", "")