Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

visual basic The file Justices.txt contains data about Supreme Court justices, past and present. Each record of the file contains six fields; first name, last

visual basic The file Justices.txt contains data about Supreme Court justices, past and present. Each record of the file contains six fields; first name, last name, appointing president, home state, year appointed, and year they left the court. (For current justices, the last field is set to 0).
The first two lines are as follows:
Samuel, Alito, Geroge W. Bush, NJ,2006,0
Henry, Baldwin, Andrew Jackson, PA,1830,1844
Which of the following determines the first two lines of the new file created by the following code?
Dim query = From line In IO.File.ReadAllLines (Justices.txt)
Let data = line.Split(,c)
Let LastName = data(1)
Let pres = data(2)
Let state = data(3)
Let presLastName = pres.Split(,c).Last
Let newline = presLastName & , & LastName & , & state
Select newline
IO.File.WriteAllLines (NewFile.txt, query)

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions