Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Visual Basic Programming Suppose a soccer team needs an application to record th

ID: 664612 • Letter: V

Question

Visual Basic Programming

Suppose a soccer team needs an application to record the number of points scored by its players during a game. Create an application that asks how many players the team has, and then asks for the names of each player. The program should declare an array of strings large enough to hold the number of points scored by each player. The application should have a menu system or buttons that perform the following:

1. Display a form that allows the user to enter the player's names.

2. Display a form that can be used during a game to record the points scored by each player.

3. Display the total points scored by each player and by the team.

INPUT VALIDATION: Do not accept negative numbers as points

Explanation / Answer

Menu Systems or Buttons

Public Function InputBox

{

ByVal promt As String , _

Optional ByVal Title As String = " ", _

Optional ByVal DefaultResponse As String = " ", _

Optional ByVal Xpos As Integer = -1, _

Optional ByVal ypos As integer = -1, _

)

As String

Private Sub btnmessage_Click(ByVal sender As System.object,_ ByVal e As a System.EventAR

Handles btnmessage.Click

InputBox("Enter the player's name")

End Sub

Private Sub btnmessage_Click(ByVal sender As System.object,_ ByVal e As a System.EventAR

Handles btnmessage.Click

InputBox("Enter the points scored by each player")

End Sub

Private Sub btnmessage_Click(ByVal sender As System.object,_ ByVal e As a System.EventAR

Handles btnmessage.Click

InputBox("Enter the total points scored by each player and by the team")

If IsNumeric(Text1, intPoints) true then

if intPoints > 0 then

MsgBox(" valid points");

Else

MsgBox("please insert positive points");

EndIf

End Sub

}