Question: Using the private method _getValueName() as a guide, code another private method called _getSuitName(). Now uncomment the call exerciseCard();. Save the file and reload the
Using the private method _getValueName() as a guide, code another private method called _getSuitName().
Now uncomment the call exerciseCard();. Save the file and reload the page in the browser (to run your updated code). Check the display in the output div is as follows:
The seven of spades
You should try passing a few different argument values for the Cardconstructor.
You can comment out the call exerciseCard(); when you are finished.
The card constructor includes an accessor method (get value()) and mutator (set value(newValue)) method for the private variable _value. Using these as patterns code an accessor and mutator for the private variable _suit.
using javascript.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
