Question: Constructor method _ _ init _ _ o How / when is the constructor called. o Example of code inside of the _ _ init
Constructor method init
o How when is the constructor called.
o Example of code inside of the init method
Special method str
o How when is the str method called.
o Example of code inside of the str method
When is a method a mutator method? Be able to identify which methods are
mutator methods. Which of these methods are typically mutator methods?
o Get methods, set methods, str
What is a mutable type? Be able to identify which class is a mutable type.
Examine the code we wrote for BankAccount. Understand the code we wrote
in the main method, in particular the statements that performed:
o Calling the constructor
o Printing the object that caused the str method to be called
o Calling the deposit and withdraw methods. How did we call them?
What is happening when we call these methods?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
