Question: [C#]I need to implement these methods into the given class which will return the average of all five values in the array. Here is some
[C#]I need to implement these methods into the given class which will return the average of all five values in the array.
![[C#]I need to implement these methods into the given class which will](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f1302b63816_53966f1302b0771d.jpg)
Here is some sample code I have: (I don't think all of them will need to be used)
public class BarChart { int[] m_numbers; public BarChart() { m_numbers = new int[5]; } public int GetSize() { return m_numbers.Length; } public void SetValue(int newVal, int idx) { if (idx >= 0 && idx = 0 && idx 1. Implement the GetAverage and PrintBarChart methods in the BarChart class. GetAverage should return the average of all five values in the object's array (no matter what values are stored in the array). A. B. PrintBarChart should produce output that matches the above example output. So if slot zero in the array contained the value 2, and the following array elements contained 4, then 6, then 8, then 10, the correct output of this method would be: iok oiook ok ookkkicok
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
