Question: python Create a class called Sms in this file. 01 A1444 Your class must have three private instance variables: A string named 'to_number' A string
python
Create a class called Sms in this file. 01 A1444 Your class must have three private instance variables: A string named 'to_number' A string name 'content' An integer named 'sms_count' Create a constructor with a parameter for 'to_number' only. Create a public method named 'send_sms' that takes no arguments and returns a string. This method will be responsible for taking as input the SMS content and sending it to the 'to' number. First, you should validate the 'to_number' variable. If 'to_number' is none or contains nothing, you should return "You must have a valid to number". Then, you should take a line of input from the console and save that into the content' instance variable. You must use the input function to do this. If the received content is empty, return "You must enter an SMS body". Next calculate how many SMS messages will be required. A single SMS is 160 characters long, at most. That is, for every 160 characters, an SMS must be sent. Save this result into the 'sms_count' instance variable. Finally, build and return a string of feedback, formatted as follows (in this example, three SMS messages were required): SMS_1 sent to:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
