Question: Write a Python class definition called CellPhone to represent a monthly cell phone bill. The bill should contain the following information: customer name (default value
Write a Python class definition called CellPhone to represent a monthly cell phone bill.
The bill should contain the following information:
customer name (default value is the empty string) account number (default value is 0) number of gigabytes (GB) used over the monthly limit (default value is 0)
Include the following methods:
a constructor which given a customer name, account number, and number of GB used in excess of the monthly limit, creates a CellPhone object (be sure to account for the default values). an accessor method for the account number a mutator method for the customer name a method that computes and returns the monthly charge calculated as follows: a basic charge of $75 if the number of GB used over the monthly limit is 50GB or less then a surcharge of $20 applies if the number of GB used over the monthly limit exceeds 50GB, then the basic surcharge of $20 applies, and each GB over 50 is charged at $2 per GB. 15% tax is added
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
