Sample Interaction: Constructor & Mutator Methods Output iPhone = ApplePhone('Black', '11 Pro', 64, 'Verizon') iPhone.set_airdrop_status('On'); print(iPhone) This is a Black 11 Pro Apple Phone Capacity is 64 GB. Carrier is Verizon AirDrop Status is On aPhone = AndroidPhone('White', 'Note 10', 128, 'AT&T') aPhone.set_split_screen_mode('On'); print(aPhone) This is a White Note 10 Android Phone Capacity is 128 GB. Carrier is AT&T Split-Screen Mode is On Polymorphic Functions Output iPhone.get_storage() Storage is 64 GB iPhone.uprade_storage(128) Updating storage is not allowed on Apple phones aPhone.get_storage() Storage is 128 GB aPhone.upgrade_storage(256) Old storage is 128 GB New storage is 256 GB aPhone.upgrade_storage(128) You can't rollback memory! aPhone.get_storage() Storage is 256 GB iPhone.connect_cloud() Connecting to iCloud... iPhone.download_app('Starbucks') Opening Apple Store to download Starbucks app... aPhone.connect_cloud() Connecting to gdrive... aPhone.download_app('WhatsApp') Opening Google Play to download WhatsApp app... User-defined Functions Output aPhone.get_time() Time is: 12:54 PM aPhone.get_date() Date is: 7/11/2020 iPhone.get_time( Time is: 12:32 PM iPhone.get_date() Date is: 7/11/2020 iPhone.place_call(425-123-4567') Calling number 425-123-4567... iPhone.send_sms('Hi There', '214-214-2144') Sending Message 'Hi There' to number 214-214-2144 aPhone.place_call('206-123-4567') Calling number 206-123-4567... aPhone.send_sms('Hi There', '469-123-4567') Sending Message 'Hi There' to number 469-123-4567 iPhone.launch_Siri() Launching Siri.. aPhone.launch_google_assistant() Launching Google Assistant... Accessor Methods Output print('AirDrop Status is: ', iPhone.get_airdrop_status()) AirDrop Status is On print('Split-Screen Mode is: ', aPhone.get_split_screen_mode()) Split-Screen Mode is On

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Sample Interaction:
Constructor & Mutator Methods Output
iPhone = ApplePhone('Black', '11 Pro', 64, 'Verizon')
iPhone.set_airdrop_status('On');
print(iPhone)
This is a Black 11 Pro Apple Phone
Capacity is 64 GB. Carrier is Verizon
| AirDrop Status is On
aPhone = AndroidPhone('White', 'Note 10', 128, 'AT&T')
aPhone.set_split_screen_mode('On');
print(aPhone)
This is a White Note 10 Android Phone
Capacity is 128 GB. Carrier is AT&T
Split-Screen Mode is On
Polymorphic Functions Output
iPhone.get_storage()
Storage is 64 GB
iPhone.uprade_storage(128)
Updating storage is not allowed on Apple phones
aPhone.get_storage()
Storage is 128 GB
aPhone.upgrade_storage(256)
Old storage is 128 GB
New storage is 256 GB
aPhone.upgrade_storage(128)
You can't rollback memory!
aPhone.get_storage()
Storage is 256 GB
iPhone.connect_cloud()
Connecting to iCloud...
iPhone.download_app('Starbucks')
Opening Apple Store to download Starbucks app..
aPhone.connect_cloud()
Connecting to gdrive..
aPhone.download_app('WhatsApp')
Opening Google Play to download WhatsApp app...
iPhone.get_time()
Time is: 12:32 PM
User-defined Functions Output
aPhone.get_time(0
Time is: 12:54 PM
iPhone.get_date(()
Date is: 7/11/2020
aPhone.get_date()
Date is: 7/11/2020
iPhone.place_call(^425-123-4567')
Calling number 425-123-4567...
iPhone.send_sms('Hi There', '214-214-2144')
Sending Message 'Hi There' to number 214-214-2144
aPhone.place_call(^206-123-4567')
Calling number 206-123-4567...
aPhone.send_sms('Hi There', '469-123-4567')
Sending Message 'Hi There' to number 469-123-4567
iPhone.launch_Siri()
| Launching Siri.
aPhone.launch_google_assistant()
Launching Google Assistant...
Accessor Methods Output
print('AirDrop Status is: ', iPhone.get_airdrop_status())
AirDrop Status is On
print('Split-Screen Mode is: ', aPhone.get_split_screen_mode())
Split-Screen Mode is On
Transcribed Image Text:Sample Interaction: Constructor & Mutator Methods Output iPhone = ApplePhone('Black', '11 Pro', 64, 'Verizon') iPhone.set_airdrop_status('On'); print(iPhone) This is a Black 11 Pro Apple Phone Capacity is 64 GB. Carrier is Verizon | AirDrop Status is On aPhone = AndroidPhone('White', 'Note 10', 128, 'AT&T') aPhone.set_split_screen_mode('On'); print(aPhone) This is a White Note 10 Android Phone Capacity is 128 GB. Carrier is AT&T Split-Screen Mode is On Polymorphic Functions Output iPhone.get_storage() Storage is 64 GB iPhone.uprade_storage(128) Updating storage is not allowed on Apple phones aPhone.get_storage() Storage is 128 GB aPhone.upgrade_storage(256) Old storage is 128 GB New storage is 256 GB aPhone.upgrade_storage(128) You can't rollback memory! aPhone.get_storage() Storage is 256 GB iPhone.connect_cloud() Connecting to iCloud... iPhone.download_app('Starbucks') Opening Apple Store to download Starbucks app.. aPhone.connect_cloud() Connecting to gdrive.. aPhone.download_app('WhatsApp') Opening Google Play to download WhatsApp app... iPhone.get_time() Time is: 12:32 PM User-defined Functions Output aPhone.get_time(0 Time is: 12:54 PM iPhone.get_date(() Date is: 7/11/2020 aPhone.get_date() Date is: 7/11/2020 iPhone.place_call(^425-123-4567') Calling number 425-123-4567... iPhone.send_sms('Hi There', '214-214-2144') Sending Message 'Hi There' to number 214-214-2144 aPhone.place_call(^206-123-4567') Calling number 206-123-4567... aPhone.send_sms('Hi There', '469-123-4567') Sending Message 'Hi There' to number 469-123-4567 iPhone.launch_Siri() | Launching Siri. aPhone.launch_google_assistant() Launching Google Assistant... Accessor Methods Output print('AirDrop Status is: ', iPhone.get_airdrop_status()) AirDrop Status is On print('Split-Screen Mode is: ', aPhone.get_split_screen_mode()) Split-Screen Mode is On
class CellPhone
class ApplePhone
(Child Class)
Properties
airdrop_status
class AndroidPhone
(Parent class)
Properties
color
(Child Class)
Properties
split screen_mode
model
storage
carrier
Methods
# Polymorphic functions
upgrade_storage(int storage)
connect cloud()
download_app(string app)
Methods
Methods
# User-defined functions # User-defined functions
launch_Siri()
launch_google_assistant()
# User-defined functions
get_time()
get_date()
place_call(string number)
send sms(string msg, string number)
Write python code to do the following:
1. Define parent and child classes (add a documentation to every class)
2. Add accessor and mutator methods for each property (in all classes)
3. Implement methods outlined above (add a documentation to all methods)
Transcribed Image Text:class CellPhone class ApplePhone (Child Class) Properties airdrop_status class AndroidPhone (Parent class) Properties color (Child Class) Properties split screen_mode model storage carrier Methods # Polymorphic functions upgrade_storage(int storage) connect cloud() download_app(string app) Methods Methods # User-defined functions # User-defined functions launch_Siri() launch_google_assistant() # User-defined functions get_time() get_date() place_call(string number) send sms(string msg, string number) Write python code to do the following: 1. Define parent and child classes (add a documentation to every class) 2. Add accessor and mutator methods for each property (in all classes) 3. Implement methods outlined above (add a documentation to all methods)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY