X696: ItemToPurchase class exercise 1

Write a class called ItemToPurchase that has the following fields to hold the following information:

  • name
  • price
  • quantity

All the fields should be private. Make sure to think about the correct type for each field.

Your Answer:

Feedback

Your feedback will appear here when you check your answer.