|
The names in Member class don't make any sense. An item includes both its name and price, so calling itemPrice of type Item doesn't really jive. Not that its wrong, but it is a little unusual of a name to give it when the value is only of type Item and not a price.
Where have you set the value of these in Member? itemName and itemPrice in Item have no impact on itemName and itemPrice in Member, and they will also have no impact on any other instance of Item, so changes in one item's name doesn't affect another item's name. Only static variables are class level, non-static are instance specific.
|