Question: Write a Java Program that reads given 2 .txt files (notepad can be used to view these files) File A contains infomation about the vehicle

Write a Java Program that reads given 2 .txt files (notepad can be used to view these files) File A contains infomation about the vehicle type while File B contains the issues linked with that vehicle Please READ the instructions given here carefully. Links to the File A and File B will be provided. Once you're done paste the code along with a screenshot of the output to prove it worked

File A (vehicle file) - https://www.dropbox.com/s/0zwcn5x8ef1s6u5/Cars.txt?dl=0

File B (detail file) - https://www.dropbox.com/s/tj6qhwlxg9ki2e9/DetailReport.txt?dl=0

TIP - Parse the file (do not make a loop) as it will crash the program. Read the detailed instructions in the picture posted below. Thanks!

Write a Java Program that reads given 2 .txt files (notepad can

Problem You are asked to design a program in Java that would read 2 files ("Cars.txt" and "DetailedReport.txt"). The "Cars.txt" file contains a car type and some coded information about the issues associated with that car on each line. The "DetailedReport.txt" contains a string of text that explains the details associated with the numerical code. Requirements Write a Java program that will read and store the code and associated text. Then construct a way to read and output the information for each car. You will have to use normal exception handling for reading the file, things like missing files for example. You also have to handle specific problems within the file associated with processing the data it contains. In this case, you will need to handle the exceptional situation where a line from the file is incorrectly formed. You should create your own exception class. You should throw the exception for an incorrect line catch the exception, print a warning message and continue to process the lines. You will also need to handle the exceptional circumstance of having a code that is not defined in the "DetailedReport txt" file. You may manage this condition as you like, but you should print out an "Unknown" condition. Tips: When you read "Cars txt", be careful how you handle the numbers of errors for each car Since each car have a different amount of errors, separated by spaces, you will need to parse the string. If you just use a loop to read, it might crash your program

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!