Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

what's the code in python for this function? Task You will implement some basic classes and methods to manage telephone plans. A Plan can have

what's the code in python for this function?

image text in transcribed
Task You will implement some basic classes and methods to manage telephone plans. A Plan can have multiple Phone lines and include a record of multiple Caus. By calling the methods, someone could manage the lines of a plan and calculate the bill. Working through the classes in the given order is the simplest path to completion. class Phone: 0 def _init_(self, name, area_code. number, is_active): constructor of a telephone line: create/initialize instance variables for name, area_code, number and is_active (default value is True). Assume area_code is a three-digit integer with no leading 0/1; assume number is a seven-digit integer with no leading 0/1. - _str_: create/ return a string as in this example: "703-993-1530H(GMU)" - _eq_: determine if this object is equivalent to another. Two lines are considered equal if they have the same area code and the same number. - activate: set is_active of this object to be True. - deactivate: set is_active of this object to be False. class Call: - _init_(self, caller, callee, length): create/initialize instance variables. Assume caller and callee are Phone lines and that length is an integer. In case ofthe following errors, do not create any instance variables

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions