Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My problem is Zybooks is very maticulous about the outputs. Can someone look at my code and fix the issue? pare output 0/3 utput is

My problem is Zybooks is very maticulous about the outputs. Can someone look at my code and fix the issue?
image text in transcribed
image text in transcribed
image text in transcribed
pare output 0/3 utput is nearly correct, but whitespace differs. See highlights below. Special character legend Input movies.csv brld 1 Your output The Indians or Sitting Bull s and Clark G 16:40 20:00 PG-13 19:00 PG | 12:45 15:00 19:30 PG-13 10:00 14:30 R 19:00 the World co Space Expected output 1 And The Indians or Sitting Bula of Lewis and Clark G 16:40 20:00 PG-13 19:00 PG 12:45 15:00 19:30 PG-13 10:00 14:30 R 19:00 0/3 2 Compare output Output is nearly correct but whitespace differs See highlights below. Special character legend Input moviesl.csv Your output Wonders of the World Journey to Space Investigating the Shockingly Big World of Am Buffalo Bill And The Indian or Sitting Bull Adventure of Lewis and Clark Halloween G 16:40 20 PG-13 19:00 G1 19:30 22 PG 10:30 12 PG-13 10:00 149 R19:00 21 Expected output Wonders of the World GN16:40 20 Journey to pace | PG-13 1 1900 Investigating the Bookingly nig World of Am G 13:30 22 Truttato il And The Indians or sitting Bull POI10130 12 Adventure of Lewis and lack PG-13 10:00 10 Halloween 19:00 21 072 Come but Out is nearly correct, but whitespace differt. See highlights below. Special character legend trout - LabProgram java Load default template 1 import java.io.File; 2 import java.io.FileNotFoundException; 3 import java.util.Linked HashSet; 4 import java.util.Linkedlist; 5 import java.util.Scanner; 6 7 public class LabProgram { 8 9 public static void main(String[] args) { 10 LinkedList movies - new LinkedListo; 11 LinkedHashSet 28 29 30 for (String title t moviesTitle) 31 System.out.printf("-6 M. title. Substring. Moth.min(tt 33 String tine 34 String ratings 35 for (String movie movies) 36 String dataArray movie.split(""). kr cettle.equals(dataArray>> time-time dotarroyo ratings - dotorray[23: 3 41 42 43 System.out.printf(" Stratings.substring ratings.te 32 19 26 e.printStackTrace(); 27 28 29 30 String title : moviesTitle) { 31 32 System.out.printf("%-445 l", title.substringco, Math.min(title.length, 44))); 33 String time 34 String ratings 35 for (String movie : movies) { 36 String dataArray = movie.split(""); 37 if (title.equals(dataArray[1])) { 38 time = time + dataArray[0] + 39 ratings = dataArray[2]; 3 41 42 } 43 System.out.printf(" %Ss ", ratings.substring(e, ratings.length())); System.out.printf(" %-25s", time.substring(@, time. length - 1)); 46 11 49 44 45 47 48 49 50 System.out.printlno: ! 52 53 54

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

Handbook Of Relational Database Design

Authors: Candace C. Fleming, Barbara Von Halle

1st Edition

0201114348, 978-0201114348

More Books

Students also viewed these Databases questions

Question

Question Who can establish a Keogh retirement plan?

Answered: 1 week ago