Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Instruction
Creating a Setter Method Solution
Task 1 Solution
Setter methods are used when you want to add logic while setting a property. A circle's area and circumference are dependent on its radius. But if the radius of a Circle object changes, we would have to manually update it's area and circumfrence properties as well. By using a setter method for the radius, we can also update the Circle's object's area and circumference pro...