2 Use Methods Change State Turtle Object Instead Directly Changing Values Attributes Q37234854

2. Why do we use methods to change the state of a Turtle objectinstead of directly changing the values of its attributes?


Answer


We will not have the access to the attributes to access themdirectly.. so we need to access it through the methods because theymight keep validations inside the methods

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.