Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

Follow This template

image text in transcribed

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

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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

What are some programs that an entrepreneur can use to reduce risk?

Answered: 1 week ago

Question

What is the message repetition?

Answered: 1 week ago