Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a constructor with parameters self, num_mins and num_messages. num_mins and num_messages should have a default value of 0. Sample output with one plan

 

Write a constructor with parameters self, num_mins and num_messages. num_mins and num_messages should have a default value of 0. Sample output with one plan created with input: 200 300, one plan created with no input, and one plan created with input: 500 My plan... Mins: 200 Messages: 300 Dad's plan... Mins: Messages: Mom's plan... Mins: 500 Messages: 0 Code writing challenge activity demo 456522.2043766.qxxy7 1 class PhonePlan: 2 3 4 5 6 7 9 10 # FIXME add constructor Your solution goes here *** def print plan(self): print('Mins:', self.num_mins, end=' ') print('Messages:', self.num_messages) 11 my plan = Phone Plan (int(input()), int(input())) 12 dads plan = PhonePlan() 13 moms plan PhonePlan (int(input())) 14 15 print('My plan..., end='') 16 my plan.print_plan() Activate Wing Go to Settings to a

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Here is the solution for the constructor with parameters and the printplan ... 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

Guide To Java A Concise Introduction To Programming

Authors: James T. Streib, Takako Soma

2nd Edition

3031228413, 978-3031228414

More Books

Students also viewed these Programming questions

Question

=+2 Does the EMH imply perfect forecasting ability?

Answered: 1 week ago