QuestionQ32Verified/Advanced Object-Oriented ProgrammingCopy linkReport a problemAsk AstroTutorSave questionWhich statement about the @property decorator is false?AThe @property decorator should be defined after the method that is responsible for setting an encapsulated attribute.BThe @property decorator designates a method which is responsible for returning an attribute value.CThe @property decorator marks the method whose name will be used as the name of the instance attribute.DThe @property decorator should be defined before the methods that are responsible for setting and deleting an encapsulated attribute.Show AnswerAnswerExplanationThe @property decorator defines the getter and creates the property object. Methods that set or delete the encapsulated value are added afterward through that property’s .setter and .deleter decorators, so the property must be defined before them.Show comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion