Link to home
Start Free TrialLog in
Avatar of Lan88
Lan88Flag for Australia

asked on

How do I write code for these commands?

Hi, I'm just wondering what would be the codes for the below.
•Calls CountScoresBelowAverage(), then displays the return
value.
•Calls CountScoresAboveOrEqualToAvg(), then displays the
return value.
•Calls CountMatchingScore(), passes it the value in the Textbox
and then displays the return value
•Calls CalcSpread(), passes it the Lowest Score & Highest
Score and then displays the return value
•Displays the number of times each value in the range 1-10
appears in the Number Listbox
Return Type None




ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lan88

ASKER

Hi,

I gathered it would be easier to attached the pdf so you have a better idea of what I am trying to achieve.

Thanks, Lan
2011-S2-I.Prog-Ass2-v1.0.0.pdf
That looks like a multi-line TextBox.

You could use the AppendText() method to add each line of output:

    Dim NumScoresBelowAverage As Integer = CountScoresBelowAverage()
    TextBox1.AppendText("Number of scores below average: " & NumScoresBelowAverage & vbCrLf)