Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Although not emphasized in the lecture videos, methods can also be protected like attributes. To do that you add the double underscore to the front

Although not emphasized in the lecture videos, methods can also be protected like attributes. To do that you add the double underscore to the front of the name of the method. The method is then considered to be
"private" and only used by other methods in the class. Assume you have a method in your class called "isQualified", you can run it within your class by issuing
self.isQualified (s_obj)
# note that 'self is not needed in the parameter list
If we wanted to protect "isQualified" we would define it using the signature line "def__isQualified (self, s_obj):" and execute it internally using the statement "self. _isQualified (s_obj".
Check 'True' for this question to get full credit. This question is not a trick, so don't over-think the answer. Just check 'True.
True
O FalseAlthough not emphasized in the lecture videos, methods can also be protected like attributes. To do that you add the double underscore to the front of the name of the method. The method is then considered to be
"private" and only used by other methods in the class. Assume you have a method in your class called "isQualified", you can run it within your class by issuing
self.isQualified (s_obj)
# note that 'self is not needed in the parameter list
If we wanted to protect "isQualified" we would define it using the signature line "def__isQualified (self, s_obj):" and execute it internally using the statement "self. _isQualified (s_obj".
Check 'True' for this question to get full credit. This question is not a trick, so don't over-think the answer. Just check 'True.
True
O False

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions