Tuesday, May 7, 2024

📑 Managed Attributes

📑 Task

1) Describe the object stored in variable c1
2) Create class attributes 'area' and 'circumference' and
convert them into properties or managed attributes

📑 Answer

1) The object stored in the variable c1 is an instance of the Circle class
It represents a circle with a radius derived
from the given diameter and a specified unit of measurement
2) Now the Circle class provides the ability to easily calculate
area and circumference for its instances

No comments:

Post a Comment