Question: Create in C# : a. In the Main method, create a List of items to be purchase need to have at least 7 items. Create

Create in C# : a. In the Main method, create a List of items to be purchase need to have at least 7 items.

Create a 2nd List with the same number of elements as the first, but these should be the prices of the items in the first list.

Create a custom method called CombineTheLists and use the 2 lists you created as arguments in the function call..

This method should have 2 parameters and catch the incoming Lists. and should not return anything. iii.

Inside of the function, create a loop that cycles through both lists at the same time. iv. Each time the loop runs, pull an item from the 1st List and the matching price from the 2nd List and combine them into one text string

Create a function call and run the CombineTheLists function to output these merged sentences to the console.

Main Method i. Output to the user that we will be making a few changes to the list and giving them the updated shopping list.

Remove (2) elements from each of the 2 Lists.

Create a function call to the CombineTheLists function like before and output the merged sentences again.

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!