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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!