Powder Skating Rink holds a weekly ice-skating compettion. Competing skaters mus
ID: 3652276 • Letter: P
Question
Powder Skating Rink holds a weekly ice-skating compettion. Competing skaters must perform a two-minute program in front of a panel of judges. The number of judges varies from week to week. At the end of the skater's program, each judge assigns a score of 0 through 10 to the skater. The manager of the ice rink wants an application that calculates and displays a skater's average score. The application should also display a skater's total score, and the number of scores entered. Create a visual basic windows application to cplete the task.Explanation / Answer
so you need three listboxes judges, scores, skater name with average score a textbox to enter the skaters name, initially clear. a button to indicate you want to record the selected score for the selected judge. when all judges have recorded compute average, add skater name and average to listbox, start over OT - i lived in the DC area for 30 years, and i only miss it a very little. a start Public Class Form1 'on form 'listbox - lbJudge, lbScore, lbSktrAvg 'textbox - tbSKN 'button - butRec Dim totSCR As Decimal 'accumulate scores here Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.AcceptButton = butRec 'so we can hit enter to record Me.Text = "Powder Skating - Weekly Skating Competition" 'set form title newSk8r() 'start over End Sub Private Sub newSk8r() 'judegs names Dim theJudges() As String = New String() {"One", "Two", "Three", "Four", "Five", "Six"} tbSKN.Text = "" 'clear skater name totSCR = 0 'set score to 0 lbJudge.Items.AddRange(theJudges) 'add judges names For x As Integer = 0 To 10 'add scores lbScore.Items.Add(x.ToString) Next butRec.Enabled = False 'turn off stuff till skaters name entered lbJudge.Enabled = False lbScore.Enabled = False tbSKN.Enabled = True : tbSKN.Select() 'allow skaters name to be entered End Sub
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.