Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Visual Basic; Need help to get the code I have attached the program module and the screenshot of the code that I believe I'm completely

Visual Basic; Need help to get the code I have attached the program module and the screenshot of the code that I believe I'm completely off the track. so I need to get the code for the function WinPercentage and SeasonOutcome so it needs to return the value of winpercentage and season outcome so I can use in the button listed. And if possible if you can help me will whole code or at least help me with those two functions.

image text in transcribed

image text in transcribed

ISCITE 285 - Chapter 7.2 In Class Lab Due: Monday, Feb 11 by 11:55 pm Please name your project, "Your Last Name"_Chap7_2 In Class Lab: This lab is to review the concepts covered in chapter 7.1 &7.2(Working with Arrays and LINQS): This project will read a file that contains csv records into a String array when array (teams) is created. This will be a class level array. The file should be named "teams.txt". This file will have records for NFL team stats and will be in the format: teamName, Year,wins,losses Example Records are: Saints, 2018,13,3 Saints,2017,11,5 Saints,2016,7,9 Patriots,2018,11,5 Patriots,2017,13,3 Patriots,2016,14,2 Jaguars,2018,5,11 Jaguars,2017,10,6 Jaguars,2016,3,13 Panthers,2018,7,9 Panthers,2017,11,5 Panthers,2016,6,10 Rams,2018,13,3 Rams,2017,11,5 Rams,2016,4,12 This project should contain 3 functions as described below . WinPercentage function that will calculate the team seasonal winning Percentage (wins/tota Function that will state if the team had a "Winning" or "Losing" season. If the team had the same number of wins as they did losses, indicate this by returning "Even" DataOk Function that will be used with Query 3 (below) to insure that the user did sel IstTeams listbox. ect a team name from the This project should contain the following events: Load Event - List the individual team names in alphabetical order in Ist Teams. Each team should only be listed once Use a Query to create the list of values that will be displayed. btnListAll button click event: This event should use a loop to read through the entire array and display each line the IstDisplay listbox. (Ok - This is just for me to check your data but do included it for me.)r btnRankings button click event: Create rankingsQuery that selects all teams in ascending year, descending wins order. Display the year, team name, number of wins and losses in IstDisplay btnSeasonSummary button click event: Create summaryQuery that selects all teams by team name (ascending) and then year (descending). Include their season winning Percentage (use function WinPercentage) and whether they had a "Winning" or "Losing" season (use function SeasonOutcome). Display team name, year, WinPercentage and SeasonOutcome. btnSelectedTeam button click event: Allow the user to select a team from IstTeams; Verify that a team has been selected (DataOk) before continuing to run the event. If the given team name is found (use a query), list Team Name (only once - header) and then the year, number of wins and losses for every record for the selected team. If no records exist for the selected team, then a message should be given letting the user know Note: IstDisplay should be cleared before each new output listing is added to it. orm1.vbaaX teams.txt Form1.vb [Design h E Patel-chap7-21 n Class-Lab Form1 Seaso Public Class Form1 1 2 Dim Teams() As string 10. File. ReadAlILines("teams . txt") = 4 Private Sub btnlistall_Click(sender As Object, e As EventArgs) Handles btnlistall.click 1stteams.Items.Clear() For Each line In Teams 6 Form 1 lstteams.Items.Add(line) Next Team Ranking order End Sub Function WinPercentage(Teams As String) As String 10 E Dim Query = From Teams In Teams Season Summary Let Data = Teams. Split ("," Let Year = Data (1) Let Team = Data (0) Let Wins Data (2) Let Loss Data (3) Let WinPer(Wins/(Wins +Loss) 100) Select WinPer 12 13 Selected Team Query 15 16 17 18 19 20 21 List all ReturnWinPer End Function Function Seaso (Teams As String) As String Dim Query = From Teams in Teams Let Data Teams.Split(",") Let YearData (1) Let TeamData () Let Wins Data (2) Let Loss Data (3) 23 24 25 26 27 28 29 30 31 32 Wins loss Then Return Winning ElseIf Wins

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions