Determine the output displayed when the button is clicked


1. Write a program using the file Baseball.txt that requests a team as input from a list and displays the players from that team.

The players should be sorted in decreasing order by the number of hits they had during the season. The Baseball.txt file contains data about the performance of major league baseball players during the 2009 regular season. Each record of the file contains four fields - name, team, atBats, and hits. Some lines of the file are as follows:

Aaron Hill, Blue Jays, 682, 195

Ichiro Suzuki, Mariners, 639, 225

Derek Jeter, Yankees, 634, 212

The output should look like the following:

2. Determine the output displayed when the button is clicked. Assume the five lines of the file Dates.txt contain the numbers 1492, 1776, 1812, 1929, and 1941 and the file is in the appropriate folder.

Private Sub btnDisplay_Click(...) Handles btnDisplay.Click

Dim dates() As String = IO.FilereadAllLines("Dates.txt")

Dim total As Integer = 0

For Each yr As String In dates

If (CInt(yr) >= 1900) Then

Total += 1

End If

Next

txtOutput.Text = total & " 20th-century dates"

End Sub

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Determine the output displayed when the button is clicked
Reference No:- TGS01003600

Expected delivery within 24 Hours