Question: Design and code a Java console application that reads a text file containing course information and prints out this information to the screen. The application

Design and code a Java console application that reads a text file containing course information and prints out this information to the screen. The application will raise an exception if it encounters problems reading the text file. The title of the application should be U2A1_ReadTextFileHandleExcep".

The requirements of this application are as follows: The application is to read a text file called courses.txt that resides in the home folder of the NetBeans project.

The courses.txt contains information that describes three courses. Each course is described by three fields separated by spaces on a line by themselves. The three fields that describe a course are:

Course code

Course credit hours

Course title

The application is to read this text file and prints out its content on the screen for each course. If the application encounters an error, it should raise an exception, prints out an error message, and then exits the program.

Use these three lines to populate the course.txt file:

IT2249 6 Introduction to Programming with Java

IT2230 3 Introduction to Database Systems

IT4789 3 Mobile Cloud Computing Application Development

Explain the approach you took to complete this assignment and the major decisions you made

Successful completion of this assignment will show the correct content of the courses.txt printed out when the application is run. Your program output should look like this sample output:

Design and code a Java console application that reads a text file

System.out.println("Teacher's Copy 24 run: Teacher's Copy course code-1T2230 I credit hours = 3 l course title BUILD SUCCESSEUL (total time: 0 seconds) " course code- Introduction to Programming with Java lntroduction to Database Systems 172249 Credit hours 6 I Course title | Course Code IT4789 1 Credit hours = 3 l course title = Mobile Cloud Computing Application Development

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!