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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started