Question: In your Program class, create a new method called GetInfo. This method receives one parameter: An integer list that is expected to contain a set

In your Program class, create a new method called GetInfo. This method receives one parameter: An integer list that is expected to contain a set of random numbers. It returns a string that contains a metadata report on the specified list of integers. The report should include: The numbers found in the list in the first line (in exactly this format: [number1, number2, number3, number4, etc], with the square brackets "[ ]" around it and separated by commas), then the list average in the second line, the lowest number in the list in the third line, and the highest number in the list in the fourth line. Note that each one of these should appear in an individual line in the report. You are expected to use a list in this question. Once you are done, write the test harness in the Main method of your Program class, ensuring your code is fully functional as per requirements. In other words, define random lists of integers in your Main method, and display corresponding reports in the Console. The number of items in this list is defined by the last digit of your student number, times 3. For example, if your student number ends with 1, your list should have size 3. If your student number ends with 2, your list should have size 6. If your student number is 0, your list should have size 10. You are free to create your random numbers using any method. For full marks, ensure your method handles exceptions properly, and in case of errors, display clean and meaningful messages to the user (Hint: Implement try-catch blocks).

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!