Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q2: Load in External Data i) In the Main class, load in the 2 data files (Players.csv and Managers.csv) using Scanners. ii) Process each data

Q2: Load in External Data

i) In the Main class, load in the 2 data files (Players.csv and Managers.csv) using Scanners.

ii) Process each data row of the files to create players and managers in your program using the Manager and Player classes you wrote earlier.

iii) Arrange these objects in the static squad array in the Main class. When you are done the squad array will be populated with 32 objects of the Squad class.

Squad has a Manager property to fill with a new Manager object from the data.

iv) Also, an arrayList players to populate with Player Objects you make from the scanned data.

The following hints will help you:

The first row of each CSV file is a header row, you can ignore its contents using the nextLine() method of your Scanner object

Read in the rest of the file row by row using nextLine() in a loop

Split the row up into individual data items using the split() method of String with the regular expression \\, as the only parameter.

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

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions