Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Jgrasp Follow This template Some gotchas to remember are: - StringTokenizer string tokens are the String data type. If you are saving to other
In Jgrasp
Follow This template
Some "gotchas" to remember are: - StringTokenizer string tokens are the String data type. If you are saving to other data types, you must first convert the string to that type. - Make sure to only retrieve four tokens per read line. Any more will result in a NoSuchElementException being thrown. - Only read as many lines as what there are in the "movies" array. Any more will result in Exceptions being thrown. After the loop, make sure to display each of the arrays with a header before them. Your output should look like this: Iv sure your output is created by actually displaying the value of the arrays and not typing the String literals as parameters. You should, ideally, be using a loop to iterate through the elements of the array to display it with the minimal amount of code. Add the appropriate headers before each array (as shown above) to receive full credit for a clear and organized presentation of data. Dackage Main; oublic class Labo2\{ public static void main(String[] args) // My code to dynamically create a small movie database (DO NOT MODIFY OR REMOVE!) String[] movies = new String[5]; movies[0] = "Shawshank Redemption*1994*Tim Robbins* 2.36"; movies[1] = "The Godfather*1972*Al Pacino* 2.92"; movies[2] = "Raging Bull*1980*Robert De Niro* 2.15; movies[3] = "Million Dollar Baby*2004*Hilary Swank* 2.2"; movies[4] = "Straight Outta Compton*2015*Jason Mitchel1* 2.45; // End of code // TODO: Write your code to parse the data, and display the data in a meaningful way .. // (Use the instructions in the hand out to complete the assignment for full credit)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started