The Inventory class contains a Private variable named _strId. The variable is associated with the Public ItemId

Question:

The Inventory class contains a Private variable named _strId. The variable is associated with the Public ItemId property. An application instantiates an Inventory object and assigns it to a variable named onHand. Which of the following can be used by the application to assign the string “XG45” to the _strId variable?

a. onHand.ItemId = "XG45"

b. ItemId._strId = "XG45"

c. onHand._strId = "XG45"

d. ItemId.strId = "XG45"

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: