Question: 3. The Item class contains a Private variable named _dblCost. The variable is associated with the Public Cost property. An application instantiates an Item object

3. The Item class contains a Private variable named _dblCost. The variable is associated with the Public Cost property. An application instantiates an Item object and assigns it to a variable named phone. Which of the following can be used by the application to assign the number 150.65 to the _dblCost variable?

a. phone.Cost = 150.65

b. item.Cost = 150.65

c. phone._dblCost = 150.65

d. item._dblCost = 150.65

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