Question: Define the plus operator for this class that would allow a user of ShoppingList to use code such as this: MyList = MyList + jeans

Define the plus operator for this class that would allow a user of ShoppingList to use code such as this: MyList = MyList + jeans + shoes + socks; to add items to a ShoppingList named MyList.

Define the plus operator for this class that would allow a user

public class ShoppingList { private List Item = new List (); // List of items to purchase public String Store { get; set; } // Store at which to shop public int Count { get { return Item. Count; // Number of items on the list } } public ShoppingList ( ) { Store = String. Empty; } // Answers of the following would be inserted here .. }

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!