From c7c87ed056f89047d46ed80ab6d51b09e8af5907 Mon Sep 17 00:00:00 2001 From: Andrew Harrington Date: Sun, 13 Jan 2019 16:36:38 -0600 Subject: [PATCH] instance method limbs not class method for Animal class --- _sources/Classes/AddingOtherMethodstoourClass.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_sources/Classes/AddingOtherMethodstoourClass.rst b/_sources/Classes/AddingOtherMethodstoourClass.rst index 9184b719..b3521233 100644 --- a/_sources/Classes/AddingOtherMethodstoourClass.rst +++ b/_sources/Classes/AddingOtherMethodstoourClass.rst @@ -84,7 +84,7 @@ have one additional parameter as compared to the invocation. **Check Your Understanding** -1. Create a class called Animal that accepts two numbers as inputs and assigns them respevtively to two instance variables: ``arms`` and ``legs``. Create a class method called ``limbs`` that, when called, returns the total number of limbs the animal has. To the variable name ``spider``, assign an instance of ``Animal`` that has 4 arms and 4 legs. Call the limbs method on the ``spider`` instance and save the result to the variable name ``spidlimbs``. +1. Create a class called Animal that accepts two numbers as inputs and assigns them respevtively to two instance variables: ``arms`` and ``legs``. Create an instance method called ``limbs`` that, when called, returns the total number of limbs the animal has. To the variable name ``spider``, assign an instance of ``Animal`` that has 4 arms and 4 legs. Call the limbs method on the ``spider`` instance and save the result to the variable name ``spidlimbs``. .. activecode:: ac_chp13_classes_01 :tags: Classes/ImprovingourConstructor.rst, Classes/AddingOtherMethodstoourClass.rs