Question: Programmed in Java This problem is from programming assignment 8 in the chapter 6 on Arrays. In this exercise you should create parallel arrays. That

Programmed in Java  Programmed in Java This problem is from programming assignment 8 in
the chapter 6 on Arrays. In this exercise you should create parallel
arrays. That means creating multiple arrays where the elements in certain positions
each array is synchronized with elements in the same position in other
arrays. Design and code a program to read data from a data

This problem is from programming assignment 8 in the chapter 6 on Arrays. In this exercise you should create parallel arrays. That means creating multiple arrays where the elements in certain positions each array is synchronized with elements in the same position in other arrays. Design and code a program to read data from a data file into two separate parallel arrays one array will contain a list of the names of the states in the US. and another array will contain a list of names of the state capital cities corresponding matching the states. In the module for Arrays and Text File Processing, there is a list of text data files The text data file, named capitals tot contains a list of states and capitals, with a state name on one line followed by a capital city name on the next line, such as: Alabama followed by Montgomery, Alaska followed by Juneau, Arizona followed by Phoenix, and Arkansas followed by Little Rock. Here are the requirements of the program The program should first load the data from the text file into the two arrays. Your application should read the state names into one array and the matching capital city names into the second parallel array.Irecommend printing out the ements in each array after they are loaded to verify that the data was loaded correctly and entirely. After the data is loaded, your program should randomly pick a state in the state array. Your program should then tell the user the name of the state capital The program should verify that the capitalis in the parallel capitol array. If the capitol name is found, the program should then verify that the capital entered matches the state that was displayed to the user. Use the capitals.txt le in the module for arrays. Design your program to read the states and capitals data from this file You should copy this file to the project folder of the ignment. It will prevent you from needing to write a long path ame in your program to point to and access the file on your system. Additionally, when you submit your assignment the data that will be transported with the projec Submit your programming assignment as Zipped NetBeans Project Folde submit your Lab Report as an additional document to your submission or inside your NetBeans Project Folder as an additional document to your submission. Canvas permits multiple documents in a single submission prefer Make sure that you copied the data file to your project folder

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!